Skip to main content
Check each item in the sandbox, then place your first production order at the smallest amount a venue takes. Open an item for how.

Orders survive a crash

Persist {quoteId, idempotencyKey, exactBody}, then send POST /api/v1/orders; a retry sends the same key and body bytes (Retries and recovery).
A timeout, 5xx or outcomeUnknown does not mean the order failed: replay with the same key, or find the order by its quote.
Order again only on a new quote, and only when the order is shown not to exist or ended without filling.
Read its statusUrl until terminal is true, every 10 to 15 seconds or when a webhook arrives (Order status).

Webhooks are handled once

Verify the signature over the raw body before parsing it.
Deduplicate on webhook-id: deliveries arrive at least once and out of order.
Answer 2xx within 10 seconds, then work. Read statusUrl for the current state.
Resume a paused endpoint and redeliver what it missed. The delivery log does not survive a TetraFi restart (Webhooks).

Signing holds up

X-Timestamp must be within 300 seconds of TetraFi’s clock, and a write’s at most 10 seconds ahead.
Generate every X-Nonce from a cryptographic random source, and sign each send, retries included, with a new nonce and timestamp (Sign requests).
Keep secrets in a secret manager, never in code or a tracked file.

Keys can be rotated

After Rotate key, the old key works for one hour (Rotate and revoke).
Grant only the permissions a key uses.
Use a service account for software that should outlive one person’s access.
Know how to revoke a leaked key at once.

Limits are respected

Each key may send one live quote request every 3 seconds (Rate limits).
On any 429, wait Retry-After seconds and retry once.
Requote a held quote instead of searching again (Requotes and expiry).

Parsing tolerates change

Ignore response fields you do not recognise.
Treat an unknown enum value as “other”, such as a status, source reason or next.kind: keep following terminal, show detail or message, and carry on.
Match refusals on error, never message, and treat an unknown code by its status class (Errors and refusals).
Parse amounts as decimals, never floats (Conventions).
Read the Changelog before each release of your integration.

Next

Retries and recovery

Retry an order safely and find out whether it was placed.

Webhooks

Receive order updates and recover missed deliveries.