← all AgentPay tools

open_interest

Get total open interest in perpetual futures for a given asset, including 1h and 24h change percentages, long/short ratio, and per-exchange breakdown. Pairs with funding_rates to complete the derivatives picture..

Free defi x402 protocol no API key · no wallet

When agents use this

You need to know total open interest in perpetual futures and whether it's rising or falling. Combine with funding_rates for a full derivatives picture.

Parameters

nametyperequireddescription
symbolstringyesAsset symbol, e.g. BTC or ETH

Returns

total_oi_usd, oi_change_1h_pct, oi_change_24h_pct, long_short_ratio, per-exchange breakdown

Example response

{
  "asset": "ETH",
  "price_usd": 2069.73,
  "total_oi_usd": 8420000000.0,
  "oi_change_1h_pct": 1.2,
  "oi_change_24h_pct": 12.4,
  "long_short_ratio": 1.08,
  "exchanges": [
    {
      "exchange": "Binance",
      "oi_contracts": 4066123.5,
      "oi_change_1h_pct": 1.2,
      "oi_change_24h_pct": 12.4,
      "long_short_ratio": 1.08
    }
  ],
  "source": "binance/bybit"
}

Call it — HTTP (x402)

curl -X POST https://agentpay.tools/tools/open_interest/call \
  -H 'Content-Type: application/json' \
  -d '{"parameters": {"symbol": "Asset symbol, e.g. BTC or ETH"}, "agent_address": "<your wallet or any identifier>"}'

Call it — Python SDK

from agentpay import quickstart  # pip install agentpay-x402

s = quickstart(max_spend=0.10)   # hard budget cap; mints a wallet, no funding needed
r = s.call("open_interest", {"symbol": "Asset symbol, e.g. BTC or ETH"})
print(r.data)                    # + r.cost, r.tx, r.network — full receipt

Call it — MCP

npx -y @romudille/agentpay-mcp   # keyless; exposes open_interest to any MCP agent runtime
All tools · x402 delivery scores · Receipt ledger · Guides · llms.txt · AgentPay