What you'll build
A script that polls funding rate data from Binance Futures and Hyperliquid via Kwery, computes the spread, and flags opportunities where the differential exceeds a configurable threshold.
Prerequisites
- A Kwery API key (get one here)
- Python 3.10+
requestsandpandasinstalled
Outline
- Fetch Binance Futures funding rates
- Fetch Hyperliquid funding rates
- Normalize and join the datasets
- Compute the funding rate spread
- Filter for actionable opportunities
Step 1 — Fetch Binance Futures data
Pull funding rate information from the /v1/binance/futures/{symbol} endpoint for your target symbols.
curl "https://kwery-api.com/v1/binance/futures/BTCUSDT?api-key=YOUR_KEY"
Section coming soon — will include Python code to iterate over a symbol list.
Step 2 — Fetch Hyperliquid data
Pull the equivalent data from /v1/hyperliquid/{symbol}.
curl "https://kwery-api.com/v1/hyperliquid/BTC?api-key=YOUR_KEY"
Section coming soon.
Step 3 — Normalize and join
Map Binance and Hyperliquid symbol conventions to a common key and merge into a single DataFrame.
Section coming soon.
Step 4 — Compute the spread
Calculate the annualized funding rate differential between the two venues for each symbol.
Section coming soon.
Step 5 — Filter for opportunities
Apply a minimum spread threshold and rank results by expected annualized return.
Section coming soon.
Next steps
- Automate with a cron job or scheduled task
- Add alerting via webhook or email
- Incorporate spot price data from
/v1/binance/spotfor basis-adjusted analysis