Requests
- Every order, application and allocation has its own
Idempotency-Key, saved before you send the request and reused on every retry. See Idempotency. - After a timeout or a
5xx, your code retries with the same key and never a new one. - Your code branches on
error.code, never onmessage. See Errors. - You handle
429 rate_limitedby waitingRetry-Afterseconds, and422 limit_exceededwithout retrying. See Limits. - You log the
x-request-idheader of every response. - You hold amounts as integers in kobo, and read
average_cost_kobo_decimalas a decimal string, never as a floating-point number.
Orders
- You send limit orders only for ETFs. See Orders.
- You handle every order state, including
uncertain, and you don’t place an uncertain order again under a new key. See Handling uncertain orders. - You handle
409 similar_order_unresolved. - After a cancel returns
202, you wait fororder.cancelledororder.filledbefore you treat the order as finished.
Events
- You’ve sent us your webhook URL, and we’ve sent you its signing secret. See Webhooks.
- Your endpoint verifies every signature and rejects timestamps more than 5 minutes from your clock.
- Your endpoint returns
2xxwithin 10 seconds and does the work afterwards. - You ignore duplicate events by
webhook-id, and stale ones byversion. - You store the last
next_cursorfromGET /v1/eventsand catch up from it after any downtime. - You ignore event types, states and fields you don’t recognise. See Versioning.
Live access
- You’ve sent us every IP address or range your servers send requests from. See Keys and security.
- Your live key is in a secrets manager on your servers, and never in an app or web page your customers download.
- You know how to reach us to revoke a key at once.
- You’ve agreed your limits with us, and how your wallet is funded. See Wallet.
- You’ve pointed your integration at the live host. Live and sandbox keys each work only on their own host.