# DEBYKO Historical Snapshots

> DEBYKO Historical Snapshots is a paid API for AI agents from api.debyko.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-15).

Returns an as-of snapshot of any crypto perpetual instrument at a specified past moment, exactly as stored, with gaps returned as gaps.

## Facts

- Endpoint: POST https://api.debyko.com/v2/snapshots/history?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/debyko-historical-snapshots-d99c6436
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8j61SdcWBsdaM9wUWm19G

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability debyko-historical-snapshots-d99c6436 -d '<json body>'
```

Example prompt: Show me the funding rate, mark price, and open interest for BTC-PERP on Binance exactly as stored at 2024-11-15T08:00:00Z — include any gaps if the data isn't there.

## When to prefer this

Use this endpoint when you need the exact stored value of a crypto perpetual market data point at a specific past moment, with no interpolation or gap-filling. Ideal for backtesting, auditing, or reconstructing market state at a precise historical timestamp. Prefer this over OHLCV candles when you need non-aggregated snapshots (mark, funding, OI, book) rather than open/high/low/close/volume. Choose this over the live/latest endpoint when historical precision matters and you explicitly want gaps returned as gaps.

## Known failure modes

- No data found for the requested instrument/timestamp combination — gap returned in response
- Invalid timestamp format (must match ISO 8601 pattern with Z suffix)
- Unknown instrument identifier in 'where' filter — empty or error response
- Unsupported layer enum value — validation error
- Interval string not parseable — request rejected
- Payment not completed or insufficient USDC balance — 402 response
- allow_stale=false with no fresh data available — gap or empty result

## How this service works

Historical funding rate, open interest, mark price and order book data for crypto perpetual futures across 19 venues (Aster Perpetuals, Avantis, Binance USD-M Futures, Bitget Perpetual Futures, Bybit Perpetuals, Coinbase Global Derivatives and 13 more), exactly as stored: as of a past instant, per interval, or every update as received. For backtests and audits. Gaps are marked as gaps, not interpolated. No charge when nothing recorded is returned. 0.02 USDC per call.

## Output

Returns one or more historical snapshots of the requested instrument, exactly as stored at the specified past moment(s). Each snapshot includes the requested data layers (ticker, mark price, funding rate, open interest, order book, stats, venue depth). Gaps in stored data are returned as explicit gap indicators rather than being filled or interpolated. Numbers can be returned as JSON or string format.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "at": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Instants, UTC and ascending, to read as the history recorded them; instead of interval, without from and to."
  },
  "to": {
   "allOf": [
    {
     "type": "string",
     "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{3})?Z$"
    }
   ],
   "description": "End of the window, UTC, e.g. 2026-10-01T06:00:00Z."
  },
  "raw": {
   "type": "boolean",
   "default": false,
   "description": "true returns every update as it arrived; needs from and to."
  },
  "from": {
   "allOf": [
    {
     "type": "string",
     "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{3})?Z$"
    }
   ],
   "description": "Start of the window, UTC, e.g. 2026-10-01T00:00:00Z."
  },
  "kind": {
   "enum": [
    "perpetual",
    "spot",
    "all"
   ],
   "type": "string",
   "default": "perpetual"
  },
  "units": {
   "enum": [
    "published",
    "base"
   ],
   "type": "string",
   "default": "published"
  },
  "where": {
   "oneOf": [
    {
     "type": "string"
    },
    {
     "type": "object"
    }
   ],
   "description": "DQL selection of the markets to read, e.g. base in (BTC) or venue = HYPERLIQUID and base = BTC."
  },
  "layers": {
   "type": "array",
   "items": {
    "enum": [
     "ticker",
     "mark",
     "funding",
     "oi",
     "book",
     "stats",
     "venue_depth"
    ],
    "type": "string"
   },
   "description": "Layers to read: ticker, mark, funding, oi, book, stats, venue_depth."
  },
  "interval": {
   "type": "string",
   "description": "One row per period of this length, e.g. 1m or 1h, holding the last reading in it; needs from and to."
  },
  "freshness": {
   "type": "string"
  },
  "allow_stale": {
   "type": "boolean",
   "default": false
  },
  "include_gaps": {
   "type": "boolean",
   "default": true
  },
  "number_format": {
   "enum": [
    "json",
    "string"
   ],
   "type": "string",
   "default": "json"
  },
  "include_synthetic": {
   "type": "boolean",
   "default": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/debyko-historical-snapshots-d99c6436/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.debyko.com](https://www.zero.xyz/host/api.debyko.com/llms.txt)
