Skip to content
API reference

Cancel an order

POST
/v3/orders/{id}/actions
curl --request POST \
--url https://api.hyperstream.dev/v3/orders/ord_3f9a1c2b7d4e5f60718293a4b5c6d7e8/actions \
--header 'API-Revision: 0' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "kind": "cancel", "signature": "0x60ce0a47bc64e07a5437de5fd4e6008bce46756d4d7c971710283924888b2a137a91ed09461b5848bb2b7341f5c258da3f97853e73662275f047e0c3c20882211b" }'

Cancels the order early with refundTo’s signature over actions.cancel.proof.message. Any filled part is paid out and the rest refunded to refundTo, less the flat fee. The message has no nonce or expiry, so the same signature can always be sent again: after a lost answer, or after an error whose recovery is retry.

The order Answer
Trading, with no cancel yet 202: relayed, and the request is pending in invocations
A cancel recorded already 200, without a second relay, however the order went since
Stopped short of a full fill, with no cancel recorded 409 ACTION_UNAVAILABLE with details.reason TRADING_ENDED
Filled in full, with no cancel recorded 409 ACTION_UNAVAILABLE with details.reason ORDER_OVERTAKEN
Not published yet, or early cancel disabled 409 ACTION_UNAVAILABLE with the reason
The settlement service is unavailable or hasn’t seen the order yet, a contract refundTo’s chain can’t be read, or storage is briefly unavailable 503 UPSTREAM_UNAVAILABLE: the cancel may have gone through

A 200 or 202 means the cancel is recorded, and invocations says how it went: pending, then accepted once the order stops short of a full fill, or rejected with ORDER_OVERTAKEN if a full fill got there first. After a 503 or a lost answer, send the same signature again: a 409 TRADING_ENDED then means the order stopped without a recorded cancel, so read it to see how it ended. Any other refusal from the settlement service is a 500 INTERNAL.

id
required
string

A v3 order’s ord_ id, or any order’s 0x protocol id, /v2 orders included.

Example

ord_3f9a1c2b7d4e5f60718293a4b5c6d7e8
API-Revision
string
Allowed values: 0

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.

Media typeapplication/json
object
kind
required

Cancel the order early: the unfilled part is refunded.

string
Allowed value: cancel
signature
required

actions.cancel.signer’s signature over actions.cancel.proof.message, as its wallet returns it. EIP-191: 65 bytes from a key, or a contract wallet’s EIP-1271 signature of any length (0x from a Safe that approved the message on chain), in 0x-prefixed hex. TIP-191: 65 bytes in 0x-prefixed hex. SEP-53: 64 bytes in base64 or 0x-prefixed hex.

string
<= 8194 characters /^(0x([0-9a-fA-F]{2})*|[A-Za-z0-9+/]{86}==)$/

Example

{
"kind": "cancel",
"signature": "0x60ce0a47bc64e07a5437de5fd4e6008bce46756d4d7c971710283924888b2a137a91ed09461b5848bb2b7341f5c258da3f97853e73662275f047e0c3c20882211b"
}

A cancel was recorded already: the order, with how it went in invocations. The signature isn’t checked again.

Media typeapplication/json

One order in the chain-neutral model.

object
id
required

ord_… for a v3 order; the hex protocolId for an order built through /v2.

string
protocolId
required

Keccak256(depositor, nonce): the id /v2 and the chain use.

string
/^0x[0-9a-f]{64}$/
version
required

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.

integer
createdAt
required

RFC 3339 UTC time.

string
updatedAt
required

RFC 3339 UTC time.

string
status
required

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.

string
Allowed values: awaiting_funding confirming trading settling delivering done expired
outcome
required
Any of:
string
Allowed values: none partial full
liveAt
required
Any of:

RFC 3339 UTC time.

string
summary
required
object
actionNeeded
required
Any of:
object
kind
required
Any of:
string
Allowed values: send_transaction send_transfer sign
executor
required
Any of:
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
steps
required

The ids of the steps to run now, in order.

Array<string>
notices
required

What Khalani is handling, to tell the user. Nothing for the user or the integrator to do.

Array<object>
object
code
required

Open list, e.g. DELIVERY_STUCK.

string
params
required
object
key
additional properties
payout
required

What the recipient is paid. Show it once its amount is above zero.

object
amount
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
status
required

pending until the hub settles, in_flight while the leg is on its way, completed once it lands.

string
Allowed values: pending in_flight completed
tx
required
Any of:
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
hash
required
string
withoutTx
required
Any of:
Any of:
string
Allowed values: sub_unit_amount tx_unknown
refund
required

