HTTP API guide
Using the Datasets API: keys, coverage, a day’s manifest, files, repaired days, plans and usage, and every refusal
Historical market data as files: trades, quotes, order books and derivatives data, one file per family, exchange, day and symbol. The API tells you what exists, and answers a file’s address with a redirect to a signed storage link. No file’s bytes pass through the API.
In one minute
Then check the file against the manifest’s sha256:
API keys
Every request carries a Datasets API key:
- A key belongs to one customer, and a customer may hold several: one per machine or job makes each easy to replace.
- The whole key is shown once, when it is issued or rotated. It cannot be shown again: a lost key is rotated, which keeps its id and replaces its secret, and the old secret stops working at once.
<keyId>is not secret. It names the key in your usage and to support. Never share the rest.- Send the key on every request to this API. Do not put it in a URL, and do not send it to the storage link a download redirects to: that link carries its own signature.
A Datasets key is the product’s own. A trading API key (it begins immix_) and a login token
are both refused here, and a Datasets key is refused by the trading API.
What exists: coverage
GET /coverage lists each exchange with its families, its first closed day and
published_through, the last closed day coverage holds. A day is ready once its exchange’s
coverage lists it under days. A day it does not list has no manifest yet, or closed after
coverage was written: ask for the day’s manifest, which is the authority.
An exchange whose coverage the service cannot serve right now is left out of the list until it can, while its days are still served. So do not take an exchange missing from the list for one the dataset no longer holds.
GET /coverage/{exchange} is one exchange in full:
days: each closed day, with itsstatus(okorpartial), how manygapsits manifest lists and whichfailed_hoursit had.families: for each family and symbol, thefirst_dayandlast_daywith a file, how manydayshave one and theirbytes, summed. Usebytesto size a download before you start it.
Every day is a UTC date and inclusive. A symbol’s days below the span from first_day to
last_day means days without a file. A file exists only if it has rows, so such a day was a
quiet day, unless that day’s manifest lists a gap or a failed hour that covers the symbol.
Coverage is written when a day closes. It can be a day’s close behind the manifests and is never ahead of them: the manifest is the authority on its day.
A day: the manifest
GET /manifests/{exchange}/{day} is a closed day’s commit:
files: each file’skey,family,symbol,rows,bytesandsha256.instruments: the day’s instruments file.gaps: the time ranges the day does not cover, each with areason. A gap’sfamilyorsymbolmay be*, meaning all of them.failed_hours: the hours with no data at all. A day with any ispartial.
A file the manifest does not list is not published. Read the manifest before you download: it
says which files exist, so you never ask for one that does not, and its sha256 is what you
verify a download against.
from and to are instants in epoch nanoseconds, and bytes and rows are counts: JSON
integers of up to 64 bits. A nanosecond instant is larger than a JavaScript number holds
exactly, so parse these with a 64-bit or big-integer type.
Files
answers 302 with the file’s signed link in Location.
{symbol}is the symbol with/written-and:written_:BTC/USDTisBTC-USDT, andAAVE/USD:USD-20310704isAAVE-USD_USD-20310704. Everywhere else (coverage, manifests, the files’ own rows) a symbol is in its canonical form.{ext}is the extension of the file’s key in the manifest:csv.gztoday.- The path is the manifest’s
keywithout the 12 hexadecimal digits before the extension:trades/OKX/2026-11-11/BTC-USDT.e88dc5948aa3.csv.gzis fetched at/files/trades/OKX/2026-11-11/BTC-USDT.csv.gz.
The link:
- is on
storage.googleapis.com. If your network allows only named hosts, allow that one too. - is valid for at least 10 minutes from the redirect, and at most 15. A download that has started runs to its end. To resume one after the link has expired, ask for the file again.
- needs no key. Most HTTP clients drop the
Authorizationheader when a redirect changes host; make sure yours does. Anyone holding the link can use it until it expires, so do not log or share it. - supports
Rangerequests. - is signed for
GETalone. A file’s address takesGETalone too: any other method,HEADamong them, is refused (405,Allow: GET) and counts nothing. A file’s size and SHA-256 are in the day’s manifest, which is free to read.
A symbol whose canonical form has characters outside letters, digits, one / and an optional
: suffix has no address yet. No published symbol is one today.
Instruments
GET /files/instruments/{exchange}/{day}.csv redirects to the day’s instruments file: the names
and display scales in force that day, one row per name version, so a rename or a delisting
inside the day is visible. Every data file’s instrument_id column is the same identifier. The
newest closed day’s file is the current view. It is never counted against your plan.
Reading a file
A data file is gzip CSV: the first gzip member holds only the header and the members after it
hold the rows, so a reader must read every member (most gzip readers do). timestamp is the
time our sequencer received the event, in nanoseconds; exchange_timestamp is the exchange’s
own clock where it gave one. Prices and amounts are exact decimals: read them as decimals, not
as floating point. The portal’s dataset reference lists every family’s columns.
A repaired day
A day can be repaired after it was published: its files are replaced and its manifest is
rewritten, with a new sha256 for each file that changed.
- The API serves the latest version of a day to within one minute.
- While a repair is in progress, the day’s manifest and files answer
503 DAY_UNDER_REPAIRwithRetry-After: 60. Nothing is counted. Wait and ask again: a repair can take an hour or two to close. - If a download’s SHA-256 differs from the manifest you hold, the day was repaired in between. Read the manifest again: files you already hold that match the new manifest need no second download.
Plans and usage
Your plan is a number of bytes per calendar month (UTC), or no limit.
- What counts. A data file’s redirect counts the file’s
bytes, whole, at the moment the redirect is answered, whatever you then do with the link. An aborted download counts, and so does a second request for a file you already fetched: keep what you have, and skip a file on disk whose SHA-256 matches the manifest. - What never counts. Coverage, manifests, instruments files and
GET /usage. A refused request never counts either. - Where you stand. Every counted redirect carries
X-Immix-Month-Bytes-Used, the month’s bytes with this file among them, andX-Immix-Month-Bytes-Limit, your plan (absent when it has no limit).GET /usagegives the same and the month’s bytes and files by key, exchange and family, for every key of your account. - Past the plan. A file that would take the month past your plan answers
429 BUDGET_EXHAUSTEDand is not counted. ItsRetry-Afteris the month’s end, so do not wait it out in a loop: stop, or ask us to raise the plan. A file larger than your whole plan fits no month: its refusal says so and carries noRetry-After.
Each key may also make a bounded number of requests a minute. Past it the answer is 429 RATE_LIMITED: wait the Retry-After seconds and continue. A client fetching five files at a
time never reaches it.
When a request is refused
A 401 also carries WWW-Authenticate: Bearer.
Errors
Every non-2xx response has the same body:
codeis machine-readable, UPPER_SNAKE and append-only. Branch on it, never onmessage, and tolerate codes you don’t know.retryablesays whether the identical request, sent again afterRetry-Afteror a short pause, can succeed with nothing else changed.BUDGET_EXHAUSTEDisfalse: only the month turning or a raised plan clears it.requestIdis also theX-Request-Idresponse header. Quote it to support. If you send anX-Request-Idof 8 to 128 letters, digits,.,_or-, it is used as the request’s id.
The envelope is the one every Immix API uses, so its members are camelCase; the resources above are snake_case, as the dataset’s own manifests are.