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
| Field | Type | Required | Meaning |
|---|---|---|---|
destination_wallet | string | Yes | Wallet receiving consolidated SOL. Can be managed or external. |
source_wallets | string[] | No | Managed source wallets. If omitted, all active managed wallets except destination are used. Maximum 50. |
fee_reserve_lamports | integer | No | Defaults to 5000. Added to Sender tip and priority fee per source wallet. |
confirm | boolean | No | Defaults 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
| Field | Meaning |
|---|---|
destination_wallet | Wallet receiving consolidated SOL. |
fee_reserve_lamports | Effective reserve kept in each source wallet. |
total_transfer_lamports | Sum of all transfer amounts. |
total_transfer_sol | Human-readable SOL version of total_transfer_lamports. |
transactions | One entry per source wallet transaction. |
transactions.source_wallet | Managed wallet that signed this transaction. |
transactions.source_balance_lamports | Source balance before its transfer. |
transactions.transfer_lamports | Lamports moved from this source. |
transactions.transfer_sol | Human-readable SOL moved from this source. |
transactions.signature | Submitted Solana transaction signature. |
transactions.confirmed | true when confirmation polling observed this transaction. |
transactions.confirmation_status | RPC status such as processed, confirmed, or finalized; null when confirm: false. |
Common Errors
| HTTP | Detail | Meaning |
|---|---|---|
400 | invalid destination wallet address | destination_wallet is not a valid Solana public key. |
400 | source_wallets must contain between 1 and 50 wallets | Explicit source list is empty or too large. |
400 | source wallets must be unique | Duplicate source wallet in source_wallets. |
400 | destination wallet cannot be one of the source wallets | Destination was also selected as a source. |
400 | source balance is too low after fee reserve: ... | A source wallet cannot cover the effective reserve. |
404 | no managed source wallets available | No active managed wallets are available for consolidation. |
502 | Sender or RPC detail | Upstream 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: falsereturns after submission for each source transaction, soconfirmedwill befalseandconfirmation_statuswill benull.