# dYdX Chain Perpetual Markets Data

> dYdX Chain Perpetual Markets Data is a paid API for AI agents from api.chainmarket-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-24).

Fetches real-time perpetual market data for a specific dYdX trading pair, including oracle price, 24h volume, open interest, funding rate, and margin requirements

## Facts

- Endpoint: GET https://api.chainmarket-api.workers.dev/api/crypto/dydx-chain-markets?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dydx-chain-perpetual-markets-data-e7cb6b99
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dF2BMvYke7-p5UA1NcZGx

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-chain-perpetual-markets-data-e7cb6b99
```

Example prompt: What's the current oracle price, 24-hour volume, open interest, and funding rate for BTC-USD on dYdX right now?

## When to prefer this

Use this endpoint when you need real-time perpetual market data specifically from the dYdX decentralized exchange, including funding rates, oracle prices, and margin parameters that are unique to dYdX's on-chain protocol. Prefer this over centralized exchange APIs when you need decentralized, on-chain data. It requires no API key or signup and charges only on success via x402 micropayment.

## Known failure modes

- Invalid or unsupported ticker returns an error or empty result
- Network or upstream dYdX indexer outage causes failure (no charge on failed call)
- Market not listed on dYdX perpetuals returns null or error
- Malformed query parameter results in 400-level response

## How this service works

dYdX v4 (Cosmos app-chain) perpetual market for one ticker: status, oracle price, 24h price change, 24h USD volume and trade count, hourly funding rate, initial and maintenance margin, and open interest in base units and an approximate USD value at the oracle price. Indexer data only.

## Output

Returns a JSON object with the market ticker, status (e.g. ACTIVE), oracle price, 24h trade count, 24h USD volume, open interest in base and approximate USD, 24h price change in both percentage and USD, next funding rate per hour, initial margin fraction, maintenance margin fraction, and the data source URL and timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "ticker": {
       "type": "string",
       "description": "dYdX market ticker, e.g. BTC-USD, ETH-USD"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "source": "https://indexer.dydx.trade/v4/perpetualMarkets",
  "status": "ACTIVE",
  "ticker": "BTC-USD",
  "checkedAt": "2026-10-23T09:36:09.349Z",
  "trades24h": 1971,
  "oraclePrice": 81530.06392,
  "volume24hUsd": 5171010.6479,
  "openInterestBase": 782.0931,
  "priceChange24hPct": -0.1927,
  "priceChange24hUsd": -157.44094,
  "initialMarginFraction": 0.02,
  "openInterestUsdApprox": 63764100,
  "nextFundingRatePerHour": 0.00000732638888888889,
  "maintenanceMarginFraction": 0.012
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dydx-chain-perpetual-markets-data-e7cb6b99/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.chainmarket-api.workers.dev](https://www.zero.xyz/host/api.chainmarket-api.workers.dev/llms.txt)
