Orders: clientOrderId
Every call that places, replaces or protects an order carries a clientOrderId that you choose. It
names one trading intent.
- Create a new id when the trader makes a new decision.
- Send the same id when you retry that decision, whatever went wrong the first time.
- Never reuse an id for a different decision.
409 because it was placed the first time. Both outcomes are correct, and neither
doubles the trader’s position.
Cancels don’t take an id. A cancel is already safe to repeat at the market, so you can send it
again after a partial failure.
Venue writes: Idempotency-Key
Every write under /api/partner/venues/{venueId}/… takes an Idempotency-Key header of 1 to 128
characters: saving an instrument, a route or a group, publishing a risk policy, issuing an account,
moving money on one, resetting, halting, advancing a stage, registering a webhook or sending it a
test ping. A write without one is refused with 400 idempotency_key_required. Three writes take no
key: removing a webhook, and updating the brand or its logo.
The Legacy Partner API carries the same rule in the body instead of a header: a
referenceId on
issuing, resetting and balance operations.