{"uid":"cap_Z7Hig2b4SfaeAs2sMTNDS","slug":"alphapipeline-cex-dex-arbitrage-spread-calculator-1f54c659","name":"AlphaPipeline CEX-DEX Arbitrage Spread Calculator","description":"CEX-DEX arbitrage spread calculator - compares a global reference price (Coinbase spot, CoinGecko fallback) against a DEX pool price and returns gross/net spread and an is_profitable flag after an assumed gas cost. Paid in USDC on Base.","url":"https://alphapipeline-eu.onrender.com/v1/arb/spread-matrix?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["symbol"],"properties":{"symbol":{"type":"string","description":"Ticker symbol, e.g. SUI, BTC, ETH."},"network":{"type":"string","description":"GeckoTerminal network id, e.g. base, eth. Defaults to base."},"pool_address":{"type":"string","description":"Specific DEX pool contract address (optional if token_address is given)."},"token_address":{"type":"string","description":"Token contract address - the most liquid pool is auto-selected (optional if pool_address is given)."},"trade_size_usd":{"type":"number","description":"Hypothetical trade size in USD. Defaults to 1000."},"min_spread_threshold_pct":{"type":"number","description":"Net spread threshold (%) above which is_profitable is true. Defaults to 0.8."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","title":"ArbSpreadResponse","required":["generated_at","symbol","network","status_message","is_profitable","trade_size_usd","assumed_gas_cost_usd","min_spread_threshold_pct","data_source"],"properties":{"notice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notice","default":null},"symbol":{"type":"string","title":"Symbol"},"network":{"type":"string","title":"Network"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction","default":null},"data_source":{"type":"string","title":"Data Source"},"generated_at":{"type":"object","title":"TimestampPair","required":["utc","kst"],"properties":{"kst":{"type":"string","title":"Kst"},"utc":{"type":"string","title":"Utc"}}},"pool_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pool Address","default":null},"pool_fee_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pool Fee Pct","default":null,"description":"DEX pool's fee tier parsed from GeckoTerminal's pool name (e.g. 0.05 for a 0.05% pool). Informational only - net_spread_pct does NOT subtract it."},"cex_price_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cex Price Usd","default":null},"dex_price_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dex Price Usd","default":null},"is_profitable":{"type":"boolean","title":"Is Profitable"},"net_spread_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Spread Pct","default":null},"status_message":{"type":"string","title":"Status Message"},"trade_size_usd":{"type":"number","title":"Trade Size Usd"},"gross_spread_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Spread Pct","default":null},"assumed_gas_cost_usd":{"type":"number","title":"Assumed Gas Cost Usd"},"min_spread_threshold_pct":{"type":"number","title":"Min Spread Threshold Pct"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VdljcwgZdCb7rRdC5lZG5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares a global CEX reference price (Coinbase spot or CoinGecko fallback) against a DEX pool price to return gross/net spread, trade direction, and an is_profitable flag adjusted for estimated gas costs.","exampleAgentPrompt":"Check if there's a profitable arbitrage spread right now for ETH between Coinbase and the most liquid Base DEX pool — use a $5000 hypothetical trade size and flag it profitable only if the net spread exceeds 1%.","exampleUseCases":[{"title":"ETH arb opportunity detection on Base","prompt":"Is there a profitable CEX-DEX arb right now for ETH on the Base network? Compare the Coinbase spot price against the best DEX pool using a $2000 trade size and tell me the net spread after gas."},{"title":"Custom pool spread check for small-cap token","prompt":"I have a specific SUI/USDC pool on Base at address 0xabc123... — compare its price against the global reference price with a $500 trade and let me know if the spread clears 0.5% after gas costs."},{"title":"Automated arb signal for trading bot","prompt":"Every minute, check if BTC has a profitable arb spread between Coinbase and the most liquid Base DEX pool, using a $10,000 trade size and a 0.8% minimum net spread threshold — return the direction and is_profitable flag."}],"resultDescription":"Returns a JSON object containing: the token symbol and network, CEX reference price and DEX pool price, gross spread percentage, net spread percentage (after gas), is_profitable boolean, trade direction (buy CEX/sell DEX or vice versa), assumed gas cost in USD, pool address and fee percentage, data source used (Coinbase or CoinGecko), and UTC/KST timestamps.","failureModes":["Symbol not found on Coinbase or CoinGecko — returns error with status_message indicating missing reference price","No liquid DEX pool found for token on specified network — returns null pool data with descriptive status_message","Invalid pool_address or token_address provided — API may return an error or empty result","Network ID not recognized by GeckoTerminal — defaults to Base or returns an error","Temporary upstream outage from Coinbase/CoinGecko/GeckoTerminal — may return stale or failed data with notice field populated","Payment failure via x402/USDC — request blocked before reaching computation"],"whenToPreferThis":"Use this endpoint when you need a quick, single-call CEX-DEX spread calculation for a specific token without building your own price aggregation pipeline. It is ideal for trading bots and agents that need an is_profitable signal with gas-adjusted net spread rather than raw price data alone. Prefer it over raw DEX data queries when you want a structured, flag-ready arb signal on Base network tokens. It is especially useful when Coinbase is the natural CEX reference and GeckoTerminal is the DEX data source.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T18:37:05.939Z","isFirstParty":false,"canonicalSlug":"alphapipeline-cex-dex-arbitrage-spread-calculator-1f54c659"}