Perp open interest
POST /api/perp-open-interestOpen interest for perpetuals in coins and USD notional. Send POST /api/perp-open-interest with no required fields (2 optional) and pay $0.001 per call over x402 or MPP (there is no free tier). It returns a JSON object with source, totalOpenInterestUsd, markets and fetchedAt.
Pass coin for one market (with its share of total open interest) or omit it for the top N markets ranked by USD open interest plus the venue total. Hyperliquid public data, no key.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
coin | string | no | Optional perp ticker for a single market (e.g. BTC). |
limit | number | no | Rows when ranking (default 20, max 500). |
Example request
curl -i -X POST https://agent402.tools/api/perp-open-interest \
-H "Content-Type: application/json" \
-d '{"limit":10}'Without payment this returns HTTP 402 Payment Required with the exact price for perp-open-interest; any x402 v2 or MPP client pays it and retries.
Watch a call get paid
POST /api/perp-open-interest$0.001 USDCPAYMENT-SIGNATUREon 14 chains200 OKAgent402-ReceiptEd25519Example response
{
"source": "hyperliquid",
"totalOpenInterestUsd": 9500000000,
"markets": [
{
"coin": "BTC",
"openInterest": 35935.67,
"openInterestUsd": 2776803000,
"shareOfTotalPct": 29.2,
"markPx": 77267,
"volume24hUsd": 4679441788.67
}
],
"fetchedAt": "2026-08-22T12:00:00.000Z"
}| Field | Type | Always present | In the example |
|---|---|---|---|
source | string | yes | hyperliquid |
totalOpenInterestUsd | number | yes | 9500000000 |
markets | array of objects | yes | 1 item in the example |
fetchedAt | string | yes | 2026-08-22T12:00:00.000Z |
From an MCP client
catalog.call {
"slug": "perp-open-interest",
"params": {
"limit": 10
}
}The hosted connector at https://agent402.tools/mcp needs a payment for perp-open-interest; the stdio package pays it from a wallet or from an AGENT402_CREDITS_KEY issued earlier. Local install: npx -y agent402-mcp@0.14.0.
Errors and behavior
- Every field is optional. An input the tool rejects returns an HTTP 4xx whose body carries
error,tool,expected,requiredandexample. - A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement runs after the tool and only on a successful response. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - A
GETorHEADto /api/perp-open-interest returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.001" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/perp-open-interest", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"limit": 10
}),
});Related tools
Perp markets snapshot
Snapshot of every listed perpetual on Hyperliquid in one call: mark and oracle price, 24h change, hourly funding (plus.
Perp premium and predicted funding
Basis view for one perpetual: mark, oracle and mid price, mark-vs-oracle premium in percent and bps, the impact premium.
Perp dex limits and status (HIP-3)
Risk limits and status of ONE builder-deployed perp dex (HIP-3): total open-interest cap, per-perp OI size cap, max.
Perp dex markets snapshot (HIP-3)
Snapshot of every market on ONE builder-deployed perp dex (HIP-3): mark and oracle price, 24h change, hourly funding.
Perp dexs (HIP-3 builder-deployed)
Every builder-deployed perpetuals dex on Hyperliquid (HIP-3): dex name, full name, deployer, oracle updater and fee.
Perp funding rate and history
Current funding rate for one perpetual (hourly, per 8h and annualized) plus the last N hourly funding prints.