Split SOL
POST /v1/sol/split/execute
Split SOL from one managed wallet into up to five destination wallets in one server-signed transaction.
The source wallet is a SolanaLaser-managed wallet. If source_wallet is
omitted, SolanaLaser uses the API key's default wallet.
Split SOL is useful when you want to prepare multiple managed wallets from one source wallet, distribute a fixed amount to one wallet, and allocate the rest by percentage or equal split.
Request
const response = await fetch("https://api.solanalaser.xyz/v1/sol/split/execute", {
method: "POST",
headers: {
"content-type": "application/json",
"x-api-key": "sl_your_key",
},
body: JSON.stringify({
source_wallet: "MANAGED_SOURCE_WALLET",
total_percent: 50,
destinations: [
{wallet: "DESTINATION_1", sol: "1"},
{wallet: "DESTINATION_2", percent: 20},
{wallet: "DESTINATION_3"}
],
confirm: true,
}),
});
const split = await response.json();
Request Fields
| Field | Type | Required | Meaning |
|---|---|---|---|
source_wallet | string | No | Managed wallet public key to split from. Defaults to the API key's default wallet. |
total_percent | number or string | No | Defaults to 100. Percentage of the source wallet's spendable balance selected for splitting. |
fee_reserve_lamports | integer | No | Defaults to 5000. Added to Sender tip and priority fee to compute the effective reserve. |
destinations | array | Yes | Destination rules. Must contain 1 to 5 wallets. |
confirm | boolean | No | Defaults to true. If true, SolanaLaser waits for signature confirmation. |
Each destination has:
| Field | Type | Required | Meaning |
|---|---|---|---|
wallet | string | Yes | Destination wallet public key. |
sol | number or string | No | Fixed SOL amount for this destination. Cannot be used with percent. |
percent | number or string | No | Percentage of transfer_total_lamports for this destination. Cannot be used with sol. |
If a destination has neither sol nor percent, it receives an equal share of
the unallocated remainder.
How Allocation Works
SolanaLaser first calculates the effective fee reserve:
effective reserve = requested fee_reserve_lamports + Sender tip + priority fee reserve
Then it calculates:
spendable_lamports = source_balance_lamports - effective reserve
transfer_total_lamports = total_percent of spendable_lamports
Destination allocation then happens in this order:
- Fixed
soldestinations are allocated first. percentdestinations receive their share oftransfer_total_lamports.- Destinations without
solorpercentsplit the remaining lamports equally. - If equal splitting leaves dust, earlier equal destinations receive the extra lamports.
Every destination must receive at least one lamport.
Equal Split
This splits the full spendable balance equally between two destinations.
Request
const response = await fetch("https://api.solanalaser.xyz/v1/sol/split/execute", {
method: "POST",
headers: {
"content-type": "application/json",
"x-api-key": "sl_your_key",
},
body: JSON.stringify({
destinations: [
{wallet: "DESTINATION_1"},
{wallet: "DESTINATION_2"}
],
}),
});
const split = await response.json();
Response: 200
{
"source_wallet": "MANAGED_SOURCE_WALLET",
"source_balance_lamports": 10000205000,
"fee_reserve_lamports": 205000,
"spendable_lamports": 10000000000,
"transfer_total_lamports": 10000000000,
"transfer_total_sol": "10.000000000",
"transfers": [
{"wallet": "DESTINATION_1", "lamports": 5000000000, "sol": "5.000000000", "mode": "equal"},
{"wallet": "DESTINATION_2", "lamports": 5000000000, "sol": "5.000000000", "mode": "equal"}
],
"signature": "SOLANA_SIGNATURE",
"confirmed": true,
"confirmation_status": "confirmed"
}
Mixed Split
This selects 50% of spendable SOL, sends 1 SOL to the first destination, sends 20% of the selected transfer total to the second destination, and sends the remaining selected SOL to the third destination.
Request
const response = await fetch("https://api.solanalaser.xyz/v1/sol/split/execute", {
method: "POST",
headers: {
"content-type": "application/json",
"x-api-key": "sl_your_key",
},
body: JSON.stringify({
source_wallet: "MANAGED_SOURCE_WALLET",
total_percent: 50,
destinations: [
{wallet: "DESTINATION_1", sol: "1"},
{wallet: "DESTINATION_2", percent: 20},
{wallet: "DESTINATION_3"}
],
}),
});
const split = await response.json();
Response: 200
{
"source_wallet": "MANAGED_SOURCE_WALLET",
"source_balance_lamports": 10000205000,
"fee_reserve_lamports": 205000,
"spendable_lamports": 10000000000,
"transfer_total_lamports": 5000000000,
"transfer_total_sol": "5.000000000",
"transfers": [
{"wallet": "DESTINATION_1", "lamports": 1000000000, "sol": "1.000000000", "mode": "fixed"},
{"wallet": "DESTINATION_2", "lamports": 1000000000, "sol": "1.000000000", "mode": "percent"},
{"wallet": "DESTINATION_3", "lamports": 3000000000, "sol": "3.000000000", "mode": "equal"}
],
"signature": "SOLANA_SIGNATURE",
"confirmed": true,
"confirmation_status": "confirmed"
}
Response Fields
| Field | Meaning |
|---|---|
source_wallet | Managed wallet that signed and paid for the split. |
source_balance_lamports | Source SOL balance before the split transaction. |
fee_reserve_lamports | Effective reserve after adding requested reserve, Sender tip, and priority fee reserve. |
spendable_lamports | Balance available after the effective reserve. |
transfer_total_lamports | Amount selected for distribution after applying total_percent. |
transfer_total_sol | Human-readable SOL version of transfer_total_lamports. |
transfers | Per-destination transfer list. |
transfers.wallet | Destination wallet. |
transfers.lamports | Lamports sent to that destination. |
transfers.sol | Human-readable SOL string for that destination. |
transfers.mode | fixed, percent, or equal. |
signature | Submitted Solana transaction signature. |
confirmed | true when confirmation polling observed the transaction. |
confirmation_status | RPC status such as processed, confirmed, or finalized; null when confirm: false. |
Common Errors
| HTTP | Detail | Meaning |
|---|---|---|
400 | destinations must contain between 1 and 5 wallets | Empty split or too many destinations. |
400 | each destination must use either percent or sol, not both | A destination supplied both allocation modes. |
400 | destination cannot be the source wallet | Split destination matches the source wallet. |
400 | destination wallets must be unique | Duplicate destination wallet. |
400 | source balance is too low after fee reserve | Source cannot cover the effective reserve. |
400 | total_percent must be greater than 0 and at most 100 | Invalid selected percentage. |
400 | destination percentages cannot exceed 100 | Percent destinations exceed the selected transfer total. |
400 | destination amounts exceed selected transfer total | Fixed SOL plus percent allocations exceed the selected total. |
400 | destination split does not consume selected transfer total | No equal destination exists to receive the remainder. |
400 | each destination must receive at least one lamport | Allocation rounded a destination to zero. |
502 | Sender or RPC detail | Upstream RPC, Sender, or confirmation failed. |