Skip to main content
A request can time out after trdrs has already acted on it, and your code can’t tell. Idempotency makes that safe: you give each intent an id, and sending the same intent again never does the work twice. Use this page when you write the retry logic for orders, venue writes and Connect links. There are two mechanisms, one for each side of the API, and one rule for both: one intent, one id, forever.

Retry an order with 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.
If the first attempt timed out, retry with the same id. Either the order is placed now, or the answer is 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.

Retry a write with Idempotency-Key

Every write under /api/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 Connect API’s writes, creating and closing a Connect link, take the same header.
This debits 800 from the account, and the key becomes the operation’s reference. What a repeat returns depends on the write:

Compare the two