Type/to search
Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
Capability Matrix
Centralized Exchanges
Decentralized Exchanges (DEX)
Prediction Markets
Securities and Futures
On-chain & Custom

Transfer SOL out of the wallet of a Jupiter exchange object.

exchange.IO(k, to, amount)

Examples

Transfer 0.1 SOL and wait for confirmation.

javascript
function main() { var r = exchange.IO("transfer", "RECIPIENT_ADDRESS", 0.1) if (!r) { Log("Transfer failed:", GetLastError()) return } Log(exchange.IO("receipt", r.signature, 60000)) }

Returns

TypeDescription

object / null value

When the broadcast succeeds, returns {signature, amount, lastValidBlockHeight}. signature is the transaction signature; use exchange.IO("receipt", ...) to check whether it has landed. A null value is returned for an invalid address, an insufficient balance or a failed broadcast.

Arguments

NameTypeRequiredDescription

k

string

Yes

Selects what the exchange.IO() function does. Set it to transfer to make a transfer.

to

string

Yes

Recipient's Solana address.

amount

number / string

Yes

Amount of SOL; pass all to transfer the whole balance (minus the fee).

See Also

Remarks

Only SOL can be transferred; other tokens are not supported yet. After transferring the whole balance the wallet can no longer pay swap fees.