exchange.IO("receipt", ...)
On a Jupiter exchange object, query the status of a Solana transaction, optionally waiting until it is confirmed.
exchange.IO(k, signature)
exchange.IO(k, signature, waitMs)Examples
Query the transaction status of an order.
javascript
function main() {
var id = exchange.CreateOrder("SOL_USDC", "sell", -1, 0.1)
if (!id) return
var r = exchange.IO("receipt", String(id).split(",")[1], 60000)
Log(r.state, r.fee)
}Returns
| Type | Description |
object / null value | Returns |
Arguments
| Name | Type | Required | Description |
k | string | Yes | Selects what the |
signature | string | Yes | Transaction signature. For an order, pass the part after the comma in the order ID. |
waitMs | number | No | Maximum wait time in milliseconds (at most 600000); the function returns early once the transaction is confirmed or fails. Omit it to check without waiting. |
See Also