# dYdX v4 Chain-State History API

> dYdX v4 Chain-State History API is a paid API for AI agents from cryptopulse.theaslangroupllc.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Returns hourly-sampled historical open interest and cumulative funding index for dYdX v4 perpetual markets, read directly from public blockchain state with block height timestamps.

## Facts

- Endpoint: GET https://cryptopulse.theaslangroupllc.com/api/dydx-history
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dydx-v4-chain-state-history-api-7ee70726
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_p8HojXF4eObpwYzqMdx1G

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 dydx-v4-chain-state-history-api-7ee70726
```

Example prompt: Pull me the hourly dYdX v4 chain-state history for ETH-USD — I want to see open interest in both units and USD plus the cumulative funding index with per-interval deltas going back as far as the archive covers.

## When to prefer this

Choose this endpoint when you need deterministic, block-stamped historical open interest and funding index data sourced directly from dYdX v4 chain state — especially when geo-restricted indexer access is a problem, or when you need verifiable on-chain provenance. Ideal for backtesting funding strategies, auditing open interest trends, or building analytics that require tamper-evident blockchain-sourced data rather than off-chain indexer estimates.

## Known failure modes

- Unknown or unsupported market symbol returns an error or empty result
- Requested time range predates history_since coverage, returning partial or no data
- Blockchain node unavailability causes delayed or failed state reads
- Rate limiting or x402 payment failure returns 402 with payment details
- Invalid parameter format returns 400 bad request

## How this service works

dYdX v4 chain-state history, deterministic and block-stamped. Answers "what was dYdX open interest and funding index for this market over time". Hourly samples read from public blockchain state (never the geo-restricted indexer): open interest in units and USD (archived oracle price), cumulative funding_index with per-interval deltas, block height and available_at per row. Archive coverage is honestly disclosed via history_since. No LLM, no key.

## Output

An array of hourly rows for the requested dYdX v4 market, each containing: open interest in native units, open interest in USD (using archived oracle price), cumulative funding_index, per-interval funding index delta, block height, and available_at timestamp. Also includes a history_since field indicating the earliest available coverage date.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "ticker"
 ],
 "properties": {
  "days": {
   "type": "number",
   "description": "window in days (default 7, max 62)"
  },
  "ticker": {
   "type": "string",
   "description": "dYdX market ticker, e.g. BTC-USD, ETH-USD"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "rows": 24,
  "ticker": "BTC-USD",
  "history": [
   {
    "ts": "2026-07-14T06:09:48Z",
    "height": 97652550,
    "oi_usd": 17381503,
    "oi_units": 277.9,
    "funding_index": 2227060,
    "d_funding_index": -17
   }
  ],
  "deterministic": true,
  "history_since": "2026-07-14T06:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dydx-v4-chain-state-history-api-7ee70726/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cryptopulse.theaslangroupllc.com](https://www.zero.xyz/host/cryptopulse.theaslangroupllc.com/llms.txt)
