compare_funding_rates
Compare current funding rates of a perpetual contract across multiple exchanges to identify arbitrage opportunities and assess market positioning. Returns spread in basis points between highest and lowest rates.
Instructions
Compare the current funding rate for one perp across multiple exchanges, in parallel.
Use this to find funding-rate arbitrage opportunities (long the venue
paying you, short the venue charging you) or to gauge how lopsided
positioning is across the market. The spread_bps field is
(max - min) * 10000 and tells you how big the dispersion is in basis
points. For a single exchange snapshot use get_funding_rate; for
historical trend on one venue use get_funding_rate_history.
Symbol convention: linear USDT-margined perps use "BTC/USDT:USDT" on
most venues. BitMEX's flagship is the inverse contract "BTC/USD:BTC", so
if you pass a USDT linear symbol the BitMEX branch will return an error
inline — that's expected. Branches that fail (unsupported symbol, geo-
block, rate limit) return {"exchange": ..., "error": ...} rather than
sinking the whole call.
Args: symbol: CCXT unified perp symbol. Default "BTC/USDT:USDT". exchange_ids: Comma-separated CCXT exchange IDs. Default "binance,okx,bybit,bitmex".
Returns:
{"symbol", "rates": [...], "max", "min", "spread_bps", "n_ok",
"n_error"}. Each rate row is either
{"exchange", "fundingRate", "nextFundingTimestamp", "markPrice"}
on success or {"exchange", "error"} on failure. max/min/
spread_bps are populated only when at least two branches returned
numeric fundingRate values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | BTC/USDT:USDT | |
| exchange_ids | No | binance,okx,bybit,bitmex |