# GET /perps/open-interest: $0.002 per call

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 and the current funding rate, plus venue totals. Pass ?coin=ETH for one market, or ?limit=20 for the largest markets by open interest; &venue=dydx for dYdX.

- **Price:** $0.002 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-open-interest](/sample/perps-open-interest). It is a stored real answer when we have one, otherwise an example marked `"kind": "illustrative"`.

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

## 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/open-interest?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/open-interest?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-open-interest", {"limit":3});
```

## Inputs

- `coin` (string): Market symbol, e.g. BTC, ETH, SOL. Leave out for the largest markets by open interest.
- `limit` (integer; default `20`): Without coin: how many markets to list, largest open interest first (1-100).
- `venue` (string; one of `auto`, `hyperliquid`, `dydx`; default `auto`): auto (default: Hyperliquid, or dYdX while Hyperliquid is unavailable), hyperliquid or dydx.
- `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
{
  "venue": "hyperliquid",
  "asOf": "2026-09-29T18:24:24.567Z",
  "markets": [
    {
      "coin": "ETH",
      "openInterest": 1181835.5902,
      "openInterestUsd": 3173346743,
      "shareOfTotalPct": 36.82,
      "dayVolumeUsd": 1323668278,
      "volumeToOi": 0.417,
      "markPx": 2685.1,
      "prevDayPx": 2696.5,
      "dayChangePct": -0.42,
      "fundingRate": 0.0000125,
      "maxLeverage": 25
    },
    {
      "coin": "BTC",
      "openInterest": 35716.10368,
      "openInterestUsd": 2978758763,
      "shareOfTotalPct": 34.57,
      "dayVolumeUsd": 2325126301,
      "volumeToOi": 0.781,
      "markPx": 83401,
      "prevDayPx": 83932,
      "dayChangePct": -0.63,
      "fundingRate": 0.0000125,
      "maxLeverage": 40
    },
    {
      "coin": "HYPE",
      "openInterest": 20951631.06,
      "openInterestUsd": 1798592768,
      "shareOfTotalPct": 20.87,
      "dayVolumeUsd": 497535675,
      "volumeToOi": 0.277,
      "markPx": 85.845,
      "prevDayPx": 88.701,
      "dayChangePct": -3.22,
      "fundingRate": 0.0000125,
      "maxLeverage": 10
    }
  ],
  "totals": {
    "markets": 4,
    "openInterestUsd": 8617484787,
    "dayVolumeUsd": 4363574682
  },
  "attribution": "Data from Hyperliquid's public info API (api.hyperliquid.xyz)."
}
```

## 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

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