Skip to main content
An order names an outcome, a price and a quantity. A trading key signs it. The order trades that key’s subaccount. GET /v3/orders with a status other than OPEN spends the history throttle instead, and a larger page costs more.

Retries

clientId is a label, not an idempotency key. The exchange echoes it on the answer and on every open and fill. Use it to match an event to the place that caused it. The exchange never checks it for uniqueness.
A replayed place always places again. Send each order once. If you lose an answer, read the private stream before you resend. Match on clientId. No route cancels by clientId.

Batch

A batch is all or nothing. The exchange checks every order before it places any. One refused order refuses the batch, and the exchange places nothing. A malformed order, like an off-grid price, refuses the batch with that order’s own code and no rejected list. A refusal in the table below names every refused order in rejected, by its position in the request.
422
index is the order’s zero-based position in the batch you sent. reason is prose for a human, and it can change. Branch on the envelope’s code and on index. Fix the named orders. Then resend the batch. The exchange placed nothing, so the resend places every order. clientId is not an idempotency key, so give each order a fresh one before you resend.

A place is not a rest

Cancel

A 200 means the exchange queued the cancel. The cancel event on the private stream confirms that the order left the book. A batch cancel can cancel some orders and not others:
207

No amend

Cancel the order. Then place a replacement. The replacement joins the back of its price level. A fill can land between the cancel and the place. Size the replacement from the cancel event’s remaining. Give the replacement a fresh clientId before you send the cancel. See Order lifecycle.

Read

ORDER110 @ 0.670takes on entry, so no open event · GET /v3/orders
FILL70 @ 0.665taker fee $0.00936 · remaining 40
FILL40 @ 0.670taker fee $0.00531 · remaining 0 → FILLED
POSITION110 @ 0.66682 avgcost $0.73350 · GET /v3/portfolio/positions