Cross-DEX Prices & Spreads

v1.0.1
io.github.donnywin85/arb-dex-mcp Checked 2 days ago Published 3 months ago

Live cross-DEX pool prices, liquidity and spreads on 6 EVM chains, read from on-chain pool state.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_chains List supported chains, their tokens and DEX venues

List every blockchain this API covers, with its chain ID, native asset, default trading pair, the token tickers it prices, and the DEX venues it reads (both Uniswap-v2-style pools and Uniswap-v3-style concentrated-liquidity pools). Call this first to discover valid `chain` values for the other tools. With a RapidAPI key you get the full per-chain token and venue lists; without one it falls back to the free public snapshot, which names the chains but not their token universes, and says so in the response. Paid route: needs your own RapidAPI key in RAPIDAPI_KEY (free tier available at https://ra…

get_pairs What can be priced on one chain

Show what is queryable on a single chain: the token tickers the API prices, the DEX venues it reads, and the chain default pair. A `pair` for get_prices is written as TOKEN_A/TOKEN_B from these tickers (first symbol is the base, second is the quote) — any ERC-20 contract address on the chain also works in place of a ticker. This returns the token universe, not a fixed enumerated pair list: the API prices whatever pair of these you ask for that has live pool liquidity, and returns 404 when no pool exists. Without a RapidAPI key it falls back to the free snapshot and returns only the pairs act…

ParameterTypeDescription
chain *stringChain key. One of: bsc, polygon, arbitrum, base, avalanche, optimism. Numeric chain IDs are not accepted here — use the key.

get_prices Per-venue live pool prices for one pair

Live price of one trading pair at EVERY DEX venue on a chain that holds a pool for it, read directly from pool state at a stated block number. Returns per-venue price (quote token per 1 base token), pool reserves, pool TVL in USD and the venue fee tier; plus the best bid/ask venues, the raw mid spread in basis points, aggregate liquidity, and the cross-DEX gross spread with its optimal trade size. Use this when you need the actual number a swap would price against on a specific venue, or to compare one pair across venues. For ranking opportunities across a whole chain, use get_spreads instead.…

ParameterTypeDescription
chain *stringChain key. One of: bsc, polygon, arbitrum, base, avalanche, optimism. Numeric chain IDs are not accepted here — use the key.
pair *stringPair as BASE/QUOTE, e.g. "WBNB/USDT". The first symbol is the base (the USD-priceable side). A raw 0x… ERC-20 address may replace either ticker. Call get_pairs for the tickers a chain knows.
feeintegerOptional Uniswap-v3 fee tier in hundredths of a bip (100, 500, 2500, 3000, 10000). Restricts the v3 probe to that single tier instead of sweeping all of them. Omit to sweep every tier.

get_spreads Rank cross-DEX spread opportunities on a chain

Sweep a whole chain and rank its cross-venue price dislocations, each with the buy venue, sell venue, spread in basis points, the optimal trade size, and the gross USD that size would capture. Ranking is by GROSS USD AT THE OPTIMAL SIZE, not by headline basis points — a 160bps spread against a $1,470 pool is worth about a cent, and the payload says so per row (`capturable`, `warning`, `shallowestSideTvlUsd`). Venues below the liquidity floor are excluded because a spread against a dust pool is an artefact, not an opportunity. Numbers are GROSS: before gas, MEV and any slippage beyond the opt…

ParameterTypeDescription
chain *stringChain key. One of: bsc, polygon, arbitrum, base, avalanche, optimism. Numeric chain IDs are not accepted here — use the key.
limitintegerLive sweeps only. Maximum rows, 1..40. Default 15.
livebooleantrue = run a fresh on-chain sweep now (requires RAPIDAPI_KEY, takes ~30s). false/omitted = the free public snapshot, rebuilt hourly.
minSpreadBpsnumberLive sweeps only. Minimum spread in basis points to report. Default 10.

get_history_summary What the measurement archive actually covers

Describe the coverage of this API's own measurement archive before you query it: how many rows exist, how many distinct pairs are tracked, which chains have been seen, the first and last observation timestamps, the span in hours, and the retention policy. Call this FIRST to find out whether a window you care about is even covered — the archive only holds what the service measured while it was running, and a missing hour stays a gap rather than being interpolated. `rowsByEra` breaks the archive down by how much detail each row carries: older rows may hold digest totals only, newer ones full p…

get_history Historical per-venue prices and cross-venue spread for one pair

Time series for a single pair from this API's measurement archive: per-venue price and liquidity points, and the GROSS cross-venue spread computed from those same measured venues, over a 24h, 7d or 30d window. Use this to see how a dislocation behaved over time — whether a spread persisted or was a single-sample artefact — which the live tools (get_prices, get_spreads) cannot tell you because they only see now. Coverage is whatever was measured: sampling is once per digest build (roughly hourly), each venue reports its own observation count, and gaps mean the service was not running then.…

ParameterTypeDescription
chain *stringChain key. One of: bsc, polygon, arbitrum, base, avalanche, optimism. Numeric chain IDs are not accepted here — use the key.
pair *stringPair as BASE/QUOTE, e.g. "WETH/USDC" (a BASE-QUOTE dash form is accepted too). Only pairs the service has actually measured are in the archive — get_history_summary lists what is tracked.
windowstringLook-back window: 24h, 7d or 30d. Default 24h.