Funding Regime Switch
When market-wide funding flips from longs paying to shorts paying near the highs, the short side is crowded — position for the squeeze.
- SignalFunding ≤ −0.005%
- EntryLong the squeeze
- ExitBack ≥ +0.01%
How it works
One direction · holds days – 1 week- funding_rate_history6/hA week of prints per venue
- funding_rate_latest12/hLatest print per venue
- open_interest_summary1/hOI weights per venue
- cex_candle1/hDistance from the 30-day high
- SignalFunding ≤ −0.005%OI-weighted funding across top venues, 3-print average
- EntryLong the squeezeFlip from ≥ +0.01% with price within 5% of its 30-day high
- ExitBack ≥ +0.01%Or 7 days in the trade
- RiskStop −4%Half size if open interest is falling
The signal
BTC · OI-weighted funding · 8h equivalent · sample| Date (UTC) | Avg funding |
|---|---|
| Sep 19 | 0.013% |
| Sep 20 | 0.012% |
| Sep 21 | 0.013% |
| Sep 22 | 0.016% |
| Sep 23 | 0.016% |
| Sep 24 | 0.016% |
| Sep 25 | 0.018% |
| Sep 26 | 0.019% |
| Sep 27 | 0.017% |
| Sep 28 | 0.016% |
| Sep 29 | 0.017% |
| Sep 30 | 0.015% |
| Oct 1 | 0.013% |
| Oct 2 | 0.013% |
| Oct 3 | 0.014% |
| Oct 4 | 0.014% |
| Oct 5 | 0.013% |
| Oct 6 | 0.015% |
| Oct 7 | 0.016% |
| Oct 8 | 0.015% |
| Oct 9 | 0.013% |
| Oct 10 | 0.014% |
| Oct 11 | 0.013% |
| Oct 12 | 0.0099% |
| Oct 13 | 0.0087% |
| Oct 14 | 0.0091% |
| Oct 15 | 0.0081% |
| Oct 16 | 0.0067% |
| Oct 17 | 0.008% |
| Oct 18 | 0.0098% |
| Oct 19 | 0.0094% |
| Oct 20 | 0.009% |
| Oct 21 | 0.011% |
| Oct 22 | -0.0093% |
| Oct 23 | -0.011% |
| Oct 24 | -0.013% |
| Oct 25 | -0.012% |
| Oct 26 | -0.013% |
| Oct 27 | -0.014% |
| Oct 28 | -0.013% |
| Oct 29 | -0.011% |
| Oct 30 | -0.011% |
| Oct 31 | 0.0092% |
| Nov 1 | 0.012% |
| Nov 2 | 0.013% |
| Nov 3 | 0.013% |
| Nov 4 | 0.012% |
| Nov 5 | 0.013% |
| Nov 6 | 0.013% |
| Nov 7 | 0.011% |
| Nov 8 | 0.011% |
| Nov 9 | 0.013% |
| Nov 10 | 0.013% |
| Nov 11 | 0.013% |
| Nov 12 | 0.015% |
| Nov 13 | 0.017% |
| Nov 14 | 0.017% |
| Nov 15 | 0.017% |
| Nov 16 | 0.018% |
| Nov 17 | 0.018% |
Sample backtest
Sample · illustrative 1Y · not real performance| Date (UTC) | Equity |
|---|---|
| Jul 21 | 0.06% |
| Jul 22 | -0.06% |
| Jul 23 | 0.25% |
| Jul 24 | 0.64% |
| Jul 25 | 0.99% |
| Jul 26 | 1.48% |
| Jul 27 | 1.56% |
| Jul 28 | 1.54% |
| Jul 29 | 1.69% |
| Jul 30 | 1.72% |
| Jul 31 | 2.07% |
| Aug 1 | 2.44% |
| Aug 2 | 2.47% |
| Aug 3 | 2.54% |
| Aug 4 | 2.32% |
| Aug 5 | 2.02% |
| Aug 6 | 2.09% |
| Aug 7 | 2.07% |
| Aug 8 | 2.17% |
| Aug 9 | 2.27% |
| Aug 10 | 1.95% |
| Aug 11 | 1.72% |
| Aug 12 | 1.51% |
| Aug 13 | 1.32% |
| Aug 14 | 1.58% |
| Aug 15 | 1.74% |
| Aug 16 | 1.81% |
| Aug 17 | 1.93% |
| Aug 18 | 1.72% |
| Aug 19 | 1.72% |
| Aug 20 | 1.98% |
| Aug 21 | 2.21% |
| Aug 22 | 2.73% |
| Aug 23 | 3.08% |
| Aug 24 | 3.12% |
| Aug 25 | 3.29% |
| Aug 26 | 3.3% |
| Aug 27 | 3.47% |
| Aug 28 | 3.96% |
| Aug 29 | 4.21% |
| Aug 30 | 4.47% |
| Aug 31 | 4.55% |
| Sep 1 | 4.28% |
| Sep 2 | 4.25% |
| Sep 3 | 4.24% |
| Sep 4 | 4.27% |
| Sep 5 | 4.55% |
| Sep 6 | 4.47% |
| Sep 7 | 4.25% |
| Sep 8 | 4.06% |
| Sep 9 | 3.66% |
| Sep 10 | 3.63% |
| Sep 11 | 3.78% |
| Sep 12 | 3.79% |
| Sep 13 | 3.97% |
| Sep 14 | 3.84% |
| Sep 15 | 3.6% |
| Sep 16 | 3.65% |
| Sep 17 | 3.67% |
| Sep 18 | 3.99% |
| Sep 19 | 4.48% |
| Sep 20 | 4.62% |
| Sep 21 | 4.82% |
| Sep 22 | 4.89% |
| Sep 23 | 4.85% |
| Sep 24 | 5.24% |
| Sep 25 | 5.6% |
| Sep 26 | 5.95% |
| Sep 27 | 6.36% |
| Sep 28 | 6.3% |
| Sep 29 | 6.25% |
| Sep 30 | 6.29% |
| Oct 1 | 6.23% |
| Oct 2 | 6.52% |
| Oct 3 | 6.73% |
| Oct 4 | 6.65% |
| Oct 5 | 6.61% |
| Oct 6 | 6.25% |
| Oct 7 | 5.96% |
| Oct 8 | 6% |
| Oct 9 | 5.94% |
| Oct 10 | 6.09% |
| Oct 11 | 6.16% |
| Oct 12 | 5.85% |
| Oct 13 | 5.73% |
| Oct 14 | 5.58% |
| Oct 15 | 5.55% |
| Oct 16 | 5.95% |
| Oct 17 | 6.17% |
| Oct 18 | 6.37% |
| Oct 19 | 6.55% |
| Oct 20 | 6.41% |
| Oct 21 | 6.56% |
| Oct 22 | 6.88% |
| Oct 23 | 7.17% |
| Oct 24 | 7.74% |
| Oct 25 | 7.99% |
| Oct 26 | 8.02% |
| Oct 27 | 8.14% |
| Oct 28 | 8.05% |
| Oct 29 | 8.22% |
| Oct 30 | 8.6% |
| Oct 31 | 8.71% |
| Nov 1 | 8.88% |
| Nov 2 | 8.78% |
| Nov 3 | 8.41% |
| Nov 4 | 8.33% |
| Nov 5 | 8.22% |
| Nov 6 | 8.25% |
| Nov 7 | 8.47% |
| Nov 8 | 8.3% |
| Nov 9 | 8.12% |
| Nov 10 | 7.92% |
| Nov 11 | 7.59% |
| Nov 12 | 7.71% |
| Nov 13 | 7.9% |
| Nov 14 | 8.04% |
| Nov 15 | 8.31% |
| Nov 16 | 8.22% |
| Nov 17 | 8.13% |
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 365 days; funding every 8 hours, daily OI and candles
- History calls
- 65
- Credits
- 400
- Cost per run
- ≈ $0.04
Backtest the "Funding Regime Switch" strategy on DataMaxi+ history. Thesis: When market-wide funding flips from longs paying to shorts paying near the highs, the short side is crowded — position for the squeeze. 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="binance", symbol="BTC-USDT", limit="100") — every funding print, 100 per call; about 55 calls 2. 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 3. cex_candle(exchange="binance", market="futures", symbol="BTC-USDT", interval="1d") — OHLCV, up to 1,000 candles per call, history from Jan 2024; about 5 calls Universe: BTC, ETH, SOL, XRP and DOGE perps on Binance Period: the last 365 days; funding every 8 hours, daily OI and candles ## Rules to test Signal: OI-weighted average funding (8h equivalent) across the top venues, 3-print average. Entry: Average falls from ≥ +0.01% to ≤ −0.005% while price is within 5% of its 30-day high: buy the perp. Exit: Average back above +0.01%, or 7 days. Risk: Stop −4%. Half size if the flip comes with falling open interest (shorts closing, not opening). ## Assumptions Costs: 0.05% perp taker on entry and exit, 0.05% slippage Data: Use Binance funding alone if the other venues are not pulled; the live rule weights several venues by OI. 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 65 history calls ≈ 400 credits ≈ $0.04 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 | OI-weighted average funding (8h equivalent) across the top venues, 3-print average. |
|---|---|
| Entry | Average falls from ≥ +0.01% to ≤ −0.005% while price is within 5% of its 30-day high: buy the perp. |
| Exit | Average back above +0.01%, or 7 days. |
| Risk | Stop −4%. Half size if the flip comes with falling open interest (shorts closing, not opening). |
Data used
≈ $0.1248 / day| MCP tool · REST route | Dataset | Tier | Calls / h | Credits / day | USD / day |
|---|---|---|---|---|---|
funding_rate_history GET /funding-rate/history | Funding rate | History · 5 cr | 6 | 720 | $0.072 |
funding_rate_latest GET /funding-rate/latest | Funding rate | Latest · 1 cr | 12 | 288 | $0.0288 |
open_interest_summary GET /open-interest/summary | Open interest | History · 5 cr | 1 | 120 | $0.012 |
cex_candle GET /cex/candle | Candle · ticker | History · 5 cr | 1 | 120 | $0.012 |
| Total | 20 | 1,248 | $0.1248 |
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 "Funding Regime Switch" strategy for me with DataMaxi+ data. Thesis: When market-wide funding flips from longs paying to shorts paying near the highs, the short side is crowded — position for the squeeze. 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_history(exchange="binance", symbol="BTC-USDT", limit="21") — A week of prints per venue; about 6×/hour 2. funding_rate_latest(exchange="okx", symbol="BTC-USDT") — Latest print per venue; about 12×/hour 3. open_interest_summary() — OI weights per venue; about 1×/hour 4. cex_candle(exchange="binance", market="futures", symbol="BTC-USDT", interval="1d") — Distance from the 30-day high; about 1×/hour ## Rules Signal: OI-weighted average funding (8h equivalent) across the top venues, 3-print average. Entry: Average falls from ≥ +0.01% to ≤ −0.005% while price is within 5% of its 30-day high: buy the perp. Exit: Average back above +0.01%, or 7 days. Risk: Stop −4%. Half size if the flip comes with falling open interest (shorts closing, not opening). ## 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 the current regime per major coin and an alert on each flip, 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: ~20 calls/hour ≈ 1,248 credits/day (≈ $0.12/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
- Negative funding in a real downtrend is not a squeeze setup — the near-the-high filter does that job.
- Few signals a year; one bad trade dominates the result.
- Venue mix shifts over time; reweight by open interest every day.
Educational example, not investment advice. Sample charts and figures are illustrative. See the live screen it builds on: Funding Regime Board.
Keep exploring
Live screens, dashboards and the data behind this strategy.