> This page is for Datasets.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.immix.xyz/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.immix.xyz/_mcp/server.

# Quickstart

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](/datasets/docs/keys-plans-usage).
The last step uses `jq` to read one field of a JSON answer.

#### 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.

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

#### 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.

```sh
curl -s -H "Authorization: Bearer $IMMIX_DATASETS_API_KEY" $API/coverage
```

```json
{
  "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.

#### 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.

```sh
curl -s -H "Authorization: Bearer $IMMIX_DATASETS_API_KEY" $API/manifests/OKX/2026-11-11
```

```json
{
  "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.

#### 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.

```sh
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.

#### Verify it

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

```sh
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.

#### Read it

The file is gzip CSV with a header line.

```sh
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`](/datasets/reference/files/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.

#### See what it counted

```sh
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

* [Keys, plans and usage](/datasets/docs/keys-plans-usage): what counts, and what to do at the limit.
* [HTTP API guide](/datasets/reference/http-api/guide): every rule the routes share, and every refusal.
* [Files](/datasets/reference/files/overview): what each family's file holds.