# TradeSonar dYdX Markets List

> TradeSonar dYdX Markets List is a paid API for AI agents from api.tradesonar.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-10).

Returns a list of dYdX perpetual markets with status, oracle price, open interest, and freshness metadata (block height + replica lag).

## Facts

- Endpoint: GET https://api.tradesonar.io/v1/markets?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tradesonar-dydx-markets-list-781806bf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_akRRAqeqE2qYzZFGxjh85

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 tradesonar-dydx-markets-list-781806bf
```

Example prompt: Pull the current list of active dYdX perpetual markets from TradeSonar, including their oracle prices and open interest in USD.

## When to prefer this

Use this endpoint when you need a real-time enumeration of dYdX on-chain perpetual markets with oracle prices and open interest, especially when data freshness (block-stamped) is important. Prefer this over generic crypto market data APIs when the user specifically wants dYdX on-chain data with smart-money or crowding context.

## Known failure modes

- Invalid query parameter type for active_only returns a 400 validation error
- Service unavailable or replica lag exceeds threshold may return stale data or 503
- Payment not included or insufficient USDC balance results in x402 Payment Required response
- Empty markets array returned if no markets match the active_only filter unexpectedly

## How this service works

List markets with price and open interest

## Output

A JSON object containing an array of dYdX perpetual market records, each with status (e.g. ACTIVE), ticker symbol, oracle price, perpetual ID, and open interest in USD. The response includes a data_as_of field stamped with block height and replica lag for freshness verification.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "active_only": {
       "type": "boolean",
       "default": true,
       "description": "Only return ACTIVE markets"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "markets": [
    {
     "status": "...",
     "ticker": "...",
     "oraclePrice": "...",
     "perpetualId": 0,
     "openInterestUsd": "..."
    }
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tradesonar-dydx-markets-list-781806bf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.tradesonar.io](https://www.zero.xyz/host/api.tradesonar.io/llms.txt)