What comes back to refundTo. Show it once its amount is above zero.

object
amount
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
status
required

pending until the hub settles, in_flight while the leg is on its way, completed once it lands.

string
Allowed values: pending in_flight completed
tx
required
Any of:
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
hash
required
string
withoutTx
required
Any of:
Any of:
string
Allowed values: sub_unit_amount tx_unknown
pollAfterSeconds
required
Any of:
integer
> 0
terms
required
object
send
required
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
receiveAsset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
minRate
required
Any of:

The least a full fill pays per token sent, in whole tokens, fees included.

string
/^\d+(\.\d+)?$/
slippageBps
required
integer
fundBy
required
Any of:

RFC 3339 UTC time.

string
fillBy
required

The deadline the order is signed with.

string
receive
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
receiveMin
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
flatFee
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
accounts
required
object
payer
required
Any of:
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
recipient
required
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
refundTo
required
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
steps
required

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.

Array<object>
object
id
required

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.

string
Allowed values: approve_reset approve deposit transfer
type
required

signature is reserved.

string
Allowed values: transfer transaction signature
status
required

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.

string
Allowed values: pending refresh_required submitted completed closed
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
actor
required

Open list: payer, or anyone.

string
executor
required
Any of:
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
instruction
required
Any of:
object
format
required
string
Allowed value: evm_call
payload
required
object
chainId
required
integer
from
required

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.

string
to
required
string
data
required
string
value
required

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.

string
/^\d+$/
gasLimit
required

Send the call with this gas limit.

string
/^\d+$/
approval
required
Any of:
object
spender
required
string
amount
required
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
allowance
required
Any of:
object
spender
required
string
amount
required
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
receipts
required
Array<object>
object
id
required
string
tx
required
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
hash
required
string
amount
required
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
from
required
Array<object>
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
observation
required

detected and dropped are reserved.

string
Allowed values: detected included final dropped
at
required

RFC 3339 UTC time.

string
fills
required
Array<object>
object
id
required

The solved intent.

string
at
required

When the hub solved it, or, when the hub gave no time, when Khalani saw it.

string
send
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
receive
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
obligations
required
Array<object>
object
id
required
string
kind
required

return is reserved.

string
Allowed values: payout refund return
status
required

The last three are reserved.

string
Allowed values: pending in_flight completed superseded written_off voided
to
required
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
amount
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
evidence
required
Array<object>
object
tx
required
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
hash
required
string
at
required

RFC 3339 UTC time.

string
problem
required
Any of:
object
code
required

Open list.

string
message
required
string
details
required
Any of:
object
key
additional properties
invocations
required

Cancel requests made through this API: at most one per order.

Array<object>
object
id
required
string
kind
required
string
Allowed values: cancel
status
required

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.

string
Allowed values: pending accepted rejected
signer
required
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
at
required

RFC 3339 UTC time.

string
problem
required
Any of:
object
code
required

Open list.

string
message
required
string
details
required
Any of:
object
key
additional properties
requirements
required
Array<object>
object
id
required
string
code
required

Open list.

string
message
required
string
blocks
required

publication, settlement and delivery are sent; the others are reserved.

string
Allowed values: funding publication settlement delivery reconciliation closure
actionBy
required

Open list, e.g. khalani.

string
details
required
Any of:
object
key
additional properties
actions
required
object
cancel
required
object
available
required
boolean
reason
required
Any of:
object
code
required

Open list.

string
message
required
string
details
required
Any of:
object
key
additional properties
signer
required
Any of:
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
proof
required
Any of:
object
format
required
Any of:
string
Allowed values: eip191_cancel_proof tip191_cancel_proof sep53_cancel_proof
message
required

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.

string
charges
required
Any of:
object
protocolFee
required
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/

Example

{
"id": "ord_3f9a1c2b7d4e5f60718293a4b5c6d7e8",
"protocolId": "0x35dc8d390877c71baacadb4001eea0055804cfc306f599fbfc97c1d69d64d30a",
"version": 6,
"createdAt": "2026-08-17T20:48:20Z",
"updatedAt": "2026-08-17T20:49:20Z",
"status": "settling",
"outcome": "none",
"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": [
{
"id": "cancel",
"kind": "cancel",
"status": "accepted",
"signer": {
"chain": "eip155:42161",
"address": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4"
},
"at": "2026-08-17T20:49:20Z",
"problem": null
}
],
"requirements": [],
"actions": {
"cancel": {
"available": false,
"reason": {
"code": "TRADING_ENDED",
"message": "The order has stopped trading",
"details": null
},
"signer": {
"chain": "eip155:42161",
"address": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4"
},
"proof": null
}
},
"charges": null
}

