GET, all JSON. The spec on this site is a daily snapshot of the staging gateway’s own
OpenAPI document; the gateway also serves it live with a
Swagger UI.
Base URL
/base segment names the network; routes for other
networks will appear next to it.
Authentication
Aile issues your API key. Send it asAuthorization: Bearer <key> and keep it on your backend.
GET /quoterequires it; without a key it answers401 api-key-required.- The other routes work without it. With it, their calls count against your own budget and are attributed to you instead of sharing the anonymous per-address limit.
Rate limits
- Each key has its own request budget, set when it is issued. Over budget you get
429 key-rate-limitwith aRetry-Afterheader. - Keyless calls to
/config,/levelsand/ordersshare a limit per calling address; over it you get429 rate-limitedwithRetry-After. /configis cacheable for 60 seconds and/levelsfor a few seconds; read them on a timer, not per user keystroke.
Quote lifetime
A quote is an order signed by the market maker. It is valid for about 30 seconds (expiresAt, unix
seconds), only the taker can use it, and it can be used once. The maker holds the inventory for the
quote until it expires or fills. Ask for a quote when you are ready to send the transaction; use
/levels while you are deciding. Keys flagged for relayer pipelines can receive 60-second quotes on
request.
Problems
Errors are RFC 7807 problem details (type, title, status, detail) plus a machine-readable
reason. Branch on reason, not on title. Treat a reason you do not know as “no quote”.
GET /levels reports the same reasons per direction in its reason field, so you can see before asking
why a direction would be refused.
Compatibility promise
What you can rely on across every later release of the API:- Fields, routes and enumeration values are only ever added, never removed or changed in type.
- Send
fill.to,fill.dataandfill.valueexactly as returned.order,signature,makerand the otherfillfields are there for your information. - Do not hard-code the maker address: it changes. Read the order protocol address from
/config. maker.kind,signature.type,fill.methodand the problemreasoncan gain new values. Treat areasonyou do not know as “no quote”.
Amounts
Every amount is a decimal string in the token’s base units, never a float. Decimals are in/config
(tokens[].decimals, bookTokens[].decimals): USDC 6, EURC 6, XSGD 6, TRYB 6, IDRX 2, CADC 18, TGBP 18.