# GET /perps/markets: $0.003 per call

Every perpetual futures market on Hyperliquid and dYdX side by side: which venues list each coin, price, open interest, 24h volume, max leverage and funding (hourly and APR) on each, plus the cross-venue funding spread and where longs pay least. Pass ?sort=fundingSpread&limit=20 for arbitrage candidates, or ?coin=SOL for one coin.

- **Price:** $0.003 in USDC, the same on Base, Solana, Polygon, Arbitrum. Failed calls are never charged.
- **Free trial:** yes, 20 free calls a day from Claude, Cursor or any MCP client ([set-up](/mcp/setup)).
- **Answers cached for:** 1 min
- **Data sources:** Hyperliquid public info API; dYdX v4 public indexer
- **Lane:** Perpetual futures data ([OpenAPI](/openapi/perps.json))
- **Live health:** [status page](/status)

## Free sample

See an answer for the demo input first, free (no payment, 10 a minute): [https://aayatai.com/sample/perps-markets](/sample/perps-markets). It is a stored real answer when we have one, otherwise an example marked `"kind": "illustrative"`.

```bash
curl "https://aayatai.com/sample/perps-markets"
```

## 1. See the price (free)

Call it without paying: you get `402 Payment Required` and a `PAYMENT-REQUIRED` header with the exact price and where to pay.

```bash
curl -i "https://aayatai.com/perps/markets?sort=openInterest&limit=3"
```

## 2. Pay and call (TypeScript)

```bash
npm install @x402/fetch @x402/evm viem
```

```ts
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

// A wallet used only by your agent, holding a little USDC on Base.
const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);
const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});

const res = await pay("https://aayatai.com/perps/markets?sort=openInterest&limit=3");
console.log(await res.json());
```

## 3. Or as an MCP tool

```ts
// MCP server: https://aayatai.com/mcp (Streamable HTTP). With the x402 MCP client (see /start):
const result = await client.callTool("perps-markets", {"sort":"openInterest","limit":3});
```

## Inputs

- `coin` (string): Market symbol, e.g. BTC, SOL. Leave out to list every market.
- `sort` (string; one of `openInterest`, `volume`, `fundingSpread`, `coin`; default `openInterest`): openInterest (default, combined USD), volume, fundingSpread (largest cross-venue APR gap first) or coin.
- `limit` (integer; default `50`): How many markets to list (1-300).
- `detail` (string; one of `full`, `brief`; default `full`): brief = key fields only (same price)

Bad inputs are rejected with HTTP 400 before any payment is asked for.

## Example answer

Example only: the shape of an answer, with placeholder addresses and made-up figures. It is not data about any real token or wallet; call the service (or its free sample) for real results.

```json
{
  "asOf": "2026-09-29T21:30:00.000Z",
  "venues": [
    {
      "venue": "hyperliquid",
      "markets": 4,
      "dataAsOf": "2026-09-29T21:30:00.000Z",
      "stale": false,
      "error": null
    },
    {
      "venue": "dydx",
      "markets": 3,
      "dataAsOf": "2026-09-29T21:30:00.000Z",
      "stale": false,
      "error": null
    }
  ],
  "markets": [
    {
      "coin": "ETH",
      "venues": [
        "hyperliquid",
        "dydx"
      ],
      "hyperliquid": {
        "markPx": 2685.1,
        "openInterestUsd": 3173346743,
        "dayVolumeUsd": 1323668278,
        "fundingRate": 0.0000125,
        "fundingAprPct": 10.95,
        "maxLeverage": 25
      },
      "dydx": {
        "markPx": 2695.197807,
        "openInterestUsd": 16775345,
        "dayVolumeUsd": 25385104,
        "fundingRate": 0.00009308189655172414,
        "fundingAprPct": 81.54,
        "maxLeverage": 50
      },
      "openInterestUsd": 3190122088,
      "dayVolumeUsd": 1349053382,
      "fundingSpreadAprPct": 70.59,
      "cheapestLong": "hyperliquid",
      "bestShort": "dydx"
    },
    {
      "coin": "BTC",
      "venues": [
        "hyperliquid",
        "dydx"
      ],
      "hyperliquid": {
        "markPx": 83401,
        "openInterestUsd": 2978758763,
        "dayVolumeUsd": 2325126301,
        "fundingRate": 0.0000125,
        "fundingAprPct": 10.95,
        "maxLeverage": 40
      },
      "dydx": {
        "markPx": 83508.6,
        "openInterestUsd": 17094745,
        "dayVolumeUsd": 10907169,
        "fundingRate": -2.5431034482759e-7,
        "fundingAprPct": -0.22,
        "maxLeverage": 50
      },
      "openInterestUsd": 2995853508,
      "dayVolumeUsd": 2336033470,
      "fundingSpreadAprPct": 11.17,
      "cheapestLong": "dydx",
      "bestShort": "hyperliquid"
    },
    {
      "coin": "HYPE",
      "venues": [
        "hyperliquid"
      ],
      "hyperliquid": {
        "markPx": 85.845,
        "openInterestUsd": 1798592768,
        "dayVolumeUsd": 497535675,
        "fundingRate": 0.0000125,
        "fundingAprPct": 10.95,
        "maxLeverage": 10
      },
      "dydx": null,
      "openInterestUsd": 1798592768,
      "dayVolumeUsd": 497535675,
      "fundingSpreadAprPct": null,
      "cheapestLong": null,
      "bestShort": null
    }
  ],
  "totals": {
    "coins": 4,
    "onBothVenues": 3
  },
  "attribution": [
    "Data from Hyperliquid's public info API (api.hyperliquid.xyz).",
    "Data from the dYdX v4 public indexer (indexer.dydx.trade)."
  ]
}
```

## Related

- [GET /perps/funding](/services/perps-funding) ($0.003): Perpetual futures funding rates from Hyperliquid and dYdX: the current hourly rate, 8-hour and annualised equivalents, premium, mark and oracle price and open i
- [GET /perps/open-interest](/services/perps-open-interest) ($0.002): Open interest on Hyperliquid or dYdX perpetual futures: contracts and USD value per market, share of the venue total, 24h volume, volume/OI, 24h price change an
- [GET /perps/orderbook](/services/perps-orderbook) ($0.002): Live order book for a perpetual futures market on Hyperliquid or dYdX: best bid and ask, spread in bps, USD depth within 10/50/100 bps of mid, and the average f

New here? [Getting started in 60 seconds](/start). All services: [Aayat AI](/).