Skip to main content

Send Asset

POST /v1/sol/transfer/execute

Send Asset transfers native SOL, SPL Token, or Token-2022 assets from a SolanaLaser-managed wallet to any Solana wallet address.

The source wallet is server-signed. You do not pass a private key. If source_wallet is omitted, SolanaLaser uses the default managed wallet for the API key.

For token transfers, SolanaLaser derives the source and destination associated token accounts. If the recipient ATA does not exist, the transaction creates it idempotently before transferring the token.

Request

const response = await fetch("https://api.solanalaser.xyz/v1/sol/transfer/execute", {
method: "POST",
headers: {
"content-type": "application/json",
"x-api-key": "sl_your_key",
},
body: JSON.stringify({
source_wallet: "MANAGED_SOURCE_WALLET",
destination_wallet: "RECIPIENT_WALLET",
mint: "SOL",
amount: "0.25",
confirm: true,
}),
});

const transfer = await response.json();

Request Fields

FieldTypeRequiredMeaning
destination_walletstringYesRecipient wallet public key. It can be managed or external.
source_walletstringNoManaged wallet public key that sends the asset. Defaults to the API key's default wallet.
mintstringNoOmit or set to "SOL" for native SOL. Any other value must be an SPL Token or Token-2022 mint.
amountnumber or stringYesDecimal SOL for native SOL transfers. Token atomic units for SPL or Token-2022 transfers.
fee_reserve_lamportsintegerNoDefaults to 5000. Added to the Sender tip and priority fee to protect the source wallet from being fully drained.
confirmbooleanNoDefaults to true. If true, SolanaLaser waits for signature confirmation before responding.

Amount Rules

For SOL transfers, amount is SOL and can have up to 9 decimal places.

body: JSON.stringify({
destination_wallet: "RECIPIENT_WALLET",
amount: "0.25",
})

For token transfers, amount is the integer number of atomic token units. Do not send UI token decimals unless they already represent atomic units.

body: JSON.stringify({
destination_wallet: "RECIPIENT_WALLET",
mint: "TOKEN_MINT",
amount: "1000000",
})

If a token has 6 decimals, "1000000" atomic units equals 1.000000 token. The response includes decimals so you can format the amount in your UI.

Fee Reserve

The managed source wallet pays:

  • the transferred amount
  • Solana network fees
  • priority-fee compute budget
  • Helius Sender tip
  • recipient ATA rent when sending a token to a wallet without that ATA

fee_reserve_lamports is not the full reserve by itself. SolanaLaser adds the configured Sender tip and the current priority-fee estimate. The response returns the effective reserve in fee_reserve_lamports.

SOL Transfer

Request

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

const transfer = await response.json();

Response: 200

{
"source_wallet": "MANAGED_SOURCE_WALLET",
"destination_wallet": "RECIPIENT_WALLET",
"mint": "SOL",
"asset_type": "sol",
"amount": "0.25",
"amount_units": 250000000,
"decimals": 9,
"source_token_account": null,
"destination_token_account": null,
"fee_reserve_lamports": 205000,
"signature": "SOLANA_SIGNATURE",
"confirmed": true,
"confirmation_status": "confirmed"
}

SPL or Token-2022 Transfer

Request

const response = await fetch("https://api.solanalaser.xyz/v1/sol/transfer/execute", {
method: "POST",
headers: {
"content-type": "application/json",
"x-api-key": "sl_your_key",
},
body: JSON.stringify({
source_wallet: "MANAGED_SOURCE_WALLET",
destination_wallet: "RECIPIENT_WALLET",
mint: "TOKEN_MINT",
amount: "1000000",
}),
});

const transfer = await response.json();

Response: 200

{
"source_wallet": "MANAGED_SOURCE_WALLET",
"destination_wallet": "RECIPIENT_WALLET",
"mint": "TOKEN_MINT",
"asset_type": "spl_token",
"amount": "1000000",
"amount_units": 1000000,
"decimals": 6,
"source_token_account": "SOURCE_ASSOCIATED_TOKEN_ACCOUNT",
"destination_token_account": "DESTINATION_ASSOCIATED_TOKEN_ACCOUNT",
"fee_reserve_lamports": 205000,
"signature": "SOLANA_SIGNATURE",
"confirmed": true,
"confirmation_status": "confirmed"
}

Response Fields

FieldMeaning
source_walletManaged wallet that signed and paid for the transfer.
destination_walletRecipient wallet public key from the request.
mint"SOL" for native SOL, or the token mint address.
asset_type"sol" or "spl_token". Token-2022 transfers also return "spl_token" because the endpoint treats both as fungible token transfers.
amountOriginal request amount as text.
amount_unitsLamports for SOL, or token atomic units for token transfers.
decimals9 for SOL, or the token mint decimals from RPC.
source_token_accountSource ATA for token transfers, otherwise null.
destination_token_accountDestination ATA for token transfers, otherwise null.
fee_reserve_lamportsEffective reserve left behind for fees and Sender tip.
signatureSubmitted Solana transaction signature.
confirmedtrue when confirmation polling observed the transaction.
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.
400destination wallet cannot be the source walletSource and destination are the same address.
400source balance is too low after fee reserveSOL transfer would not leave enough SOL for the effective reserve.
400invalid token mint addressmint is not a valid public key.
400token mint was not foundRPC could not find the token mint account.
400mint must be owned by the SPL Token or Token-2022 programMint is not a supported fungible token mint.
400source wallet has no associated token accountSource wallet does not hold this token in its ATA.
400source token balance is too lowSource ATA balance is below amount_units.
400token amount must be a positive integerToken amount was zero or not an integer atomic-unit amount.
502Sender or RPC detailUpstream RPC, Sender, or confirmation failed.