- Request
- 201
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.
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 refusal names every refused order inrejected, 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
A200 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 thecancel event’s remaining. Give the replacement a fresh clientId before you send the cancel. See Order lifecycle.
Read
ORDER
110 @ 0.670one open event · GET /v3/ordersFILL
40 @ 0.670fee $0.00266 · remaining 70FILL
70 @ 0.665fee $0.00468 · remaining 0 → FILLEDPOSITION
110 @ 0.66682 avgcollateral $0.73350 · GET /v3/portfolio/positions