The cancel is on its way.

Media typeapplication/json

One order in the chain-neutral model.

object
id
required

ord_… for a v3 order; the hex protocolId for an order built through /v2.

string
protocolId
required

Keccak256(depositor, nonce): the id /v2 and the chain use.

string
/^0x[0-9a-f]{64}$/
version
required

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.

integer
createdAt
required

RFC 3339 UTC time.

string
updatedAt
required

RFC 3339 UTC time.

string
status
required

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.

string
Allowed values: awaiting_funding confirming trading settling delivering done expired
outcome
required
Any of:
string
Allowed values: none partial full
liveAt
required
Any of:

RFC 3339 UTC time.

string
summary
required
object
actionNeeded
required
Any of:
object
kind
required
Any of:
string
Allowed values: send_transaction send_transfer sign
executor
required
Any of:
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
steps
required

The ids of the steps to run now, in order.

Array<string>
notices
required

What Khalani is handling, to tell the user. Nothing for the user or the integrator to do.

Array<object>
object
code
required

Open list, e.g. DELIVERY_STUCK.

string
params
required
object
key
additional properties
payout
required

What the recipient is paid. Show it once its amount is above zero.

object
amount
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
status
required

pending until the hub settles, in_flight while the leg is on its way, completed once it lands.

string
Allowed values: pending in_flight completed
tx
required
Any of:
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
hash
required
string
withoutTx
required
Any of:
Any of:
string
Allowed values: sub_unit_amount tx_unknown
refund
required

What comes back to refundTo. Show it once its amount is above zero.

object
amount
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
status
required

pending until the hub settles, in_flight while the leg is on its way, completed once it lands.

string
Allowed values: pending in_flight completed
tx
required
Any of:
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
hash
required
string
withoutTx
required
Any of:
Any of:
string
Allowed values: sub_unit_amount tx_unknown
pollAfterSeconds
required
Any of:
integer
> 0
terms
required
object
send
required
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
receiveAsset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
minRate
required
Any of:

The least a full fill pays per token sent, in whole tokens, fees included.

string
/^\d+(\.\d+)?$/
slippageBps
required
integer
fundBy
required
Any of:

RFC 3339 UTC time.

string
fillBy
required

The deadline the order is signed with.

string
receive
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
receiveMin
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
flatFee
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
accounts
required
object
payer
required
Any of:
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
recipient
required
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
refundTo
required
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
steps
required

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.

Array<object>
object
id
required

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.

string
Allowed values: approve_reset approve deposit transfer
type
required

signature is reserved.

string
Allowed values: transfer transaction signature
status
required

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.

string
Allowed values: pending refresh_required submitted completed closed
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
actor
required

Open list: payer, or anyone.

string
executor
required
Any of:
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
instruction
required
Any of:
object
format
required
string
Allowed value: evm_call
payload
required
object
chainId
required
integer
from
required

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.

string
to
required
string
data
required
string
value
required

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.

string
/^\d+$/
gasLimit
required

Send the call with this gas limit.

string
/^\d+$/
approval
required
Any of:
object
spender
required
string
amount
required
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
allowance
required
Any of:
object
spender
required
string
amount
required
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
receipts
required
Array<object>
object
id
required
string
tx
required
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
hash
required
string
amount
required
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
from
required
Array<object>
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
observation
required

detected and dropped are reserved.

string
Allowed values: detected included final dropped
at
required

RFC 3339 UTC time.

string
fills
required
Array<object>
object
id
required

The solved intent.

string
at
required

When the hub solved it, or, when the hub gave no time, when Khalani saw it.

string
send
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
receive
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
obligations
required
Array<object>
object
id
required
string
kind
required

return is reserved.

string
Allowed values: payout refund return
status
required

The last three are reserved.

string
Allowed values: pending in_flight completed superseded written_off voided
to
required
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
amount
required
Any of:
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/
evidence
required
Array<object>
object
tx
required
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
hash
required
string
at
required

RFC 3339 UTC time.

string
problem
required
Any of:
object
code
required

Open list.

string
message
required
string
details
required
Any of:
object
key
additional properties
invocations
required

Cancel requests made through this API: at most one per order.

Array<object>
object
id
required
string
kind
required
string
Allowed values: cancel
status
required

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.

string
Allowed values: pending accepted rejected
signer
required
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
at
required

RFC 3339 UTC time.

string
problem
required
Any of:
object
code
required

Open list.

string
message
required
string
details
required
Any of:
object
key
additional properties
requirements
required
Array<object>
object
id
required
string
code
required

