The API may change until launch. Every change is listed in the Changelog.
Watch prices, quote to trade
A quote request asks every venue live, and each venue limits how often it answers. UseGET /api/v1/prices or GET /api/v1/prices/stream to show prices or watch a market. Request a quote only when you mean to trade: only a quote has an id you can order, and only an executable quote holds its terms until expiresAt.
Never poll quotes to track a price. You may send one live quote request every 3 seconds per key, and venues that are asked too often answer askLimitReached or firmQuoteLimited for a while. Prices before you quote covers the price reads.
Requote instead of searching again
When a quote you hold expires, or you want another wallet, corridor or price protection, requote it:POST /api/v1/quotes with requote set to its id. Only that quote’s venue is asked again. The original stays orderable until its own expiresAt. Requotes and expiry lists what a requote can change.
Retry with the same key and body
Send oneIdempotency-Key per order, and store it with the order before you send. When a call times out, the connection drops, or the answer is a retryable 503, send the same body with the same key. A replay returns the first answer, so no order is placed twice. Idempotency lists which answers to retry.
Retry-After seconds when it is sent:
An unknown outcome is not a failure
When an order times out, or readsoutcomeUnknown, the trade may still have filled. Never place a new order for the same intent to “make sure”. Keep reading its status, or find the order by its quote:
Follow an order to the end
Read an order at itsstatusUrl every 10 to 15 seconds until terminal is true. When next says wait, read again after its retryAfter; when it says contact, contact support with its reference. Treat a status you do not recognise as “other” and keep following terminal. Order status lists every status.
order.updated event is sent to your endpoint on each order status change. It is thin: it names the order and the statusUrl to read, so read that URL rather than trusting the order events arrived in. An event can arrive more than once, so record each event’s id and skip one you have already handled.