compare_prices
Concurrently fetch and compare cryptocurrency prices from CoinGecko, CCXT exchanges, and DexScreener to validate quotes, find divergences, or identify arbitrage.
Instructions
Concurrently fetch the price of one coin from many sources and compare.
Use for cross-source sanity checks, finding venue-vs-aggregator divergences, or simple arbitrage spotting. Contrast with:
get_price: single source (CoinGecko aggregated).compare_funding_rates: perp funding across venues.
Sources fanned out in parallel:
CoinGecko aggregated
/simple/priceFor each
exchange_id: CCXTfetch_ticker(base/quote)where base is derived fromcoin_idvia a small mapping (bitcoin->BTC, ethereum->ETH, solana->SOL, ripple->XRP, cardano->ADA, dogecoin->DOGE, tron->TRX, polkadot->DOT, chainlink->LINK, avalanche-2->AVAX, matic-network->MATIC) and quote isUSDTforvs_currency=usd, elsevs_currency.upper().DexScreener (only when
vs_currencyis "usd"): top-liquidity pair.
Args: coin_id: CoinGecko coin ID (e.g. "bitcoin"). vs_currency: Quote currency. "usd" works on all sources; others skip DexScreener. exchange_ids: Comma-separated CCXT exchange IDs.
Returns:
Object with coin_id, vs_currency, prices (per-source array with
source, ok, and either price or error), max, min,
spread_bps, n_ok, n_error. Unknown coin_ids still return
per-source error envelopes pointing at get_exchange_ticker.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin_id | No | bitcoin | |
| vs_currency | No | usd | |
| exchange_ids | No | binance,okx,coinbase,kraken |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||