Skip to main content
POST
Cancel an order before it is dispatched to a venue.

Authorizations

X-API-Key
string
header
required

Send the API key in X-API-Key.

Request signing. A key with signing enabled (POST /api/v1/workspaces/{workspaceId}/users/me/api-keys/{keyId}/signing, which returns the signing secret once) must also sign every request:

  • X-Timestamp: the current Unix time in seconds, within 300 seconds of the server clock.
  • X-Signature: lower-case hex HMAC-SHA256 of the canonical string, keyed with the signing secret's 32 bytes (the secret is 64 hex characters; decode it first).

The canonical string is four lines joined by \n, with no trailing newline: the X-Timestamp value, the upper-case method, the path with its query exactly as sent (/api/v1/orders?limit=1), and the lower-case hex SHA-256 of the exact body bytes (the SHA-256 of an empty body when there is none).

A write's signature (POST, PUT, PATCH, DELETE) is accepted once: sending the same signed write again is refused, so a retry signs again. A read (GET, HEAD) changes nothing, so an identical signed read inside the window is admitted again and polling needs no nonce.

A signing refusal is a 401 AUTH_REQUIRED whose details.reason names the cause: SIGNATURE_REQUIRED (a header is missing), SIGNATURE_INVALID (a malformed header or a wrong signature), TIMESTAMP_OUT_OF_RANGE or SIGNATURE_REPLAYED.

Headers

X-Workspace-Id
string<uuid>

The workspace the request acts in. An API key bound to a workspace implies it: omit the header, or send that same id (another id answers 403 WORKSPACE_SCOPE_MISMATCH). A member session must send it (400 MISSING_WORKSPACE without it).

Idempotency-Key
string | null

Required for API keys. Cancellation is naturally idempotent by order id.

Path Parameters

id
string
required

The identifier accepted by GET /orders/{id}

Response

What POST /orders {quoteId} created, read from the owner that saves it: a protocol order in orders, or a workspace venue trade (fiat included) in the venue trade operations. Nothing is recorded twice.

New values may be added; treat unknown values as other.

deliverTo
object
required

A resolved destination includes observed presentation facts, unlike a request.

New values may be added; treat unknown values as other.

fundingAccount
object
required

What backs execution. A link id appears only when money moves through that link.

fundingModel
enum<string>
required

What backs execution. A venue declares prefunded or payIn; credit is derived per trade (never declared or chosen): the trade creates or increases a negative position on the venue account, and creditPortion names how much.

New values may be added; treat unknown values as other.

Available options:
prefunded,
payIn,
credit
settlement
object
required

The venue's declared terms and, for delayed timing, the account schedule's window.

tradingSource
object
required

The exact source selected for a quote, retained through execution and recovery.

New values may be added; treat unknown values as other.

fees
object[]
required

The fees actually charged, as recorded: the venue's own fee report, bridge fees, network gas the order's wallet paid, and the platform fee. Never a quoted estimate. A fee whose amount was not reported or could not be read is left out rather than shown as 0, and its kind is listed in unrecordedFees.

fills
object[]
required

Each confirmed fill, in execution order. Always present: empty before any fill is confirmed.

quotedBuyAmount
string | null
required

The buy amount the executed quote said would land. Null when it is not known (for example before a venue order is dispatched).

settledBuyAmount
string | null
required

What actually landed, read from the fill or settlement evidence. Null until it is measured; never the quote carried forward and never 0 for unknown.

settlesBy
string<date-time> | null
required

The latest time the order settles, or can no longer execute, under its recorded terms: the signed order's fill deadline, or, on a route, the latest fill deadline every leg commits to (Advanced); the last on-chain step's send-by time (an on-chain Basic swap). Null when no such term is recorded, for example a same-chain DEX swap, whose call carries no deadline.

unrecordedFees
enum<string>[]
required

Every fee kind the order incurs whose actual charge is not recorded or could not be read: a venue fee taken inside the price without an amount, a bridge leg's fee, gas the order's wallet spent without a readable receipt, a platform fee billed off the order. Always present; empty only when every incurred charge is in fees. An absent kind with no fees line means nothing of that kind was charged. Open set: clients show an unknown kind generically.

What a fee paid for.

New values may be added; treat unknown values as other.

Available options:
trading,
relayer,
forwarding,
transfer,
network,
platform
order
object
required

Response body for /api/v1/orders endpoint (order submission)

orderId
string
required

The identifier accepted by GET /api/v1/orders/{id}.

status
enum<string>
required

Open public lifecycle vocabulary shared by both order kinds. States may be skipped; act on terminal, not on a particular sequence.

New values may be added; treat unknown values as other.

Available options:
pending,
working,
filled,
settled,
unfilled,
cancelled,
failed,
refunded,
reviewRequired,
outcomeUnknown,
refused
statusUrl
string
required

Where to read this order's status (GET). An API key needs the orders_read scope; placing the order needed only orders_write.

terminal
boolean
required
kind
enum<string>
required

New values may be added; treat unknown values as other.

Available options:
advancedTrade
creditCheck
null | object

The credit decision the funding was derived from: point-in-time evidence, never a reservation or dispatch authority. Present exactly when creditPortion is.

creditPortion
null | object

A credit trade's exact credit portion: the part of the debit, in the debit asset, that creates or increases a negative position (the rest is spent from positives). Present exactly when fundingModel is credit.

creditReservation
null | object

The firm ask's combined cash and credit hold on a credit venue account, held until the quote expires or its order adopts it. Absent on indicative cards.

payIn
null | object
next
object

The one action the caller takes next; later legs run under the order.

New values may be added; treat unknown values as other.

quoteId
string | null
requestId
string | null