Open list.

string
message
required
string
blocks
required

publication, settlement and delivery are sent; the others are reserved.

string
Allowed values: funding publication settlement delivery reconciliation closure
actionBy
required

Open list, e.g. khalani.

string
details
required
Any of:
object
key
additional properties
actions
required
object
cancel
required
object
available
required
boolean
reason
required
Any of:
object
code
required

Open list.

string
message
required
string
details
required
Any of:
object
key
additional properties
signer
required
Any of:
object
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
address
required
string
proof
required
Any of:
object
format
required
Any of:
string
Allowed values: eip191_cancel_proof tip191_cancel_proof sep53_cancel_proof
message
required

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.

string
charges
required
Any of:
object
protocolFee
required
object
asset
required
object
id
required

CAIP-19 asset id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$/
chain
required

CAIP-2 chain id.

string
/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/
symbol
required
string
decimals
required
integer
amount
required

Base units.

string
/^\d+$/

Example

{
"id": "ord_3f9a1c2b7d4e5f60718293a4b5c6d7e8",
"protocolId": "0x35dc8d390877c71baacadb4001eea0055804cfc306f599fbfc97c1d69d64d30a",
"version": 4,
"createdAt": "2026-08-17T20:48:20Z",
"updatedAt": "2026-08-17T20:49:20Z",
"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": [
{
"id": "cancel",
"kind": "cancel",
"status": "pending",
"signer": {
"chain": "eip155:42161",
"address": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4"
},
"at": "2026-08-17T20:49:20Z",
"problem": null
}
],
"requirements": [],
"actions": {
"cancel": {
"available": false,
"reason": {
"code": "CANCEL_PENDING",
"message": "A cancel is already on its way",
"details": null
},
"signer": {
"chain": "eip155:42161",
"address": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4"
},
"proof": null
}
},
"charges": null
}

VALIDATION_FAILED, or INVALID_SIGNATURE: on an order that can take a cancel, not refundTo’s signature over this order’s message, in its chain’s standard.

Media typeapplication/json

Every v3 error, whatever the route.

object
code
required

Open list: handle a code you don’t know by its recovery.

string
message
required
string
details
required
Any of:
Any of:

VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.

object
issues
required
Array<object>
object
field
required

The field at fault, as a dotted path.

string
message
required
string
code
required

Open list.

string
field
required

The request field at fault, as a dotted path.

string | null
recovery
required

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).

string
Allowed values: fix_request requote retry read_order restart_sync contact_support
retryAfterSeconds
required
Any of:
integer
requestId
required
string

Example

{
"code": "INVALID_SIGNATURE",
"message": "The signature isn't refundTo's over this order's cancel message",
"details": null,
"field": "signature",
"recovery": "fix_request",
"retryAfterSeconds": null,
"requestId": "6f1d2c3b-4a5e-4f60-8718-293a4b5c6d7e"
}

UNAUTHENTICATED: the X-API-Key header is missing.

Media typeapplication/json

Every v3 error, whatever the route.

object
code
required

Open list: handle a code you don’t know by its recovery.

string
message
required
string
details
required
Any of:
Any of:

VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.

object
issues
required
Array<object>
object
field
required

The field at fault, as a dotted path.

string
message
required
string
code
required

Open list.

string
field
required

The request field at fault, as a dotted path.

string | null
recovery
required

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).

string
Allowed values: fix_request requote retry read_order restart_sync contact_support
retryAfterSeconds
required
Any of:
integer
requestId
required
string

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.

Media typeapplication/json

Every v3 error, whatever the route.

object
code
required

Open list: handle a code you don’t know by its recovery.

string
message
required
string
details
required
Any of:
Any of:

VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.

object
issues
required
Array<object>
object
field
required

The field at fault, as a dotted path.

string
message
required
string
code
required

Open list.

string
field
required

The request field at fault, as a dotted path.

string | null
recovery
required

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).

string
Allowed values: fix_request requote retry read_order restart_sync contact_support
retryAfterSeconds
required
Any of:
integer
requestId
required
string

Example

{
"code": "FORBIDDEN",
"message": "Unknown or inactive integrator",
"details": null,
"field": null,
"recovery": "contact_support",
"retryAfterSeconds": null,
"requestId": "6f1d2c3b-4a5e-4f60-8718-293a4b5c6d7e"
}

NOT_FOUND: no such order of yours.

Media typeapplication/json

Every v3 error, whatever the route.

object
code
required

Open list: handle a code you don’t know by its recovery.

string
message
required
string
details
required
Any of:
Any of:

VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.

