Skip to main content

Consolidate SOL

POST /v1/sol/consolidate/execute

Consolidate SOL moves available SOL from many managed wallets into one destination wallet.

Each source wallet signs and pays for its own transaction. This endpoint sends one transaction per source wallet, records each signature in the response, and returns the total SOL moved.

The destination wallet can be managed or external. If you omit source_wallets, SolanaLaser uses all active managed wallets for the API key except the destination wallet.

Request

const response = await fetch("https://api.solanalaser.xyz/v1/sol/consolidate/execute", {
method: "POST",
headers: {
"content-type": "application/json",
"x-api-key": "sl_your_key",
},
body: JSON.stringify({
destination_wallet: "CONSOLIDATION_WALLET",
source_wallets: ["MANAGED_SOURCE_1", "MANAGED_SOURCE_2"],
confirm: true,
}),
});

const result = await response.json();

Request Fields

FieldTypeRequiredMeaning
destination_walletstringYesWallet receiving consolidated SOL. Can be managed or external.
source_walletsstring[]NoManaged source wallets. If omitted, all active managed wallets except destination are used. Maximum 50.
fee_reserve_lamportsintegerNoDefaults to 5000. Added to Sender tip and priority fee per source wallet.
confirmbooleanNoDefaults to true. If true, each source transaction waits for confirmation before the next result is finalized.

How Consolidation Works

For each source wallet, SolanaLaser calculates an effective per-source reserve:

effective reserve = requested fee_reserve_lamports + Sender tip + priority fee reserve

Then it transfers:

transfer_lamports = source_balance_lamports - effective reserve

If any selected source wallet cannot cover the effective reserve, the request returns an error for that source. Transactions that were already submitted before that error may already be on-chain, because consolidation is a sequence of per-source transactions, not one atomic bundle.

Use Laser Bundle when you need atomic multi-transaction behavior.

Consolidate Selected Wallets

Request

const response = await fetch("https://api.solanalaser.xyz/v1/sol/consolidate/execute", {
method: "POST",
headers: {
"content-type": "application/json",
"x-api-key": "sl_your_key",
},
body: JSON.stringify({
destination_wallet: "CONSOLIDATION_WALLET",
source_wallets: ["MANAGED_SOURCE_1", "MANAGED_SOURCE_2"],
}),
});

const result = await response.json();

Response: 200

{
"destination_wallet": "CONSOLIDATION_WALLET",
"fee_reserve_lamports": 205000,
"total_transfer_lamports": 5000000000,
"total_transfer_sol": "5.000000000",
"transactions": [
{
"source_wallet": "MANAGED_SOURCE_1",
"source_balance_lamports": 2000205000,
"transfer_lamports": 2000000000,
"transfer_sol": "2.000000000",
"signature": "SOLANA_SIGNATURE_1",
"confirmed": true,
"confirmation_status": "confirmed"
},
{
"source_wallet": "MANAGED_SOURCE_2",
"source_balance_lamports": 3000205000,
"transfer_lamports": 3000000000,
"transfer_sol": "3.000000000",
"signature": "SOLANA_SIGNATURE_2",
"confirmed": true,
"confirmation_status": "confirmed"
}
]
}

Consolidate All Managed Wallets

Omit source_wallets to sweep all active managed wallets except the destination.

Request

const response = await fetch("https://api.solanalaser.xyz/v1/sol/consolidate/execute", {
method: "POST",
headers: {
"content-type": "application/json",
"x-api-key": "sl_your_key",
},
body: JSON.stringify({
destination_wallet: "CONSOLIDATION_WALLET",
confirm: false,
}),
});

const result = await response.json();

Response: 200

{
"destination_wallet": "CONSOLIDATION_WALLET",
"fee_reserve_lamports": 205000,
"total_transfer_lamports": 7500000000,
"total_transfer_sol": "7.500000000",
"transactions": [
{
"source_wallet": "MANAGED_SOURCE_1",
"source_balance_lamports": 2500205000,
"transfer_lamports": 2500000000,
"transfer_sol": "2.500000000",
"signature": "SOLANA_SIGNATURE_1",
"confirmed": false,
"confirmation_status": null
}
]
}

Response Fields

FieldMeaning
destination_walletWallet receiving consolidated SOL.
fee_reserve_lamportsEffective reserve kept in each source wallet.
total_transfer_lamportsSum of all transfer amounts.
total_transfer_solHuman-readable SOL version of total_transfer_lamports.
transactionsOne entry per source wallet transaction.
transactions.source_walletManaged wallet that signed this transaction.
transactions.source_balance_lamportsSource balance before its transfer.
transactions.transfer_lamportsLamports moved from this source.
transactions.transfer_solHuman-readable SOL moved from this source.
transactions.signatureSubmitted Solana transaction signature.
transactions.confirmedtrue when confirmation polling observed this transaction.
transactions.confirmation_statusRPC status such as processed, confirmed, or finalized; null when confirm: false.

Common Errors

HTTPDetailMeaning
400invalid destination wallet addressdestination_wallet is not a valid Solana public key.
400source_wallets must contain between 1 and 50 walletsExplicit source list is empty or too large.
400source wallets must be uniqueDuplicate source wallet in source_wallets.
400destination wallet cannot be one of the source walletsDestination was also selected as a source.
400source balance is too low after fee reserve: ...A source wallet cannot cover the effective reserve.
404no managed source wallets availableNo active managed wallets are available for consolidation.
502Sender or RPC detailUpstream RPC, Sender, or confirmation failed.

Notes

  • This endpoint only consolidates native SOL, not SPL or Token-2022 balances.
  • Use Send Asset to move a specific token mint.
  • Consolidation is not atomic across sources because each source wallet signs a separate transaction.
  • confirm: false returns after submission for each source transaction, so confirmed will be false and confirmation_status will be null.