List or sync your orders
const url = 'https://api.hyperstream.dev/v3/orders?sort=updatedAt&cursor=1041';const options = {method: 'GET', headers: {'API-Revision': '0', 'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.hyperstream.dev/v3/orders?sort=updatedAt&cursor=1041' \ --header 'API-Revision: 0' \ --header 'X-API-Key: <X-API-Key>'Your orders, in pages of up to 50, with the filters you pass. Repeat status to list orders in any of several.
sort=createdAt, the default: newest first.cursoris null after the last page. Stop only then: a page before it can come back empty.sort=updatedAt: sync. Each page holds the orders that changed after the cursor, each once and in its current state, oldest change first. Keep the last cursor. You are caught up once a page comes back empty with the cursor you sent: ask again later. An empty page with a new cursor means ask again now. A cursor that can no longer be used answers410 CURSOR_EXPIRED: sync again with no cursor, which returns every order in its current state. A cursor doesn’t expire with time.statuscan’t be used here, since an order that left the status would never be listed again.
Keep the sort and filters unchanged while paging.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”The revision of v3 the request is built against. Without it, the revision that was current when your integration was set up. An unknown value is a 400 VALIDATION_FAILED naming API-Revision.
Query Parameters
Section titled “Query Parameters”confirming: the deposit is seen and the order is publishing. trading: published, solvers can fill it. settling: trading ended. delivering: the hub has settled, and a leg can still be on its way. done: every leg delivered. expired: the order didn’t publish by fillBy, and routine polling can stop; a deposit that came for it shows as the NOT_PUBLISHED notice, and Khalani refunds it by hand. Once refunded, the order shows the refund in summary.refund, delivering and then done, or straight to done if delivery is already confirmed.
Only orders in this status, or in any of the statuses given by repeating it. Not with sort=updatedAt.
CAIP-10 account. Only orders in which it is the payer, the recipient or the refund account.
CAIP-19 id. Only orders that send this asset.
CAIP-19 id. Only orders that receive this asset.
createdAt: newest first. updatedAt: oldest change first, each order once, in its current state: sync.
Example
updatedAtcursor from the previous page, with the same sort and filters.
Example
1041Responses
Section titled “Responses”A page of orders.
The caller’s orders, newest first or in order of last change.
object
One order in the chain-neutral model.
object
ord_… for a v3 order; the hex protocolId for an order built through /v2.
Keccak256(depositor, nonce): the id /v2 and the chain use.
Rises with every change to the order. Of two reads, keep the one with the higher version: two with the same version show the same order.
RFC 3339 UTC time.
RFC 3339 UTC time.
confirming: the deposit is seen and the order is publishing. trading: published, solvers can fill it. settling: trading ended. delivering: the hub has settled, and a leg can still be on its way. done: every leg delivered. expired: the order didn’t publish by fillBy, and routine polling can stop; a deposit that came for it shows as the NOT_PUBLISHED notice, and Khalani refunds it by hand. Once refunded, the order shows the refund in summary.refund, delivering and then done, or straight to done if delivery is already confirmed.
object
What Khalani is handling, to tell the user. Nothing for the user or the integrator to do.
object
Open list, e.g. DELIVERY_STUCK.
object
What the recipient is paid. Show it once its amount is above zero.
object
pending until the hub settles, in_flight while the leg is on its way, completed once it lands.
What comes back to refundTo. Show it once its amount is above zero.
object
pending until the hub settles, in_flight while the leg is on its way, completed once it lands.
object
object
object
CAIP-19 asset id.
CAIP-2 chain id.
Base units.
object
CAIP-19 asset id.
CAIP-2 chain id.
The deadline the order is signed with.
How to fund the order. Steps stay pending until the order shows the deposit or publishes, so a step still listed may have been sent: send one again only if your own transaction failed.
object
What the step does: approve_reset clears a leftover allowance, approve sets the allowance, deposit makes the deposit and transfer pays a TRON, Stellar or Solana deposit address.
signature is reserved.
closed: funding closed at fundBy before the deposit showed, or Khalani couldn’t take a TRON, Stellar or Solana transfer (NOT_PUBLISHED). refresh_required and submitted are reserved.
CAIP-2 chain id.
Open list: payer, or anyone.
object
object
The payer: send the call from this account. A deposit from any other isn’t credited to the order and waits for a manual refund.
Wei sent with the call. A deposit’s is the relay fee when the order was created, plus the amount for a native coin: if the fee rises before it lands, it reverts.
Send the call with this gas limit.
object
For Solana, this is the wallet owner: derive the owner’s ATA for the asset’s mint under the standard SPL Token program, create it idempotently if absent (sender pays rent), and send one exact payment without memo, split or top-up. For Zcash, pay the exact amount in one transparent output, with no memo or OP_RETURN. Otherwise pay exactly this address, with no memo. A Stellar deposit address is a muxed M… address: a payment to its G… account, or one with a memo, is not credited.
object
CAIP-2 chain id.
object
object
CAIP-19 asset id.
CAIP-2 chain id.
Base units.
object
object
object
CAIP-2 chain id.
object
object
CAIP-19 asset id.
CAIP-2 chain id.
Base units.
object
CAIP-2 chain id.
detected and dropped are reserved.
RFC 3339 UTC time.
object
The solved intent.
When the hub solved it, or, when the hub gave no time, when Khalani saw it.
object
return is reserved.
The last three are reserved.
object
CAIP-2 chain id.
object
object
CAIP-2 chain id.
RFC 3339 UTC time.
Cancel requests made through this API: at most one per order.
object
pending until the order stops trading: then accepted if it stopped short of a full fill, or rejected, with ORDER_OVERTAKEN, if a full fill got there first.
object
CAIP-2 chain id.
RFC 3339 UTC time.
object
object
object
What signer signs with its wallet’s sign-message call, for POST /orders/{id}/actions: personal_sign for eip191_cancel_proof, TronWeb’s signMessageV2 for tip191_cancel_proof, and a SEP-53 call such as Freighter’s signMessage for sep53_cancel_proof. The same on every read.
Pass it back for the next page. Newest first, it is null after the last page. In order of last change it is never null: you are caught up once a page comes back empty with the cursor you sent, so keep it and ask again later. An empty page with a new cursor means ask again now.
Example
{ "orders": [ { "id": "ord_3f9a1c2b7d4e5f60718293a4b5c6d7e8", "protocolId": "0x35dc8d390877c71baacadb4001eea0055804cfc306f599fbfc97c1d69d64d30a", "version": 3, "createdAt": "2026-08-17T20:48:20Z", "updatedAt": "2026-08-17T20:49:05Z", "status": "trading", "outcome": null, "liveAt": "2026-08-17T20:49:05Z", "summary": { "actionNeeded": null, "notices": [], "payout": { "amount": null, "status": "pending", "tx": null, "withoutTx": null }, "refund": { "amount": null, "status": "pending", "tx": null, "withoutTx": null }, "pollAfterSeconds": 15 }, "terms": { "send": { "asset": { "id": "eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "chain": "eip155:42161", "symbol": "USDC", "decimals": 6 }, "amount": "100000000" }, "receiveAsset": { "id": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "chain": "eip155:8453", "symbol": "USDC", "decimals": 6 }, "minRate": "0.99620254", "slippageBps": 0, "fundBy": "2026-08-17T21:28:20Z", "fillBy": "2026-08-17T21:48:20Z", "receive": { "asset": { "id": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "chain": "eip155:8453", "symbol": "USDC", "decimals": 6 }, "amount": "99620254" }, "receiveMin": { "asset": { "id": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "chain": "eip155:8453", "symbol": "USDC", "decimals": 6 }, "amount": "99620254" }, "flatFee": { "asset": { "id": "eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "chain": "eip155:42161", "symbol": "USDC", "decimals": 6 }, "amount": "300000" } }, "accounts": { "payer": { "chain": "eip155:42161", "address": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4" }, "recipient": { "chain": "eip155:8453", "address": "0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2" }, "refundTo": { "chain": "eip155:42161", "address": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4" } }, "steps": [ { "id": "approve", "type": "transaction", "status": "completed", "chain": "eip155:42161", "actor": "payer", "executor": { "chain": "eip155:42161", "address": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4" }, "instruction": { "format": "evm_call", "payload": { "chainId": 42161, "from": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4", "to": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "data": "0x095ea7b300000000000000000000000011111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000005f5e100", "value": "0", "gasLimit": "100000" }, "approval": { "spender": "0x1111111111111111111111111111111111111111", "amount": { "asset": { "id": "eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "chain": "eip155:42161", "symbol": "USDC", "decimals": 6 }, "amount": "100000000" } }, "allowance": null } }, { "id": "deposit", "type": "transaction", "status": "completed", "chain": "eip155:42161", "actor": "payer", "executor": { "chain": "eip155:42161", "address": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4" }, "instruction": { "format": "evm_call", "payload": { "chainId": 42161, "from": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4", "to": "0x1111111111111111111111111111111111111111", "data": "0xf3125a1f000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e58310000000000000000000000000000000000000000000000000000000005f5e100", "value": "100000000000000", "gasLimit": "250000" }, "approval": null, "allowance": { "spender": "0x1111111111111111111111111111111111111111", "amount": { "asset": { "id": "eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "chain": "eip155:42161", "symbol": "USDC", "decimals": 6 }, "amount": "100000000" } } } } ], "receipts": [ { "id": "deposit_receipt", "tx": { "chain": "eip155:42161", "hash": "0xa37fc5f866fdd03a6443129b95f5a328eba3a36b0c4d68c467849e846775a04d" }, "amount": { "asset": { "id": "eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "chain": "eip155:42161", "symbol": "USDC", "decimals": 6 }, "amount": "100000000" }, "from": [ { "chain": "eip155:42161", "address": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4" } ], "observation": "final", "at": "2026-08-17T20:48:40Z" } ], "fills": [], "obligations": [ { "id": "payout", "kind": "payout", "status": "pending", "to": { "chain": "eip155:8453", "address": "0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2" }, "amount": null, "evidence": [], "problem": null }, { "id": "refund", "kind": "refund", "status": "pending", "to": { "chain": "eip155:42161", "address": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4" }, "amount": null, "evidence": [], "problem": null } ], "invocations": [], "requirements": [], "actions": { "cancel": { "available": true, "reason": null, "signer": { "chain": "eip155:42161", "address": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4" }, "proof": { "format": "eip191_cancel_proof", "message": "Cancel Khalani order ord_3f9a1c2b7d4e5f60718293a4b5c6d7e8\nChain: eip155:42161\nRefund to: 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4" } } }, "charges": null } ], "cursor": "1042"}VALIDATION_FAILED (including status with sort=updatedAt, a cursor from the other sort, or a query parameter the route doesn’t take), ACCOUNT_INVALID or UNSUPPORTED_ASSET.
Every v3 error, whatever the route.
object
Open list: handle a code you don’t know by its recovery.
VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.
object
object
The field at fault, as a dotted path.
Open list.
AMOUNT_TOO_SMALL’s and AMOUNT_TOO_LARGE’s details: the send.amount range that would quote.
object
ACTION_UNAVAILABLE’s details: why the action can’t run.
object
Open list: actions.cancel.reason.code, or ORDER_OVERTAKEN.
object
The request field at fault, as a dotted path.
What to do next, whatever the code: fix_request (change the request), requote (get a new quote), retry (send the same request again), read_order (read the order to see where it stands), restart_sync (sync again with no cursor) or contact_support (with requestId).
Example
{ "code": "VALIDATION_FAILED", "message": "status can't filter a list in order of last change", "details": null, "field": "status", "recovery": "fix_request", "retryAfterSeconds": null, "requestId": "6f1d2c3b-4a5e-4f60-8718-293a4b5c6d7e"}UNAUTHENTICATED: the X-API-Key header is missing.
Every v3 error, whatever the route.
object
Open list: handle a code you don’t know by its recovery.
VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.
object
object
The field at fault, as a dotted path.
Open list.
AMOUNT_TOO_SMALL’s and AMOUNT_TOO_LARGE’s details: the send.amount range that would quote.
object
ACTION_UNAVAILABLE’s details: why the action can’t run.
object
Open list: actions.cancel.reason.code, or ORDER_OVERTAKEN.
object
The request field at fault, as a dotted path.
What to do next, whatever the code: fix_request (change the request), requote (get a new quote), retry (send the same request again), read_order (read the order to see where it stands), restart_sync (sync again with no cursor) or contact_support (with requestId).
Example
{ "code": "UNAUTHENTICATED", "message": "X-API-Key required", "details": null, "field": null, "recovery": "fix_request", "retryAfterSeconds": null, "requestId": "6f1d2c3b-4a5e-4f60-8718-293a4b5c6d7e"}FORBIDDEN: the key is unknown or inactive, or your terms can’t be used. It is about your account: don’t retry.
Every v3 error, whatever the route.
object
Open list: handle a code you don’t know by its recovery.
VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.
object
object
The field at fault, as a dotted path.
Open list.
AMOUNT_TOO_SMALL’s and AMOUNT_TOO_LARGE’s details: the send.amount range that would quote.
object
ACTION_UNAVAILABLE’s details: why the action can’t run.
object
Open list: actions.cancel.reason.code, or ORDER_OVERTAKEN.
object
The request field at fault, as a dotted path.
What to do next, whatever the code: fix_request (change the request), requote (get a new quote), retry (send the same request again), read_order (read the order to see where it stands), restart_sync (sync again with no cursor) or contact_support (with requestId).
Example
{ "code": "FORBIDDEN", "message": "Unknown or inactive integrator", "details": null, "field": null, "recovery": "contact_support", "retryAfterSeconds": null, "requestId": "6f1d2c3b-4a5e-4f60-8718-293a4b5c6d7e"}CURSOR_EXPIRED: a cursor the API can no longer use, such as one from another environment or from before a restore. Sync again with no cursor, which returns every order in its current state, and continue from the cursor it gives.
Every v3 error, whatever the route.
object
Open list: handle a code you don’t know by its recovery.
VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.
object
object
The field at fault, as a dotted path.
Open list.
AMOUNT_TOO_SMALL’s and AMOUNT_TOO_LARGE’s details: the send.amount range that would quote.
object
ACTION_UNAVAILABLE’s details: why the action can’t run.
object
Open list: actions.cancel.reason.code, or ORDER_OVERTAKEN.
object
The request field at fault, as a dotted path.
What to do next, whatever the code: fix_request (change the request), requote (get a new quote), retry (send the same request again), read_order (read the order to see where it stands), restart_sync (sync again with no cursor) or contact_support (with requestId).
Example
{ "code": "CURSOR_EXPIRED", "message": "This cursor can no longer be used; sync again with no cursor", "details": null, "field": "cursor", "recovery": "restart_sync", "retryAfterSeconds": null, "requestId": "6f1d2c3b-4a5e-4f60-8718-293a4b5c6d7e"}RATE_LIMITED: too many requests from your IP, or, on quote and create-order, from your integrator. Retry after retryAfterSeconds.
Every v3 error, whatever the route.
object
Open list: handle a code you don’t know by its recovery.
VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.
object
object
The field at fault, as a dotted path.
Open list.
AMOUNT_TOO_SMALL’s and AMOUNT_TOO_LARGE’s details: the send.amount range that would quote.
object
ACTION_UNAVAILABLE’s details: why the action can’t run.
object
Open list: actions.cancel.reason.code, or ORDER_OVERTAKEN.
object
The request field at fault, as a dotted path.
What to do next, whatever the code: fix_request (change the request), requote (get a new quote), retry (send the same request again), read_order (read the order to see where it stands), restart_sync (sync again with no cursor) or contact_support (with requestId).
Example
{ "code": "RATE_LIMITED", "message": "Too many requests, retry later", "details": null, "field": null, "recovery": "retry", "retryAfterSeconds": 60, "requestId": "6f1d2c3b-4a5e-4f60-8718-293a4b5c6d7e"}Headers
Section titled “Headers”Seconds to wait.
INTERNAL: an unexpected failure that sending the request again won’t fix. Contact Khalani with requestId.
Every v3 error, whatever the route.
object
Open list: handle a code you don’t know by its recovery.
VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.
object
object
The field at fault, as a dotted path.
Open list.
AMOUNT_TOO_SMALL’s and AMOUNT_TOO_LARGE’s details: the send.amount range that would quote.
object
ACTION_UNAVAILABLE’s details: why the action can’t run.
object
Open list: actions.cancel.reason.code, or ORDER_OVERTAKEN.
object
The request field at fault, as a dotted path.
What to do next, whatever the code: fix_request (change the request), requote (get a new quote), retry (send the same request again), read_order (read the order to see where it stands), restart_sync (sync again with no cursor) or contact_support (with requestId).
Example
{ "code": "INTERNAL", "message": "Internal error", "details": null, "field": null, "recovery": "contact_support", "retryAfterSeconds": null, "requestId": "6f1d2c3b-4a5e-4f60-8718-293a4b5c6d7e"}UPSTREAM_UNAVAILABLE: our storage is briefly unavailable. Send the same request again after retryAfterSeconds.
Every v3 error, whatever the route.
object
Open list: handle a code you don’t know by its recovery.
VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.
object
object
The field at fault, as a dotted path.
Open list.
AMOUNT_TOO_SMALL’s and AMOUNT_TOO_LARGE’s details: the send.amount range that would quote.
object
ACTION_UNAVAILABLE’s details: why the action can’t run.
object
Open list: actions.cancel.reason.code, or ORDER_OVERTAKEN.
object
The request field at fault, as a dotted path.
What to do next, whatever the code: fix_request (change the request), requote (get a new quote), retry (send the same request again), read_order (read the order to see where it stands), restart_sync (sync again with no cursor) or contact_support (with requestId).
Example
{ "code": "UPSTREAM_UNAVAILABLE", "message": "Storage is briefly unavailable; send the same request again", "details": null, "field": null, "recovery": "retry", "retryAfterSeconds": 1, "requestId": "6f1d2c3b-4a5e-4f60-8718-293a4b5c6d7e"}Headers
Section titled “Headers”Seconds to wait.