---
title: "Get Snapshots"
method: GET
path: "/api/v1/backtesting/snapshots"
tags: ["Backtesting"]
---

# Get Snapshots

`GET /api/v1/backtesting/snapshots`

## Request

- Base URL: `https://cryptodataapi.com`
- URL: `https://cryptodataapi.com/api/v1/backtesting/snapshots`
- Auth: API key in header `X-API-Key`

Query historical JSON snapshots for a data type.

Streamed row-by-row so peak memory stays ~one row regardless of ``limit``.
A limit=1000 pull of fat types (coinglass_oi / coinglass_funding /
stablecoins) otherwise decompressed ~300MB and ballooned ~1GB through
serialization, OOM-looping the 2.5GiB container. The JSON response shape is
unchanged, so consumers need no changes. Streaming also means bytes start
flowing immediately — no more 60s nginx 504 on large pulls. No heavy-read
semaphore needed here: memory is now bounded by the stream itself, and the
request rate is bounded by nginx/Cloudflare on the /backtesting route.

## Query parameters

- `data_type` string, required: Snapshot type, e.g. market_health, fear_greed, coinglass_etf_flows
- `start` string, required: Start time (ISO 8601 or unix ms)
- `end` string: End time (ISO 8601 or unix ms, defaults to now). EXCLUSIVE — the range is [start, end), so consecutive windows do not repeat a boundary row.
- `bounds` string: Interval convention for `start`/`end`. `half-open` (default) is [start, end) — `end` is EXCLUSIVE, so consecutive windows tile without repeating a boundary row. `closed` is [start, end] — `end` INCLUSIVE, the pre-2026-08-08 behaviour; use it only to keep an existing integration byte-identical.
- `limit` integer
- `universe` string, nullable: For dex_trending: filter to hl_perps

## Response `200`

Successful Response

- BacktestSnapshotsResponse
  - `data_type` string, required
  - `count` integer, required
  - `snapshots` BacktestSnapshotEntry[], required
    - `time` integer, required
    - `data` union
      - object
      - unknown[]
        - unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/cryptodataapi/apis/crypto-data-api.md) · [All operations](https://skmtc.dev/cryptodataapi/apis/crypto-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cryptodataapi/apis/crypto-data-api/revisions/8628b754ca81?raw)