object
issues
required
Array<object>
object
field
required

The field at fault, as a dotted path.

string
message
required
string
code
required

Open list.

string
field
required

The request field at fault, as a dotted path.

string | null
recovery
required

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).

string
Allowed values: fix_request requote retry read_order restart_sync contact_support
retryAfterSeconds
required
Any of:
integer
requestId
required
string

Example

{
"code": "NOT_FOUND",
"message": "Order not found",
"details": null,
"field": null,
"recovery": "fix_request",
"retryAfterSeconds": null,
"requestId": "6f1d2c3b-4a5e-4f60-8718-293a4b5c6d7e"
}

ACTION_UNAVAILABLE, with no cancel recorded, and the reason in details.reason: NOT_LIVE, EARLY_CANCEL_DISABLED, TRADING_ENDED or ORDER_OVERTAKEN.

Media typeapplication/json

Every v3 error, whatever the route.

object
code
required

Open list: handle a code you don’t know by its recovery.

string
message
required
string
details
required
Any of:
Any of:

VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.

object
issues
required
Array<object>
object
field
required

The field at fault, as a dotted path.

string
message
required
string
code
required

Open list.

string
field
required

The request field at fault, as a dotted path.

string | null
recovery
required

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).

string
Allowed values: fix_request requote retry read_order restart_sync contact_support
retryAfterSeconds
required
Any of:
integer
requestId
required
string

Example

{
"code": "ACTION_UNAVAILABLE",
"message": "The order filled in full",
"details": {
"reason": "ORDER_OVERTAKEN"
},
"field": null,
"recovery": "read_order",
"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.

Media typeapplication/json

Every v3 error, whatever the route.

object
code
required

Open list: handle a code you don’t know by its recovery.

string
message
required
string
details
required
Any of:
Any of:

VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.

object
issues
required
Array<object>
object
field
required

The field at fault, as a dotted path.

string
message
required
string
code
required

Open list.

string
field
required

The request field at fault, as a dotted path.

string | null
recovery
required

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).

string
Allowed values: fix_request requote retry read_order restart_sync contact_support
retryAfterSeconds
required
Any of:
integer
requestId
required
string

Example

{
"code": "RATE_LIMITED",
"message": "Too many requests, retry later",
"details": null,
"field": null,
"recovery": "retry",
"retryAfterSeconds": 60,
"requestId": "6f1d2c3b-4a5e-4f60-8718-293a4b5c6d7e"
}
Retry-After
integer

Seconds to wait.

INTERNAL: an unexpected failure that sending the request again won’t fix. Contact Khalani with requestId.

Media typeapplication/json

Every v3 error, whatever the route.

object
code
required

Open list: handle a code you don’t know by its recovery.

string
message
required
string
details
required
Any of:
Any of:

VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.

object
issues
required
Array<object>
object
field
required

The field at fault, as a dotted path.

string
message
required
string
code
required

Open list.

string
field
required

The request field at fault, as a dotted path.

string | null
recovery
required

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).

string
Allowed values: fix_request requote retry read_order restart_sync contact_support
retryAfterSeconds
required
Any of:
integer
requestId
required
string

Example

{
"code": "INTERNAL",
"message": "Internal error",
"details": null,
"field": null,
"recovery": "contact_support",
"retryAfterSeconds": null,
"requestId": "6f1d2c3b-4a5e-4f60-8718-293a4b5c6d7e"
}

UPSTREAM_UNAVAILABLE: the settlement service is unavailable or hasn’t seen the order yet, a contract refundTo’s signature couldn’t be checked on its chain, or storage is briefly unavailable, which can happen after the cancel was relayed. Send the same signature again, and read the order.

Media typeapplication/json

Every v3 error, whatever the route.

object
code
required

Open list: handle a code you don’t know by its recovery.

string
message
required
string
details
required
Any of:
Any of:

VALIDATION_FAILED’s details when the request fails its schema: every field it got wrong.

object
issues
required
Array<object>
object
field
required

The field at fault, as a dotted path.

string
message
required
string
code
required

Open list.

string
field
required

The request field at fault, as a dotted path.

string | null
recovery
required

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).

string
Allowed values: fix_request requote retry read_order restart_sync contact_support
retryAfterSeconds
required
Any of:
integer
requestId
required
string

Example

{
"code": "UPSTREAM_UNAVAILABLE",
"message": "The cancel could not be relayed; send the same signature again",
"details": null,
"field": null,
"recovery": "retry",
"retryAfterSeconds": null,
"requestId": "6f1d2c3b-4a5e-4f60-8718-293a4b5c6d7e"
}