Skip to navigation

Quickstart

See what exists, fetch one file, and verify it

This fetches one day of trades for one symbol with curl, and checks the file against the day’s manifest. You need a Datasets API key: see Keys, plans and usage. The last step uses jq to read one field of a JSON answer.

1

Set your key

Every request carries your key as a bearer token. Keep it in the environment, not in your shell history or a script.

export IMMIX_DATASETS_API_KEY='immixds_<keyId>_<secret>'
API=https://datasets.immix.xyz/v1
2

See what exists

Coverage lists each exchange with its families, its first closed day and the day it is published through. It is never counted against your plan.

curl -s -H "Authorization: Bearer $IMMIX_DATASETS_API_KEY" $API/coverage
{
"exchanges": [
{
"exchange": "OKX",
"first_day": "2026-09-30",
"published_through": "2026-11-12",
"families": ["quotes", "trades"]
}
]
}

GET /coverage/OKX is that exchange in full: each closed day, and for each family and symbol the first and last day with a file and their bytes.

3

Read the day's manifest

A closed day’s manifest lists its files, each with its size, row count and SHA-256. Read it before you download: it says which files exist, and it is what you verify against.

curl -s -H "Authorization: Bearer $IMMIX_DATASETS_API_KEY" $API/manifests/OKX/2026-11-11
{
"exchange": "OKX",
"day": "2026-11-11",
"status": "ok",
"contract_version": "2.4.0",
"files": [
{
"key": "trades/OKX/2026-11-11/BTC-USDT.e88dc5948aa3.csv.gz",
"family": "trades",
"symbol": "BTC/USDT",
"rows": 1843201,
"bytes": 48211507,
"sha256": "e88dc5948aa3f0c1d2b7a6e5f4c3b2a190817263544536271809f0e1d2c3b4a5"
}
]
}

The answer is cut short here, and its numbers are examples: a real day lists every file, its instruments file, and the gaps and failed hours the day does not cover.

4

Fetch a file

A file’s address is its family, exchange, day and symbol. The symbol is written with - for /, so BTC/USDT is BTC-USDT. The API answers 302 with a signed storage link, and -L follows it.

curl -L -H "Authorization: Bearer $IMMIX_DATASETS_API_KEY" -o BTC-USDT.csv.gz \
$API/files/trades/OKX/2026-11-11/BTC-USDT.csv.gz

curl does not send your key to the storage host, and the link needs none: it carries its own signature. This request counts the file’s bytes against your plan, whole, when the redirect is answered. Asking for the same file again counts again, so keep what you have fetched.

5

Verify it

Compare the file’s SHA-256 with the manifest’s. The two lines print the same 64 characters.

sha256sum BTC-USDT.csv.gz
curl -s -H "Authorization: Bearer $IMMIX_DATASETS_API_KEY" $API/manifests/OKX/2026-11-11 \
| jq -r '.files[] | select(.family == "trades" and .symbol == "BTC/USDT") | .sha256'

On macOS, shasum -a 256 stands in for sha256sum. If the two differ, the day was repaired between your two requests: read the manifest again and fetch the file again.

6

Read it

The file is gzip CSV with a header line.

gzip -dc BTC-USDT.csv.gz | head -n 3

The first line names the columns: nine that every family begins with, then the family’s own. trades lists them with their types. A file is several gzip members one after another, which gzip and most readers handle: make sure yours reads them all.

7

See what it counted

curl -s -H "Authorization: Bearer $IMMIX_DATASETS_API_KEY" $API/usage

The answer is your plan and the month’s bytes and files, in total and by key, exchange and family. The file you fetched is in it.

Next