Base URL

Every route is a GET and answers JSON, but the market events, a stream of server-sent events. No key is needed.

Errors

Limits

The API counts what each client asks a minute, and answers a request past its allowance 429, with a Retry-After header:
  • A client is its address. Everything behind one address shares its allowance; an IPv6 client is counted by its /64.
  • An allowance fills back over a minute. A client that waited may ask a minute’s worth at once, then at that pace.
  • GET /health is never counted.
A quote reads four order books on the venues, which is why quotes have a tighter allowance.

Freshness

Funding rates and prices are collected as the venues publish them, from each venue’s live feed, and every 30 seconds from a venue whose feed is down. Extended has no live feed for them: its market list is read every 30 seconds, and Extended itself refreshes that list every 60 seconds, so its rates and prices can be up to 90 seconds old. GET /v1/markets/events tells when they move. A quote reads the order books live and serves each leg’s costs from memory for 15 seconds.

Reading again

Every answer carries an ETag and Cache-Control: private, no-cache. Send the tag back in If-None-Match: while the answer hasn’t changed, you get a 304 without a body. The series change once an hour, so reading them again costs a few hundred bytes. Send Accept-Encoding: gzip and an answer of 1 kB or more comes gzipped: the list of opportunities in about 32 kB instead of 285.

From a browser

Only the app’s own origin may call the API from a browser. Call it from your server or a script.