Perp DEX vs CEX Funding
Hourly-funded perp DEXs drift away from CEX funding; hedge one against the other and earn the gap.
- SignalGap ≥ 25% APR
- EntryShort DEX · long CEX
- ExitGap < 8%
How it works
Two legs, one spread · holds days- funding_rate_latest24/hHourly DEX print and the CEX print
- funding_rate_history2/h24h average gap
- cex_symbol_oi_stats4/hOpen interest per venue
- SignalGap ≥ 25% APRHyperliquid 1h vs Binance 8h funding, both as APR
- EntryShort DEX · long CEXOn the 24h average; DEX open interest ≥ $20M
- ExitGap < 8%Or 14 days in the trade
- RiskHalt on bridge incident30% bridge buffer; leg ≤ 5% of DEX open interest
The signal
BTC · funding APR · Hyperliquid vs Binance · sample- Gap (DEX − CEX)
- Hyperliquid
- Binance
| Date (UTC) | Gap (DEX − CEX) | Hyperliquid | Binance |
|---|---|---|---|
| Oct 4 | -3.83% | 4.86% | 8.69% |
| Oct 5 | 1.43% | 8.38% | 6.95% |
| Oct 6 | 4% | 10.85% | 6.85% |
| Oct 7 | 2.56% | 9.62% | 7.06% |
| Oct 8 | 5.14% | 10.07% | 4.93% |
| Oct 9 | 9.89% | 12.76% | 2.87% |
| Oct 10 | 8.33% | 11.75% | 3.42% |
| Oct 11 | 4.06% | 8% | 3.94% |
| Oct 12 | 4.7% | 7.61% | 2.91% |
| Oct 13 | 5.35% | 8.75% | 3.4% |
| Oct 14 | 0.63% | 6.64% | 6.01% |
| Oct 15 | -2.02% | 5.11% | 7.13% |
| Oct 16 | 31.81% | 38.43% | 6.62% |
| Oct 17 | 29.96% | 37.6% | 7.64% |
| Oct 18 | 24.86% | 34.03% | 9.17% |
| Oct 19 | 24.52% | 32.66% | 8.14% |
| Oct 20 | 28.18% | 34.64% | 6.46% |
| Oct 21 | 26.71% | 33.72% | 7.01% |
| Oct 22 | 22.05% | 29.61% | 7.56% |
| Oct 23 | 21.93% | 28.22% | 6.29% |
| Oct 24 | 22.13% | 28.4% | 6.27% |
| Oct 25 | 16.22% | 24.94% | 8.72% |
| Oct 26 | 10.84% | 21.07% | 10.23% |
| Oct 27 | 11.71% | 21.89% | 10.18% |
| Oct 28 | 11.78% | 23.48% | 11.7% |
| Oct 29 | 7.93% | 22.03% | 14.1% |
| Oct 30 | 8.33% | 22.31% | 13.98% |
| Oct 31 | 13.79% | 26.41% | 12.62% |
| Nov 1 | 15.16% | 28.2% | 13.04% |
| Nov 2 | 12.93% | 26.3% | 13.37% |
| Nov 3 | 14.96% | 26.4% | 11.44% |
| Nov 4 | 17.76% | 27.93% | 10.17% |
| Nov 5 | 13.86% | 25.27% | 11.41% |
| Nov 6 | 8.69% | 20.79% | 12.1% |
| Nov 7 | 8.89% | 20.16% | 11.27% |
| Nov 8 | 8.3% | 20.41% | 12.11% |
| Nov 9 | 2.98% | 17.41% | 14.43% |
| Nov 10 | 1.16% | 15.78% | 14.62% |
| Nov 11 | 5.3% | 18.63% | 13.33% |
| Nov 12 | 6.69% | 20.33% | 13.64% |
| Nov 13 | 4.69% | 18.61% | 13.92% |
| Nov 14 | 7.29% | 18.9% | 11.61% |
| Nov 15 | 11.98% | 21.25% | 9.27% |
| Nov 16 | 10.32% | 19.6% | 9.28% |
| Nov 17 | 6.24% | 15.19% | 8.95% |
Sample backtest
Sample · illustrative 120D · not real performance| Date (UTC) | Equity |
|---|---|
| Jul 21 | -0.03% |
| Jul 22 | 0.02% |
| Jul 23 | 0.08% |
| Jul 24 | 0.12% |
| Jul 25 | 0.18% |
| Jul 26 | 0.16% |
| Jul 27 | 0.14% |
| Jul 28 | 0.18% |
| Jul 29 | 0.2% |
| Jul 30 | 0.3% |
| Jul 31 | 0.41% |
| Aug 1 | 0.45% |
| Aug 2 | 0.52% |
| Aug 3 | 0.55% |
| Aug 4 | 0.59% |
| Aug 5 | 0.71% |
| Aug 6 | 0.82% |
| Aug 7 | 0.95% |
| Aug 8 | 1.07% |
| Aug 9 | 1.1% |
| Aug 10 | 1.16% |
| Aug 11 | 1.22% |
| Aug 12 | 1.28% |
| Aug 13 | 1.41% |
| Aug 14 | 1.5% |
| Aug 15 | 1.55% |
| Aug 16 | 1.59% |
| Aug 17 | 1.56% |
| Aug 18 | 1.58% |
| Aug 19 | 1.63% |
| Aug 20 | 1.67% |
| Aug 21 | 1.75% |
| Aug 22 | 1.77% |
| Aug 23 | 1.74% |
| Aug 24 | 1.75% |
| Aug 25 | 1.74% |
| Aug 26 | 1.78% |
| Aug 27 | 1.88% |
| Aug 28 | 1.93% |
| Aug 29 | 1.99% |
| Aug 30 | 2.04% |
| Aug 31 | 2.03% |
| Sep 1 | 2.1% |
| Sep 2 | 2.19% |
| Sep 3 | 2.29% |
| Sep 4 | 2.44% |
| Sep 5 | 2.52% |
| Sep 6 | 2.58% |
| Sep 7 | 2.65% |
| Sep 8 | 2.68% |
| Sep 9 | 2.8% |
| Sep 10 | 2.92% |
| Sep 11 | 3.01% |
| Sep 12 | 3.1% |
| Sep 13 | 3.13% |
| Sep 14 | 3.12% |
| Sep 15 | 3.17% |
| Sep 16 | 3.2% |
| Sep 17 | 3.28% |
| Sep 18 | 3.36% |
| Sep 19 | 3.36% |
| Sep 20 | 3.37% |
| Sep 21 | 3.35% |
| Sep 22 | 3.33% |
| Sep 23 | 3.39% |
| Sep 24 | 3.44% |
| Sep 25 | 3.5% |
| Sep 26 | 3.57% |
| Sep 27 | 3.55% |
| Sep 28 | 3.57% |
| Sep 29 | 3.62% |
| Sep 30 | 3.67% |
| Oct 1 | 3.81% |
| Oct 2 | 3.92% |
| Oct 3 | 3.99% |
| Oct 4 | 4.07% |
| Oct 5 | 4.1% |
| Oct 6 | 4.16% |
| Oct 7 | 4.29% |
| Oct 8 | 4.39% |
| Oct 9 | 4.52% |
| Oct 10 | 4.62% |
| Oct 11 | 4.63% |
| Oct 12 | 4.68% |
| Oct 13 | 4.71% |
| Oct 14 | 4.77% |
| Oct 15 | 4.88% |
| Oct 16 | 4.93% |
| Oct 17 | 4.96% |
| Oct 18 | 4.98% |
| Oct 19 | 4.93% |
| Oct 20 | 4.95% |
| Oct 21 | 4.99% |
| Oct 22 | 5.03% |
| Oct 23 | 5.11% |
| Oct 24 | 5.13% |
| Oct 25 | 5.12% |
| Oct 26 | 5.14% |
| Oct 27 | 5.14% |
| Oct 28 | 5.21% |
| Oct 29 | 5.33% |
| Oct 30 | 5.4% |
| Oct 31 | 5.49% |
| Nov 1 | 5.54% |
| Nov 2 | 5.56% |
| Nov 3 | 5.66% |
| Nov 4 | 5.75% |
| Nov 5 | 5.88% |
| Nov 6 | 6.02% |
| Nov 7 | 6.08% |
| Nov 8 | 6.14% |
| Nov 9 | 6.19% |
| Nov 10 | 6.22% |
| Nov 11 | 6.33% |
| Nov 12 | 6.43% |
| Nov 13 | 6.49% |
| Nov 14 | 6.56% |
| Nov 15 | 6.54% |
| Nov 16 | 6.53% |
| Nov 17 | 6.57% |
Generated to show the shape of the strategy, not measured on real fills. Ask your agent to backtest on DataMaxi+ history before trading.
Backtest this strategy
One prompt: your agent pulls the history below, tests these rules with fees and slippage, and charts the equity curve and drawdown. Run it before you trust the sample above.
- Period
- The last 120 days; Hyperliquid funds hourly, Binance every 8 hours
- History calls
- 170
- Credits
- 925
- Cost per run
- ≈ $0.0925
Backtest the "Perp DEX vs CEX Funding" strategy on DataMaxi+ history. Thesis: Hourly-funded perp DEXs drift away from CEX funding; hedge one against the other and earn the gap. Use the DataMaxi+ MCP server at https://mcp.datamaxiplus.com/mcp. Pull the history once, cache it, and run the backtest in your own code sandbox (Python is fine). ## History to pull (split the period with from/to; never refetch a range you have) 1. funding_rate_history(exchange="hyperliquid", symbol="BTC-USD", limit="100") — every funding print, 100 per call; about 145 calls 2. funding_rate_history(exchange="binance", symbol="BTC-USDT", limit="100") — every funding print, 100 per call; about 20 calls 3. open_interest_history_aggregated(token_id="bitcoin", interval="1d") — aggregated OI per token; one call covers a year of daily or 30 days of 4h buckets; about 5 calls Universe: BTC, ETH, SOL, HYPE and DOGE; Hyperliquid against Binance perps Period: the last 120 days; Hyperliquid funds hourly, Binance every 8 hours ## Rules to test Signal: Hyperliquid (1h) vs Binance (8h) funding on the same perp, both converted to APR. Entry: Gap ≥ 25% APR on the 24h average, open interest ≥ $20M on the DEX side. Exit: 24h gap < 8% APR, or 14 days. Risk: Keep a bridge buffer of 30% on the DEX side. Leg cap 5% of DEX open interest. Halt on any oracle or bridge incident. ## Assumptions Costs: 0.045% Hyperliquid and 0.05% Binance taker per leg, 0.05% slippage per leg Data: Open interest comes from daily aggregated buckets, not the DEX side alone; treat the $20M filter as approximate. Use only data stamped before each decision (no look-ahead). Say plainly where the data cannot test a rule. ## Report Net return, annualised return, Sharpe, max drawdown, number of trades, win rate and average hold, next to buy-and-hold over the same period. Chart the equity curve and the drawdown, and list the 5 worst trades. ## Budget About 170 history calls ≈ 925 credits ≈ $0.0925 from my prepaid DataMaxi+ balance. Tell me how many calls you made. If DataMaxi+ is not connected, ask me to [connect DataMaxi+](https://claude.ai/customize/connectors?modal=add-custom-connector) using https://mcp.datamaxiplus.com/mcp before continuing.
Estimate from the call counts in the prompt. Your agent may pull less or more; it reports the calls it made.
Rules
| Signal | Hyperliquid (1h) vs Binance (8h) funding on the same perp, both converted to APR. |
|---|---|
| Entry | Gap ≥ 25% APR on the 24h average, open interest ≥ $20M on the DEX side. |
| Exit | 24h gap < 8% APR, or 14 days. |
| Risk | Keep a bridge buffer of 30% on the DEX side. Leg cap 5% of DEX open interest. Halt on any oracle or bridge incident. |
Data used
≈ $0.0912 / day| MCP tool · REST route | Dataset | Tier | Calls / h | Credits / day | USD / day |
|---|---|---|---|---|---|
funding_rate_latest GET /funding-rate/latest | Funding rate | Latest · 1 cr | 24 | 576 | $0.0576 |
funding_rate_history GET /funding-rate/history | Funding rate | History · 5 cr | 2 | 240 | $0.024 |
cex_symbol_oi_stats GET /cex/symbol/oi-stats | Open interest | Latest · 1 cr | 4 | 96 | $0.0096 |
| Total | 30 | 912 | $0.0912 |
1 credit = $0.0001. Only successful calls are billed, from one balance shared by the API and MCP. Calls per hour are the suggested cadence; scale them to the symbols you watch.
Build it with your agent
Connect the MCP server →Open it in Claude with one click (it asks you to add the DataMaxi+ connector first if you haven't), or paste it into Cursor or any MCP client. It backtests first, then runs in paper mode and never places orders on its own.
Build the "Perp DEX vs CEX Funding" strategy for me with DataMaxi+ data. Thesis: Hourly-funded perp DEXs drift away from CEX funding; hedge one against the other and earn the gap. Connect to the DataMaxi+ MCP server at https://mcp.datamaxiplus.com/mcp (header X-DTMX-APIKEY, read from env DATAMAXI_API_KEY). ## Data (call these tools; arguments are examples — loop over the symbols and venues you need) 1. funding_rate_latest(exchange="hyperliquid", symbol="BTC-USD") — Hourly DEX print and the CEX print; about 24×/hour 2. funding_rate_history(exchange="hyperliquid", symbol="BTC-USD", limit="24") — 24h average gap; about 2×/hour 3. cex_symbol_oi_stats(base="BTC") — Open interest per venue; about 4×/hour ## Rules Signal: Hyperliquid (1h) vs Binance (8h) funding on the same perp, both converted to APR. Entry: Gap ≥ 25% APR on the 24h average, open interest ≥ $20M on the DEX side. Exit: 24h gap < 8% APR, or 14 days. Risk: Keep a bridge buffer of 30% on the DEX side. Leg cap 5% of DEX open interest. Halt on any oracle or bridge incident. ## What to do 1. Build the signal from the tools above and backtest the rules on the history you can pull; report trades, win rate, average trade and max drawdown. 2. Then run it live in paper mode and show me symbols where DEX and CEX funding differ by ≥ 25% APR, with OI on each side, refreshed on the cadence above. 3. Never place real orders. Propose trades and wait for my confirmation. ## Budget Every call is billed from my prepaid DataMaxi+ balance. Expected load: ~30 calls/hour ≈ 912 credits/day (≈ $0.09/day). Cache results, never repeat a call inside its refresh window, and print the number of calls each refresh made. If DataMaxi+ is not connected, ask me to [connect DataMaxi+](https://claude.ai/customize/connectors?modal=add-custom-connector) using https://mcp.datamaxiplus.com/mcp before continuing.
Risk notes
- Smart-contract, oracle and bridge risk on the DEX leg — size it as if it can be frozen.
- DEX funding is capped and recalculated hourly; the gap can close within a day.
- The gap line is Hyperliquid minus Binance; both venues are drawn for context.
Educational example, not investment advice. Sample charts and figures are illustrative.
Keep exploring
Live screens, dashboards and the data behind this strategy.