← all AgentPay tools

funding_rates

Get perpetual futures funding rates across Binance, Bybit, and OKX.

Free defi x402 protocol no API key · no wallet

When agents use this

You need funding rates to gauge leveraged market sentiment or cost of holding a perp position.

Parameters

nametyperequireddescription
assetstringnoToken symbol, e.g. 'BTC', 'ETH'. Leave empty for all major assets.

Returns

funding_rate_pct, annualized_rate_pct and a contrarian sentiment per exchange: bearish = longs are paying (crowded longs), bullish = shorts are paying (crowded shorts), neutral = near the 0.01% equilibrium

Example response

{
  "asset": "BTC",
  "rates": [
    {
      "asset": "BTC",
      "exchange": "Binance",
      "funding_rate_pct": 0.036,
      "interval_hours": 8.0,
      "funding_rate_8h_pct": 0.036,
      "annualized_rate_pct": 39.42,
      "next_funding_time": 1794844800000,
      "sentiment": "bearish"
    },
    {
      "asset": "BTC",
      "exchange": "Bybit",
      "funding_rate_pct": 0.012,
      "interval_hours": 8.0,
      "funding_rate_8h_pct": 0.012,
      "annualized_rate_pct": 13.14,
      "next_funding_time": 1794844800000,
      "sentiment": "neutral"
    },
    {
      "asset": "BTC",
      "exchange": "OKX",
      "funding_rate_pct": -0.012,
      "interval_hours": 8.0,
      "funding_rate_8h_pct": -0.012,
      "annualized_rate_pct": -13.14,
      "next_funding_time": 1794844800000,
      "sentiment": "bullish"
    }
  ],
  "count": 3,
  "sources": [
    "Binance",
    "Bybit",
    "OKX"
  ]
}

Call it — HTTP (x402)

curl -X POST https://agentpay.tools/tools/funding_rates/call \
  -H 'Content-Type: application/json' \
  -d '{"parameters": {}, "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("funding_rates", {})
print(r.data)                    # + r.cost, r.tx, r.network — full receipt

Call it — MCP

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