Skip to main content

POST /wallets/transfer

Transfer SOL or an SPL token from a user-owned wallet.

Sync — waits for tx confirmation and returns the signature. Creates the destination ATA on SPL transfers if missing (sender pays rent).

Use case​

Consolidating balances between user wallets, funding sniper wallets before a launch, or withdrawing to an external address.

Body​

FieldTypeRequiredDescription
fromWalletstringyesSource pubkey; must be user-owned.
toWalletstringyesDestination pubkey. Cannot equal fromWallet.
tokenAddressstringnoToken mint. Omit for native SOL.
amountnumberconditionalRequired unless sendAllFunds: true. UI units (1.5 = 1.5 SOL / tokens).
sendAllFundsbooleannoSend full balance minus fee reserve; ignores amount.

For SPL transfers the destination ATA is created by the sender if missing (sender pays the ATA rent).

Response 200​

{ "message": "Transfer successful", "signature": "3k…" }

Errors​

StatusMeaning
400Invalid addresses, amount out of range, insufficient balance, or self-transfer.
404Source wallet not found / not owned.

Examples​

SOL:

curl -X POST "$BASE_URL/wallets/transfer" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID" \
-H "Content-Type: application/json" \
-d '{ "fromWallet": "…", "toWallet": "…", "amount": 0.1 }'

SPL, send everything:

curl -X POST "$BASE_URL/wallets/transfer" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID" \
-H "Content-Type: application/json" \
-d '{ "fromWallet": "…", "toWallet": "…", "tokenAddress": "<mint>", "sendAllFunds": true }'