exchange.IO("transfer", ...)
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
| Type | Description |
object / null value | When the broadcast succeeds, returns |
Arguments
| Name | Type | Required | Description |
k | string | Yes | Selects what the |
to | string | Yes | Recipient's Solana address. |
amount | number / string | Yes | Amount of SOL; pass |
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.