Cross-Exchange Funding Rate Analysis
We built an open-source Jupyter notebook that compares BTC funding rates across Hyperliquid and Lighter.xyz using historical data from 0xArchive.
What It Does
oxarchive Python SDK clientSide-by-side funding rate comparison - see how rates move across venues
Spread analysis with +/-2 sigma statistical threshold bands
Annualized carry (APR) with filled spread area
Arbitrage opportunity window detection with shaded regions
Cumulative hypothetical P&L from spread-harvesting
Distribution analysis with skew/kurtosis stats
Example Output (7-day window)
9,925 HL + 38,040 Lighter snapshots, 110 aligned hours, 2 arb windows detected, 25 bps hypothetical P&L (13% annualized).
Get Started
pip install -r requirements.txtcp .env.example .envjupyter notebook funding_rate_scanner.ipynbWorks with a free API key from 0xarchive.io/dashboard (BTC, 30-day lookback).
Links
This is our second example - showcasing the SDK's multi-exchange capability. More examples coming (OI divergence, market microstructure).
