# AgentPay Funding Spread

> AgentPay Funding Spread is a paid API for AI agents from agentpay.tools, paid per call via x402, $0.01/call, status unknown (last checked 2026-12-02).

Returns cross-venue perpetual futures funding rate divergence for a single asset, normalised to 8h intervals across up to 9 exchanges, with spread metrics, 7-day percentile context, and an optional carry trade estimate net of taker fees.

## Facts

- Endpoint: POST https://agentpay.tools/tools/funding_spread/call?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentpay-funding-spread-8f5764bc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RMM6EdfChrO6X9B0DodAi

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentpay-funding-spread-8f5764bc -d '<json body>'
```

Example prompt: What's the funding rate spread for ETH perps across all major venues right now — which exchange is cheapest, which is most expensive, and if I put on a $20,000 carry trade (long cheapest, short dearest), what would I net per day after taker fees?

## When to prefer this

Use this endpoint when you need a normalised, apples-to-apples comparison of perpetual funding rates across multiple exchanges simultaneously, especially when evaluating basis/carry arbitrage opportunities. It is preferable to raw venue APIs when you need the spread context (not just individual rates), 7-day percentile framing, and a fee-adjusted carry estimate in a single call. Choose it over generic market data APIs when the goal is cross-venue funding divergence analysis rather than price or volume data.

## Known failure modes

- Symbol not found or unsupported — no venue data returned
- Majority of venues geo-blocked or rate-limited — fewer than expected venues answered, partial data returned with unavailable list
- Network timeout fetching live funding rates — stale or missing venue entries
- Invalid symbol string (e.g. 'BTCUSDT' instead of 'BTC') — may return empty or partial results
- notional_usd of zero or negative — carry estimate may be omitted or zero

## How this service works

Cross-venue perp funding divergence for one asset: per-venue funding normalised to 8h across Binance, Bybit, OKX, Gate.io, Bitget, Hyperliquid, dYdX, MEXC and KuCoin, the spread (max-min, cheapest and dearest venue), its 7-day percentile, and a carry estimate for a given notional net of taker fees. The basis/carry arbitrage read, not the raw rates.

## Output

A structured payload containing: per-venue funding rates normalised to 8h (with raw rate and interval), the spread in bps and percent, the cheapest and dearest venue, annualised spread percentage, a 7-day history summary with current percentile (p50, p90, max), and — if notional_usd is provided — a carry estimate with per-8h, per-day, and per-30d USD P&L, round-trip taker fee cost, and breakeven hold time in hours. Also lists any venues unavailable due to geo-blocks or errors.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "parameters": {
   "type": "object",
   "required": [
    "symbol"
   ],
   "properties": {
    "symbol": {
     "type": "string",
     "description": "Perp underlying, e.g. 'BTC', 'ETH', 'SOL'"
    },
    "notional_usd": {
     "type": "number",
     "description": "Optional position size for the carry estimate"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "read": "ETH funding 0.0390%/8h on dydx vs 0.0100% on okx — 2.9 bps/8h, 77th percentile of the last 7 days (7 of 9 venues answered)",
 "as_of": "2026-11-05T12:41:00+00:00",
 "asset": "ETH",
 "spread": {
  "bps_8h": 2.9,
  "pct_8h": 0.029,
  "dearest": "dydx",
  "cheapest": "okx",
  "median_8h_pct": 0.01,
  "annualized_pct": 31.75,
  "max_deviation_from_median_pct": 0.029
 },
 "venues": [
  {
   "venue": "okx",
   "rate_8h_pct": 0.01,
   "raw_rate_pct": 0.01,
   "interval_hours": 8,
   "next_funding_time": 1793923200000,
   "rate_annualized_pct": 10.95
  },
  {
   "venue": "hyperliquid",
   "rate_8h_pct": 0.01,
   "raw_rate_pct": 0.00125,
   "interval_hours": 1,
   "next_funding_time": 1793883600000,
   "rate_annualized_pct": 10.95
  },
  {
   "venue": "dydx",
   "rate_8h_pct": 0.039,
   "raw_rate_pct": 0.004875,
   "interval_hours": 1,
   "next_funding_time": 1793883600000,
   "rate_annualized_pct": 42.7
  }
 ],
 "history": {
  "days": 7,
  "buckets": 22,
  "spread_pct_8h_max": 0.05698,
  "spread_pct_8h_p50": 0.0125,
  "spread_pct_8h_p90": 0.04242,
  "current_percentile": 77,
  "venues_with_history": [
   "dydx",
   "hyperliquid",
   "okx"
  ]
 },
 "carry_estimate": {
  "long_on": "okx",
  "short_on": "dydx",
  "per_8h_usd": 2.9,
  "assumptions": "taker 0.05% per leg on both venues, open and close; spread held constant; no slippage, no basis move",
  "per_30d_usd": 261,
  "per_day_usd": 8.7,
  "notional_usd": 10000,
  "breakeven_hours": 55.2,
  "taker_fees_round_trip_usd": 20
 },
 "venues_unavailable": {
  "bybit": "geo-blocked (403)",
  "binance": "geo-blocked (451)"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentpay-funding-spread-8f5764bc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentpay.tools](https://www.zero.xyz/host/agentpay.tools/llms.txt)
