CEX–CEX Spread Arbitrage
Buy where a coin is cheap, sell where it is rich, only when the gap survives both venues' taker fees.
- SignalNet ≥ 30bp
- EntryBuy cheap · sell rich
- ExitNet ≤ 5bp or 10m
How it works
Two legs, one spread · holds minutes- premium120/hWidest spot spreads across venues
- cex_fees1/hTaker fees for both legs
- ticker60/hDepth and volume confirmation
- SignalNet ≥ 30bpSpot–spot spread minus both taker fees, every venue pair
- EntryBuy cheap · sell richDepth within 2% covers the size; 24h volume ≥ $1M
- ExitNet ≤ 5bp or 10mBoth legs fill at once; residual unwound
- RiskCap 25% of thinner bookInventory sits on both venues, so no transfer race
The signal
ARB · Gate → Bybit · net spread bp · sample| Minutes | Net spread |
|---|---|
| +0m | 14.41 bp |
| +1m | 10.48 bp |
| +2m | 8.97 bp |
| +3m | 9.77 bp |
| +4m | 5.75 bp |
| +5m | -0.33 bp |
| +6m | -0.98 bp |
| +7m | 0.21 bp |
| +8m | -2.47 bp |
| +9m | -3.54 bp |
| +10m | 1.16 bp |
| +11m | 4.44 bp |
| +12m | 37 bp |
| +13m | 30.31 bp |
| +14m | 28.09 bp |
| +15m | 22.33 bp |
| +16m | 14.13 bp |
| +17m | 11.05 bp |
| +18m | 10.45 bp |
| +19m | 6.13 bp |
| +20m | 2.98 bp |
| +21m | 6.36 bp |
| +22m | 9.91 bp |
| +23m | 9.37 bp |
| +24m | 11.21 bp |
| +25m | 16.84 bp |
| +26m | 18.26 bp |
| +27m | 15.27 bp |
| +28m | 15.51 bp |
| +29m | 17.4 bp |
| +30m | 14.34 bp |
| +31m | 10.6 bp |
| +32m | 12.73 bp |
| +33m | 15.59 bp |
| +34m | 14.4 bp |
| +35m | 15.41 bp |
| +36m | 21.17 bp |
| +37m | 23.8 bp |
| +38m | 49.67 bp |
| +39m | 42.82 bp |
| +40m | 39.58 bp |
| +41m | 32.28 bp |
| +42m | 23.69 bp |
| +43m | 20.83 bp |
| +44m | 19.56 bp |
| +45m | 14.52 bp |
| +46m | 11.62 bp |
| +47m | 14.69 bp |
| +48m | 16.37 bp |
| +49m | 13.82 bp |
| +50m | 14.03 bp |
| +51m | 16.89 bp |
| +52m | 14.62 bp |
| +53m | 8.93 bp |
| +54m | 7.33 bp |
| +55m | 6.84 bp |
| +56m | 1.75 bp |
| +57m | -2.4 bp |
| +58m | -0.36 bp |
| +59m | 1.5 bp |
Sample backtest
Sample · illustrative 30D · not real performance| Date (UTC) | Equity |
|---|---|
| Jul 21 | 0.16% |
| Jul 22 | 0.25% |
| Jul 23 | 0.34% |
| Jul 24 | 0.38% |
| Jul 25 | 0.35% |
| Jul 26 | 0.4% |
| Jul 27 | 0.44% |
| Jul 28 | 0.52% |
| Jul 29 | 0.65% |
| Jul 30 | 0.68% |
| Jul 31 | 0.71% |
| Aug 1 | 0.74% |
| Aug 2 | 0.75% |
| Aug 3 | 0.86% |
| Aug 4 | 1% |
| Aug 5 | 1.12% |
| Aug 6 | 1.27% |
| Aug 7 | 1.33% |
| Aug 8 | 1.39% |
| Aug 9 | 1.52% |
| Aug 10 | 1.63% |
| Aug 11 | 1.82% |
| Aug 12 | 2.02% |
| Aug 13 | 2.13% |
| Aug 14 | 2.25% |
| Aug 15 | 2.32% |
| Aug 16 | 2.38% |
| Aug 17 | 2.54% |
| Aug 18 | 2.66% |
| Aug 19 | 2.79% |
| Aug 20 | 2.92% |
| Aug 21 | 2.92% |
| Aug 22 | 2.95% |
| Aug 23 | 2.99% |
| Aug 24 | 3.03% |
| Aug 25 | 3.15% |
| Aug 26 | 3.24% |
| Aug 27 | 3.27% |
| Aug 28 | 3.32% |
| Aug 29 | 3.29% |
| Aug 30 | 3.32% |
| Aug 31 | 3.43% |
| Sep 1 | 3.51% |
| Sep 2 | 3.66% |
| Sep 3 | 3.76% |
| Sep 4 | 3.79% |
| Sep 5 | 3.88% |
| Sep 6 | 3.95% |
| Sep 7 | 4.07% |
| Sep 8 | 4.28% |
| Sep 9 | 4.43% |
| Sep 10 | 4.58% |
| Sep 11 | 4.7% |
| Sep 12 | 4.74% |
| Sep 13 | 4.86% |
| Sep 14 | 5.01% |
| Sep 15 | 5.15% |
| Sep 16 | 5.33% |
| Sep 17 | 5.42% |
| Sep 18 | 5.46% |
| Sep 19 | 5.53% |
| Sep 20 | 5.54% |
| Sep 21 | 5.63% |
| Sep 22 | 5.76% |
| Sep 23 | 5.82% |
| Sep 24 | 5.9% |
| Sep 25 | 5.91% |
| Sep 26 | 5.88% |
| Sep 27 | 5.93% |
| Sep 28 | 5.98% |
| Sep 29 | 6.08% |
| Sep 30 | 6.22% |
| Oct 1 | 6.26% |
| Oct 2 | 6.32% |
| Oct 3 | 6.37% |
| Oct 4 | 6.41% |
| Oct 5 | 6.57% |
| Oct 6 | 6.73% |
| Oct 7 | 6.87% |
| Oct 8 | 7.04% |
| Oct 9 | 7.1% |
| Oct 10 | 7.19% |
| Oct 11 | 7.32% |
| Oct 12 | 7.44% |
| Oct 13 | 7.64% |
| Oct 14 | 7.81% |
| Oct 15 | 7.9% |
| Oct 16 | 8% |
| Oct 17 | 8.03% |
| Oct 18 | 8.08% |
| Oct 19 | 8.22% |
| Oct 20 | 8.31% |
| Oct 21 | 8.42% |
| Oct 22 | 8.5% |
| Oct 23 | 8.48% |
| Oct 24 | 8.5% |
| Oct 25 | 8.53% |
| Oct 26 | 8.57% |
| Oct 27 | 8.7% |
| Oct 28 | 8.78% |
| Oct 29 | 8.83% |
| Oct 30 | 8.88% |
| Oct 31 | 8.87% |
| Nov 1 | 8.94% |
| Nov 2 | 9.07% |
| Nov 3 | 9.19% |
| Nov 4 | 9.36% |
| Nov 5 | 9.48% |
| Nov 6 | 9.53% |
| Nov 7 | 9.65% |
| Nov 8 | 9.73% |
| Nov 9 | 9.89% |
| Nov 10 | 10.1% |
| Nov 11 | 10.24% |
| Nov 12 | 10.38% |
| Nov 13 | 10.47% |
| Nov 14 | 10.5% |
| Nov 15 | 10.62% |
| Nov 16 | 10.73% |
| Nov 17 | 10.86% |
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 30 days, 5-minute candles
- History calls
- 90
- Credits
- 450
- Cost per run
- ≈ $0.045
Backtest the "CEX–CEX Spread Arbitrage" strategy on DataMaxi+ history. Thesis: Buy where a coin is cheap, sell where it is rich, only when the gap survives both venues' taker fees. 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. cex_candle(exchange="gateio", market="spot", symbol="ARB-USDT", interval="5m") — OHLCV, up to 1,000 candles per call, history from Jan 2024; about 45 calls 2. cex_candle(exchange="bybit", market="spot", symbol="ARB-USDT", interval="5m") — OHLCV, up to 1,000 candles per call, history from Jan 2024; about 45 calls Universe: the 5 most liquid coins listed on both Gate and Bybit spot Period: the last 30 days, 5-minute candles ## Rules to test Signal: Spot–spot premium for every venue pair, minus both taker fees (net spread, bp). Entry: Net spread ≥ 30bp, depth within 2% covers the size on both books, 24h volume ≥ $1M. Exit: Both legs fill at once; unwind any residual when net spread ≤ 5bp or after 10 minutes. Risk: Inventory held on both venues (no transfer race). Cap each trade at 25% of the thinner book within 2%. ## Assumptions Costs: taker fee on both legs (0.1% each unless the fee table says otherwise), plus 0.05% slippage per leg Data: Candle closes stand in for the books, so the depth rule cannot be tested; use 24h volume ≥ $1M instead and treat the result as an upper bound. 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 90 history calls ≈ 450 credits ≈ $0.045 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 | Spot–spot premium for every venue pair, minus both taker fees (net spread, bp). |
|---|---|
| Entry | Net spread ≥ 30bp, depth within 2% covers the size on both books, 24h volume ≥ $1M. |
| Exit | Both legs fill at once; unwind any residual when net spread ≤ 5bp or after 10 minutes. |
| Risk | Inventory held on both venues (no transfer race). Cap each trade at 25% of the thinner book within 2%. |
Data used
≈ $0.4344 / day| MCP tool · REST route | Dataset | Tier | Calls / h | Credits / day | USD / day |
|---|---|---|---|---|---|
premium GET /premium | Premium | Latest · 1 cr | 120 | 2,880 | $0.288 |
cex_fees GET /cex/fees | Margin · fees | Latest · 1 cr | 1 | 24 | $0.0024 |
ticker GET /ticker | Candle · ticker | Latest · 1 cr | 60 | 1,440 | $0.144 |
| Total | 181 | 4,344 | $0.4344 |
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 "CEX–CEX Spread Arbitrage" strategy for me with DataMaxi+ data. Thesis: Buy where a coin is cheap, sell where it is rich, only when the gap survives both venues' taker fees. 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. premium(premium_type="spot-spot", key="pdp", sort="desc", min_sv="1000000", min_tv="1000000", limit="50") — Widest spot spreads across venues; about 120×/hour 2. cex_fees(exchange="gateio") — Taker fees for both legs; about 1×/hour 3. ticker(exchange="bybit", symbol="ARB-USDT", market="spot") — Depth and volume confirmation; about 60×/hour ## Rules Signal: Spot–spot premium for every venue pair, minus both taker fees (net spread, bp). Entry: Net spread ≥ 30bp, depth within 2% covers the size on both books, 24h volume ≥ $1M. Exit: Both legs fill at once; unwind any residual when net spread ≤ 5bp or after 10 minutes. Risk: Inventory held on both venues (no transfer race). Cap each trade at 25% of the thinner book within 2%. ## 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 a ranked list of pairs with gross and net spread and fillable size, 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: ~181 calls/hour ≈ 4,344 credits/day (≈ $0.43/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
- Spreads that only exist for a second are usually stale quotes — confirm with ticker before sending.
- Inventory drifts to the cheap venue; rebalancing transfers cost fees and time.
- Fee tiers change; refresh cex_fees daily.
Educational example, not investment advice. Sample charts and figures are illustrative. See the live screen it builds on: CEX–CEX Spread Scanner.
Keep exploring
Live screens, dashboards and the data behind this strategy.