coin-mcp
coin-mcp
English · 中文
A comprehensive cryptocurrency market-data MCP server. Six data sources, 49 tools, 8 prompt templates, 3 resources — wired together so an LLM can answer almost any "what's the market doing?" question with a single call.
Table of contents
Related MCP server: Enterprise Crypto MCP Gateway
Why coin-mcp
Most crypto MCP servers are thin wrappers around a single API and hit a wall the moment a user asks anything that requires combining sources. coin-mcp is built around a different premise: a strong AI assistant needs complementary data sources behind one consistent contract.
Source | Strength | What it covers here |
CoinGecko | Aggregated, volume-weighted | Price, market cap, history, NFTs, categories, treasuries, trending, search |
CCXT | Real-time, per-exchange | Tickers, order books, recent trades, OHLCV, funding rates across 100+ exchanges |
DefiLlama | DeFi-native, free | Protocol/chain TVL, stablecoins, yield pools, DEX volume, fees & revenue |
DexScreener | DEX-side, long-tail tokens | Pairs, liquidity, prices for tokens too small/new for CoinGecko |
Alternative.me | Sentiment | Crypto Fear & Greed Index |
Local TA | Offline compute | RSI, MACD, Bollinger, EMA/SMA, ATR, ADX, Stochastic, OBV |
Plus a tiered HTTP cache that keeps you safely under CoinGecko's free-tier rate limit, and a multi-transport runtime (stdio / SSE / streamable-HTTP).
What it can answer
A non-exhaustive sample of questions a connected LLM can resolve in 1–3 tool calls:
"What is BTC trading at right now?" →
get_price"Compare BTC's price across Coinbase, Kraken, OKX and DexScreener and tell me the spread." →
compare_prices"Give me a 30-day chart and run RSI, MACD and Bollinger on it." →
get_market_chart+compute_indicators"Where is the best bid for ETH/USDT across exchanges?" →
get_consolidated_orderbook"Funding rates for the BTC perp on Binance, OKX, Bybit, Bitmex — who's paying who?" →
compare_funding_rates"What protocols are leading TVL on Solana right now?" →
list_protocols(chain="Solana")"Find me yield pools paying > 10% APY on stablecoins with > $5M TVL." →
list_yield_pools"Is the market fearful or greedy today?" →
get_fear_greed_index"Is everything healthy? I'm seeing weird data." →
health_check"Which public companies hold BTC?" →
get_companies_holdings
Installation
Prerequisites
Python 3.10+ (
python3 --versionto check)Git
One of:
uv(recommended — handles Python toolchain, venv, lockfile in one tool)pip+ a virtualenv
uv install (one line, all platforms):
curl -LsSf https://astral.sh/uv/install.sh | sh # macOS / Linux
# powershell -c "irm https://astral.sh/uv/install.ps1 | iex" # Windows PowerShellOption 1 — uv (recommended)
git clone https://github.com/ymylive/coin-mcp.git
cd coin-mcp
uv sync # creates .venv, installs from uv.lock
uv run coin-mcp # starts the server on stdiouv sync reads pyproject.toml + uv.lock and installs everything (mcp, httpx, ccxt) into a project-local .venv/. No system pollution.
Option 2 — pip + venv
git clone https://github.com/ymylive/coin-mcp.git
cd coin-mcp
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e . # editable install, deps resolved fresh
coin-mcp # starts the server on stdioOption 3 — install directly from GitHub (no clone)
uv tool install git+https://github.com/ymylive/coin-mcp.git
coin-mcp # available on PATHThis puts the coin-mcp console script on your PATH globally without cluttering any project directory. Best for "I just want to point Claude Desktop at it."
Optional: install dev/test extras
If you want to run the test suite or hack on the code:
uv sync --extra dev # adds pytest + pytest-asyncio
uv run pytest # 29 tests, all should passVerify the installation
A 5-second sanity check that all tools registered correctly:
uv run python -c "
import asyncio, server
async def main():
tools = await server.mcp.list_tools()
prompts = await server.mcp.list_prompts()
resources = await server.mcp.list_resources()
print(f'{len(tools)} tools / {len(prompts)} prompts / {len(resources)} resources')
asyncio.run(main())
"
# Expected: 49 tools / 8 prompts / 3 resourcesCLI help is also one command away:
uv run coin-mcp --helpCommon pitfalls
Symptom | Likely cause / fix |
| Python 3.10+ not installed. Install via python.org or |
| You're not running inside the project venv. Use |
| Geographic block — not a bug. Use OKX, Kraken, Bybit, etc. instead via the |
| Rate-limited. The cache layer mitigates this; consider setting |
| Install uv first (see Prerequisites) or use the pip path (Option 2). |
Architecture
┌──────────────────────────────┐
│ LLM / MCP client │
│ Claude · Cursor · custom │
└──────────────┬───────────────┘
│ JSON-RPC over stdio / SSE / HTTP
┌──────────────▼───────────────┐
│ FastMCP server │
│ 49 tools · 8 prompts · 3 │
│ resources · multi-transport│
└──────────────┬───────────────┘
│
┌──────────────────────┼──────────────────────┐
│ │ │
┌────────▼─────────┐ ┌────────▼────────┐ ┌────────▼────────┐
│ HTTP layer │ │ CCXT runtime │ │ Local compute │
│ httpx + tiered │ │ Bounded LRU │ │ Indicators │
│ TTL LRU cache │ │ + per-id RLock │ │ (no I/O) │
│ + auth-aware key │ │ + pre-warm │ │ │
└────────┬─────────┘ └────────┬────────┘ └─────────────────┘
│ │
┌────────────┼──────────────┐ │
▼ ▼ ▼ ▼
CoinGecko DefiLlama DexScreener 100+ exchanges
(Binance, OKX, Coinbase,
Kraken, Bybit, …)Key design choices:
One tool per endpoint, with rich AI-facing docstrings. No clever endpoint factories — the docstrings ARE the API contract that the LLM reads to decide which tool to call. Forty-nine docstrings is a feature, not a bug.
{"error": "..."}envelope contract. Every HTTP-backed tool returns either upstream JSON or an error envelope. The cache never caches errors. The LLM never raises.Path-injection guards on every URL-interpolated parameter. Coin IDs, protocol slugs, addresses are validated against strict regexes before any HTTP call.
Per-exchange RLock + pre-warmed
load_markets(). Concurrent CCXT calls don't race the lazy markets table.Auth-aware cache key. Header values for known auth headers are hashed into the cache key — multi-tenant deployments don't leak.
Tool catalog (49)
Aggregated market data — CoinGecko (18)
Tool | What it does |
| Current spot price for one or more coins, multi-currency |
| Full coin metadata: description, links, scores, market data, dev/community stats |
| Historical price / market cap / volume time series |
| Aggregated OHLC candlesticks across all venues |
| Exchange tickers for a coin, sorted by trust score / volume |
| Universal search across coins, exchanges, categories, NFTs |
| Top coins with full market data, sortable + paginated |
| Trending coins / NFTs / categories (last-24h searches) |
| Biggest 24h movers (Pro endpoint; falls back to |
| Total market cap, BTC/ETH dominance, # of active assets |
| Global DeFi market cap and DeFi-to-ETH ratio |
| All coin categories with aggregated market data |
| Centralized exchanges directory ranked by trust score |
| Single-exchange detail: description, links, tickers |
| Derivatives venues by open interest / volume |
| NFT collections sortable by floor / cap / volume |
| Single NFT collection detail |
| Public companies holding BTC or ETH |
Real-time per-exchange — CCXT (7)
Tool | What it does |
| All 111 CCXT-supported exchange IDs |
| All markets/symbols on a specific exchange |
| Real-time bid/ask/last/24h on one exchange |
| Level-2 order book snapshot |
| Recent public trades (the tape) |
| OHLCV candles, 1m granularity, per-exchange volume |
| Current perpetual-futures funding rate |
Derivatives extensions — CCXT (3)
Tool | What it does |
| Time-series funding rates for a perp |
| Current open interest with |
| Cross-exchange funding-rate snapshot with max/min/spread |
DeFi-native — DefiLlama (9)
Tool | What it does |
| All DeFi protocols ranked by TVL, sortable, chain-filterable |
| Single protocol detail with trimmed TVL history |
| TVL per chain |
| Historical TVL for a chain (or total DeFi) |
| Top stablecoins by mcap with chain breakdown |
| Yield pools filtered by TVL / project / chain / symbol |
| DEX 24h volume rankings |
| Protocols ranked by fees or revenue |
| DefiLlama oracle price for |
DEX-side — DexScreener (5)
Tool | What it does |
| Search pairs across all chains by token name/symbol/address |
| All pairs for a token contract address |
| Single pair detail by chain + pair address |
| Newly profiled DexScreener tokens |
| Currently top-boosted (paid promotion) tokens |
Cross-source aggregation (3)
Tool | What it does |
| Parallel-ping every data source with latency |
| Same coin's price across CG + multiple CEX + DEX with spread |
| Merged L2 across many exchanges, attributed per-level |
Sentiment (1)
Tool | What it does |
| Crypto Fear & Greed Index (0 = extreme fear, 100 = extreme greed) |
Local technical indicators (1)
Tool | What it does |
| RSI, MACD, Bollinger, EMA, SMA, ATR, ADX, Stochastic, OBV — pure-Python on supplied OHLCV |
Cache observability (2)
Tool | What it does |
| Cache entries, hits, misses, hit rate, per-pattern breakdown |
| Drop the in-process HTTP cache |
Prompt templates (8)
Prompts are parameterized workflows the user can pick from a UI; they expand into ready-made multi-step instructions the LLM executes using tools.
Prompt | What it does |
| Full coin briefing: identity, price, charts, where it trades |
| Side-by-side comparison across N coins |
| Fetch OHLCV + run full indicator bundle, summarize trend/momentum/volatility |
| Funding rates across N exchanges, surface spread |
| Macro briefing: cap, dominance, sentiment, trending, top movers |
| TVL by chain + per-protocol view + stablecoin landscape |
| Search → fall back to DexScreener for new/long-tail tokens |
| Filter yield pools by TVL / chain / asset, sort by 30-day avg APY |
Resources (3)
Static reference data the client can attach to the LLM's context:
coin-mcp://exchanges/ccxt— JSON list of all CCXT-supported exchange IDscoin-mcp://coins/popular-ids— markdown table mapping common ticker symbols to CoinGecko IDscoin-mcp://chains/dex-supported— markdown list of chain IDs DexScreener accepts
Configuration
All env vars are optional.
Variable | Default | Effect |
| (unset) | When set, the server uses the Pro endpoint and authenticates requests. Pro keys (prefixed |
A .env.example is provided. Copy to .env and edit if you have a key.
MCP client integration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"coin-mcp": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/coin-mcp",
"run",
"coin-mcp"
],
"env": {
"COINGECKO_API_KEY": "your-optional-key"
}
}
}
}Restart Claude Desktop. The 49 tools, 8 prompts and 3 resources will appear.
Cursor
Cursor's MCP support uses the same JSON shape. Place the snippet in your Cursor settings under mcp.servers. For remote use, run the server with --transport sse or --transport streamable-http and point Cursor at the URL.
Custom client
Any MCP-compatible client works. The server speaks the standard MCP JSON-RPC over your transport of choice.
Transports
# stdio (default, for local IDE / Claude Desktop integration)
coin-mcp
# Server-Sent Events
coin-mcp --transport sse --host 127.0.0.1 --port 8000
# Streamable HTTP (for hosted / remote use)
coin-mcp --transport streamable-http --host 127.0.0.1 --port 8000
# Public bind (with no auth) — REQUIRES explicit flag and prints a stderr WARNING
coin-mcp --transport streamable-http --host 0.0.0.0 --port 8000 --allow-publicThere is no built-in authentication. If you bind to a non-loopback host, put a reverse proxy with auth in front (Caddy, nginx, Traefik, Cloudflare Access, etc.) or restrict via firewall. The --allow-public flag is a deliberate footgun guard.
Caching layer
A tiered TTL cache sits transparently behind every HTTP call so the LLM can fan out without burning your CoinGecko quota.
Endpoint pattern | TTL |
| 10 s |
| 60 s |
| 60 s |
| 30 s |
| 60 s |
| 5 min |
| 60 s |
| 2 min |
| 5 min |
| 10 min |
| 30 min |
| 10 min |
| 5 min |
| 30 min |
| 30 min |
| 10 min |
default | 30 s |
LRU-bounded at 2,000 entries. Cache key includes the URL, sorted query params, and a sha-256 digest of any auth header values — so two clients with different keys never share a cache entry. Errors are never cached. Hits return a deep copy so callers can mutate without poisoning. Inspect at runtime via the cache_stats MCP tool.
Security model
coin-mcp is data-only — there is no transaction signing, no private-key handling, no on-chain writes. The threat surface is therefore narrow but worth being honest about:
Path-injection guards on every URL-interpolated parameter (coin IDs, slugs, addresses). Invalid input returns
{"error": "invalid <kind>"}without making the HTTP call.compute_indicatorsrow cap at 5,000 (MAX_OHLCV_ROWS) prevents memory blowups from prompt-injected upstream data.CCXT exchange cache bounded (LRU 16) so an LLM can't force allocation of all 111 exchanges.
Network transports refuse non-loopback bind without
--allow-publicand emit a stderr WARNING when the flag is given.Cache key is auth-aware — auth headers contribute to the key via sha-256 digest. Multi-tenant safe.
No emoji of stdout in stdio mode — every log goes to stderr, so JSON-RPC framing is never corrupted.
If you find a security issue, please open an issue rather than a PR for non-trivial cases.
Project structure
coin-mcp/
├── server.py # Entrypoint — wires modules together
├── pyproject.toml
├── README.md
├── .env.example
├── .gitignore
├── coin_mcp/
│ ├── core.py # FastMCP instance, helpers, instructions block
│ ├── coingecko.py # 18 CoinGecko tools
│ ├── ccxt_tools.py # 7 CCXT tools
│ ├── derivatives.py # 3 funding/OI tools
│ ├── defillama.py # 9 DefiLlama tools
│ ├── dexscreener.py # 5 DexScreener tools
│ ├── aggregate.py # 3 cross-source tools
│ ├── sentiment.py # 1 Fear & Greed tool
│ ├── indicators.py # 1 local-compute tool
│ ├── cache.py # 2 cache-introspection tools + the cache itself
│ ├── prompts.py # 8 workflow templates
│ ├── resources.py # 3 static-reference resources
│ └── transport.py # CLI for stdio / SSE / streamable-HTTP
└── tests/
├── conftest.py # Autouse cache-clear + mcp_server fixture
├── test_registry.py # Tool count / instructions / prompt-ref sanity
├── test_cache_routing.py # TTL routing table + no-shadowing
├── test_indicators.py # Wilder RSI textbook vector, 5-col fallback, DoS cap
├── test_http_envelope.py # is_error truthy semantics + error not cached
└── test_validators.py # Path-injection rejection (CG/DexScreener)Testing
uv sync --extra dev
uv run pytest
# 29 passedThe high-ROI tests cover:
Every registered tool appears in the
instructionstable (LLM discoverability)Every prompt body references only real tool names and real parameters
Cache TTL routing for 17 representative URLs
Cache no-shadowing (
/coins/marketsvs/coins/{id}vs/market_chart)Wilder RSI matches the textbook 14-close reference vector (~70.46)
5-column OHLCV input doesn't crash OBV
compute_indicatorsrejects > 5,000 rowsis_errortruthy semanticsHTTP error responses are not cached
Path-injection on CoinGecko / DexScreener tools is rejected before any HTTP call
Roadmap
Tracked but not yet built:
Whale-transaction monitoring (Whale Alert)
Etherscan / blockchain-explorer-style read-only RPC
News + social aggregation (CryptoPanic / Santiment)
Aggregated open-interest history (cross-exchange)
Optional READ-ONLY signed requests for higher-tier API keys
If you have a specific data source you want integrated, open an issue with the API spec.
License
MIT — see LICENSE for the full text.
Acknowledgments
This project stands on shoulders.
Model Context Protocol — Anthropic's open standard for AI ↔ tool wiring
CoinGecko API — the most generous free crypto-data tier on the internet
CCXT — the unified exchange library that makes 100+ venues feel like one
DefiLlama — DeFi data infrastructure as a public good
DexScreener — DEX-side market data with no auth required
Alternative.me — the Crypto Fear & Greed Index
And all the prior MCP-server projects whose design choices we studied: doggybee/mcp-server-ccxt for the tiered cache pattern, QuantGeekDev/coincap-mcp for showing prompts matter, heurist-network/heurist-mesh-mcp-server for multi-transport precedent, the official CoinGecko MCP for dynamic tool discovery as an idea worth pursuing later.
Available Tools
49 toolscache_statsA
Return current HTTP-cache statistics.
Reach for this when:
The user asks why a price/value looks stale or is identical to a previous query (responses may be served from cache up to the per-endpoint TTL).
You're debugging rate-limit (HTTP 429) errors and want to confirm the cache is doing its job.
The user explicitly asks about cache utilization or hit rate.
Returns: Dict with keys: entries: number of live cached entries max_entries: LRU eviction threshold hits, misses, sets, errors: cumulative counters since process start hit_rate: hits / (hits + misses), 0.0 if no requests yet by_pattern: per-endpoint-pattern breakdown of the same counters
Inputs: no named parameters. Returns: object
clear_cacheA
Drop every entry from the HTTP cache.
Reach for this when:
The user explicitly asks to refresh / invalidate cached data.
You suspect cached data is materially stale and a TTL has not yet expired (e.g. user reports a price that disagrees with their exchange).
Prefer letting TTLs expire naturally; this tool resets ALL endpoints, not just one. Counters (hits/misses/...) are preserved.
Returns: {"cleared": }
Inputs: no named parameters. Returns: object
compare_funding_ratesA
Compare the current funding rate for one perp across multiple exchanges, in parallel.
Use this to find funding-rate arbitrage opportunities (long the venue
paying you, short the venue charging you) or to gauge how lopsided
positioning is across the market. The spread_bps field is
(max - min) * 10000 and tells you how big the dispersion is in basis
points. For a single exchange snapshot use get_funding_rate; for
historical trend on one venue use get_funding_rate_history.
Symbol convention: linear USDT-margined perps use "BTC/USDT:USDT" on
most venues. BitMEX's flagship is the inverse contract "BTC/USD:BTC", so
if you pass a USDT linear symbol the BitMEX branch will return an error
inline — that's expected. Branches that fail (unsupported symbol, geo-
block, rate limit) return {"exchange": ..., "error": ...} rather than
sinking the whole call.
Args: symbol: CCXT unified perp symbol. Default "BTC/USDT:USDT". exchange_ids: Comma-separated CCXT exchange IDs. Default "binance,okx,bybit,bitmex".
Returns:
{"symbol", "rates": [...], "max", "min", "spread_bps", "n_ok", "n_error"}. Each rate row is either
{"exchange", "fundingRate", "nextFundingTimestamp", "markPrice"}
on success or {"exchange", "error"} on failure. max/min/
spread_bps are populated only when at least two branches returned
numeric fundingRate values.
Inputs: symbol, exchange_ids.
compare_pricesA
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.
Inputs: coin_id, vs_currency, exchange_ids. Returns: object
compute_indicatorsA
Compute technical indicators on OHLCV candles you have already fetched.
USE THIS WHEN: you have OHLCV data (from get_exchange_ohlcv for one
specific exchange, or get_aggregated_ohlc for a CoinGecko cross-venue
aggregate) and you want RSI / MACD / Bollinger / EMA / SMA / ATR / ADX /
Stochastic / OBV without writing the math yourself.
THIS TOOL DOES NOT FETCH DATA. The caller must provide candles. If you
need candles first, call get_exchange_ohlcv (CCXT, per-venue, supports
1m candles) or get_aggregated_ohlc (CoinGecko, market-aggregate, daily/
hourly).
THIS TOOL RETURNS OBSERVATIONS, NOT TRADING ADVICE. The signal_summary
field describes what the indicators currently show (e.g. "RSI 72 —
overbought"). It never recommends buying or selling.
Input format:
ohlcv: list of rows. Either
6 columns: [timestamp_ms, open, high, low, close, volume] (CCXT)
5 columns: [timestamp_ms, open, high, low, close] (CoinGecko aggregated_ohlc — no volume)
Rows must be ordered oldest -> newest. With 5-column input, OBV is
unavailable (returned as null with a note).
Args:
ohlcv: Candles, oldest first. 5 or 6 columns per row.
indicators: Which indicators to compute. Any subset of
["rsi", "macd", "bollinger", "ema", "sma", "atr", "adx",
"stochastic", "obv"]. Default omits adx/stochastic/obv to keep
output compact; pass them explicitly to opt in.
rsi_period: Lookback for Wilder's RSI. Default 14.
macd_fast / macd_slow / macd_signal: MACD EMA periods. Defaults 12/26/9.
bb_period / bb_stddev: Bollinger Bands lookback and stddev multiplier.
Defaults 20 and 2.0.
ema_periods: List of EMA lookbacks to compute. Default [12,26,50,200].
sma_periods: List of SMA lookbacks to compute. Default [20,50,200].
atr_period: Wilder ATR lookback. Default 14.
stoch_k_period / stoch_d_period: Stochastic %K and %D periods.
Defaults 14 and 3.
adx_period: Wilder ADX lookback. Default 14.
include_series: If True, return the full per-bar series for every
indicator (suitable for charting). If False (default), return
only the latest value per indicator — much smaller payload.
When True and the input has more than MAX_SERIES_RETURN (1000)
rows, each returned series is truncated to the last
MAX_SERIES_RETURN entries and truncated_series_to is set on
the response so the caller can tell.
Bounds:
The input is rejected with an error if it has more than
MAX_OHLCV_ROWS (5000) rows — pass the most recent N bars or split
into chunks. This guards against pathological / prompt-injected
inputs whose ADX/Stochastic passes and JSON serialization would
otherwise dominate runtime and memory.
Returns:
Dict with one key per requested indicator plus:
- meta: { bar_count, has_volume, last_timestamp_ms, last_close }
- signal_summary: human-readable interpretation per indicator
(observations only — overbought / oversold / trend direction etc.)
Per-indicator shape:
- rsi: { latest, period, series? }
- macd: { latest: { macd, signal, histogram }, params, series? }
- bollinger: { latest: { upper, middle, lower }, period, stddev,
percent_b, bandwidth, series? }
- ema: { latest: { "12": ..., "26": ... }, periods, series? }
- sma: { latest: { "20": ..., "50": ... }, periods, series? }
- atr: { latest, period, series? }
- adx: { latest: { adx, plus_di, minus_di }, period, series? }
- stochastic: { latest: { k, d }, k_period, d_period, series? }
- obv: { latest, series? } # null + note if no volume column
Inputs: ohlcv (required), indicators, rsi_period, macd_fast, +11 more.
dex_searchA
Search DEX pairs across all chains by token name, symbol, or address.
Use this when the token is too new or small for CoinGecko (get_price
returns empty), or when the user wants DEX-side / on-chain prices
specifically. Returns the most-liquid matching pairs first so the top
result is usually the "real" market for the token.
Args: query: Free-text query — token name ("BasedPepe"), ticker ("PEPE"), or contract address. DexScreener returns up to 30 pairs per call. limit: Max pairs to return after sorting by USD liquidity desc (1..30).
Returns:
Array of trimmed pair objects with fields:
chainId, dexId, pairAddress, url, baseToken{address,name,symbol},
quoteToken{...}, priceNative, priceUsd, liquidityUsd, volumeH24,
priceChangeH24, fdv, marketCap, pairCreatedAt.
On API failure returns {"error": "..."} from the HTTP layer.
Inputs: query (required), limit.
get_aggregated_ohlcA
Get aggregated OHLC (open/high/low/close) candlestick data across all exchanges.
Use for technical-analysis-style candlestick views of "the market" rather
than a single venue. For per-exchange high-granularity candles (1m, 5m, etc.),
use get_exchange_ohlcv (CCXT) instead.
Candle width auto-selected by CoinGecko based on days:
days = 1 -> 30-minute candles
days in {7, 14, 30} -> 4-hour candles
days in {90, 180, 365, max} -> daily candles
Args: coin_id: CoinGecko coin ID. vs_currency: Quote currency (e.g. "usd"). days: Window in days. One of "1","7","14","30","90","180","365","max".
Returns: Array of [unix_ms, open, high, low, close] tuples.
Note: coin_id is validated against ^[a-z0-9][a-z0-9._-]{0,127}$.
Inputs: coin_id (required), vs_currency, days.
get_chain_tvl_historyA
Get historical total DeFi TVL for one chain, or for all of DeFi combined.
Use to chart "Ethereum TVL over the last year" or "how has total DeFi TVL
evolved?" Complements CoinGecko's get_global_defi, which only gives a
single current number with no history.
Args:
chain: Chain name from list_chains_tvl (e.g. "Ethereum", "Solana",
"Base", "Arbitrum"). Empty string returns total TVL across ALL of
DeFi (i.e. all chains combined).
days: Number of trailing daily points to return (1..3650). Default 90.
Returns:
Array of {date, tvl} points, where date is a unix epoch seconds
timestamp at UTC midnight and tvl is the chain's total DeFi TVL in
USD on that day.
Note: chain (when non-empty) is validated against
^[a-z0-9][a-z0-9._-]{0,127}$.
Inputs: chain, days.
get_coin_detailsA
Get rich metadata for a single coin: description, links, scores, market data, dev/community stats.
Use this when the user wants to learn about a coin (what is it, who built it, links to docs/source/socials), or when you need scores like CoinGecko rank, sentiment up/down vote percentages, or developer activity.
For just the price, use get_price (much cheaper).
Args:
coin_id: CoinGecko coin ID, e.g. "bitcoin".
localization: Include localized names/descriptions for many languages.
Usually false to keep responses small.
tickers: Include a tickers array (large). Use get_coin_tickers instead
when you specifically want exchange tickers.
market_data: Include current price, market cap, 24h/7d/30d/1y change,
ATH/ATL, supply, etc. Recommended.
community_data: Twitter/Reddit/Telegram follower counts and growth.
developer_data: GitHub stars, forks, commit counts, PR activity.
Returns:
A coin object with fields like id, symbol, name, description,
links, image, market_cap_rank, market_data, community_data,
developer_data, categories, genesis_date, etc.
Note: coin_id is validated against ^[a-z0-9][a-z0-9._-]{0,127}$.
Inputs: coin_id (required), localization, tickers, market_data, +2 more.
get_coin_tickersA
List exchange tickers (trading pairs) for a single coin across many venues.
Use to answer "where can I buy/sell X?" or "which exchanges have the best liquidity for X?" Each ticker includes price, volume, bid-ask spread, converted last/volume in BTC/ETH/USD, and CoinGecko's trust score.
Args:
coin_id: CoinGecko coin ID.
exchange_ids: Optional comma-separated exchange IDs to filter by
(CoinGecko exchange IDs, see list_exchanges_directory).
page: Pagination page (each page is up to 100 tickers).
order: Sort order. Default ranks by liquidity trust score.
Returns:
Object with name (coin name) and tickers (array of ticker objects).
Note: coin_id is validated against ^[a-z0-9][a-z0-9._-]{0,127}$.
Inputs: coin_id (required), exchange_ids, page, order.
get_companies_holdingsA
Get public companies' BTC or ETH treasury holdings.
Useful for "which companies own BTC?" or "what's MicroStrategy's stack?" style questions, and for tracking institutional adoption.
Args: coin_id: Either "bitcoin" or "ethereum" — those are the only assets CoinGecko tracks for public-treasury data.
Returns:
Object with total_holdings, total_value_usd, market_cap_dominance,
and companies — an array of { name, symbol, country, total_holdings, total_entry_value_usd, total_current_value_usd, percentage_of_total_supply }.
Inputs: coin_id.
get_consolidated_orderbookA
Fetch L2 order books from many exchanges in parallel and merge into one virtual book.
Answers "where is the best bid/ask across the whole market?" — more useful
than per-venue get_orderbook for execution analysis. The merged book does
NOT aggregate by price level; each level retains its source exchange so the
LLM can attribute liquidity per venue.
Args:
symbol: CCXT unified symbol (e.g. "BTC/USDT"). Some exchanges may
reject the symbol (BadSymbol) — those go into exchanges_error.
exchange_ids: Comma-separated CCXT exchange IDs (capped at 10).
depth: Levels per side per exchange, clamped to [1, 50].
Returns: Object with: - symbol, depth_per_exchange - exchanges_ok: list of exchange ids that responded - exchanges_error: list of {exchange, error} for failures - bids: merged bids sorted by price desc, capped at depth*len(ok), each entry {price, amount, exchange} - asks: merged asks sorted by price asc, capped likewise - best_bid, best_ask: top of merged book with attribution - spread_bps: (best_ask - best_bid) / mid * 10000
Inputs: symbol, exchange_ids, depth. Returns: object
get_dex_pairA
Get full detail for a single DEX pair on a specific chain.
Use after dex_search / get_dex_token_pairs when the user wants the
full picture for one specific market — including buy/sell tx counts at
multiple windows (m5/h1/h6/h24), price changes, native-token price,
base/quote liquidity sides, and links/socials when present.
Args: chain_id: Chain identifier as DexScreener returns it. Typical values: "ethereum", "bsc", "solana", "polygon", "arbitrum", "base", "optimism", "avalanche", "pulsechain", "fantom", "cronos", ... pair_address: The pair's contract address (case-insensitive on EVM).
Returns:
The first matching pair object as returned by DexScreener (with the
full txns, info, volume, priceChange, liquidity sub-objects),
or {"error": "pair not found"} if no pair matches, or the structured
HTTP error dict on transport failure.
Note: chain_id is validated against ^[a-z0-9-]{1,32}$ and
pair_address against EVM hex / Solana base58.
Inputs: chain_id (required), pair_address (required).
get_dex_token_pairsA
Get all DEX pairs trading a given token contract, across every chain.
Use this when you have an EVM/Solana contract address and want to see every venue where it's traded — useful for "which DEX has the deepest liquidity for this token?" and for finding the canonical pair on a specific chain. Pairs are returned sorted by USD liquidity desc.
Prefer this over dex_search when you already have the contract address;
prefer get_price (CoinGecko) when the token is large and listed on CEXes.
Args: token_address: Token contract address. EVM addresses like "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" (USDC on Ethereum) and Solana mint addresses both work. limit: Max pairs to return (1..30 typical). chain: Optional chain filter — only return pairs on this chain. Common values: "ethereum", "bsc", "solana", "polygon", "arbitrum", "base", "optimism", "avalanche". Leave empty for all chains.
Returns:
Array of trimmed pair objects (same shape as dex_search).
On API failure returns {"error": "..."}.
Note: token_address is validated against EVM hex or Solana base58
(rejects anything containing /, ?, #, .., %, or whitespace).
Inputs: token_address (required), limit, chain.
get_exchange_infoA
Get detailed info on a single exchange (CoinGecko directory): description, links, volume, top tickers.
Args:
exchange_id: CoinGecko exchange ID (e.g. "binance", "gdax", "kraken").
See list_exchanges_directory to discover IDs. NOTE: CoinGecko
exchange IDs sometimes differ from CCXT IDs (e.g. CoinGecko uses
"gdax" for Coinbase Pro).
Returns: Exchange object with name, year_established, country, description, url, image, trust score, volume metrics, and a tickers array.
Note: exchange_id is validated against ^[a-z0-9][a-z0-9._-]{0,127}$.
Inputs: exchange_id (required).
get_exchange_marketsA
List all trading pairs (markets) supported by a specific exchange.
Use to discover what symbols an exchange trades (e.g. "does Kraken list SOL/USDC?"), or to enumerate available perpetual contracts.
Args:
exchange_id: CCXT exchange ID (lowercase). See list_supported_exchanges.
active_only: If true, exclude delisted/inactive markets.
Returns:
Object with exchange, count, and markets — each market has
symbol, base, quote, settle, type (spot/swap/future/option),
linear, inverse, contract, active.
Inputs: exchange_id (required), active_only.
get_exchange_ohlcvA
Get OHLCV candlestick data from a specific exchange (high-granularity, including 1-minute candles).
Prefer this over get_aggregated_ohlc when:
the user asks about a specific venue, OR
they need sub-hour candles (1m/5m/15m), OR
they need exact volume on one exchange.
Args: exchange_id: CCXT exchange ID, e.g. "binance". symbol: Unified symbol, e.g. "BTC/USDT". timeframe: Candle width. Not every exchange supports every timeframe; common safe choices: "1m","5m","15m","1h","4h","1d". limit: Number of candles. Most exchanges cap at ~500-1500 per call. since_ms: Optional unix-millis lower bound. Most recent candles when null.
Returns: Array of [timestamp_ms, open, high, low, close, volume] tuples, oldest first.
Inputs: exchange_id (required), symbol (required), timeframe, limit, +1 more.
get_exchange_tickerA
Get a real-time ticker (bid/ask/last/24h stats) for one symbol on one exchange.
Use when the user asks about price on a specific venue ("BTC on Coinbase", "ETH on Binance") or wants tight bid-ask spread info.
Args: exchange_id: CCXT exchange ID, e.g. "binance". symbol: CCXT unified symbol, e.g. "BTC/USDT", "ETH/USD", "BTC/USDT:USDT" for a linear perp on Binance.
Returns:
Ticker object with symbol, timestamp, datetime, bid, ask,
last, high, low, open, close, vwap, baseVolume,
quoteVolume, percentage, change.
Inputs: exchange_id (required), symbol (required).
get_fear_greed_indexA
Get the Crypto Fear & Greed Index (0=extreme fear, 100=extreme greed).
A widely-quoted contrarian sentiment indicator that combines volatility, momentum, social media, surveys, BTC dominance and trend volume into a single 0-100 score. Useful for "are people fearful or greedy right now?" questions.
Args: limit: How many days of history to return (default 1 = today only, 0 = all history).
Returns:
Object with name, data (array of { value, value_classification, timestamp, time_until_update }), and metadata. Higher = greedier.
Inputs: limit.
get_funding_rateA
Get the current funding rate for a perpetual-futures contract on a specific exchange.
Funding rate is a periodic payment between longs and shorts that anchors perp prices to spot. Positive funding means longs pay shorts (crowd is long); negative funding means shorts pay longs.
Args: exchange_id: CCXT exchange ID that supports perps, e.g. "binance", "okx", "bybit", "bitmex". symbol: Perp symbol with settle suffix, e.g. "BTC/USDT:USDT" for the Binance USDT-margined linear perp, "BTC/USD:BTC" for an inverse perp.
Returns:
Funding info with symbol, markPrice, indexPrice, fundingRate,
fundingTimestamp, nextFundingRate, nextFundingTimestamp,
interestRate. Exact fields vary slightly by exchange.
Inputs: exchange_id (required), symbol (required).
get_funding_rate_historyA
Get historical funding-rate time-series for a perpetual contract on one exchange.
Use this for trend analysis on funding — "is funding turning positive?",
"how long has BTC funding been negative?", spotting funding cycles, or
feeding a series into a quant signal. For the single most-recent snapshot
use get_funding_rate. For a cross-exchange comparison of the current
rate use compare_funding_rates.
The funding interval varies by venue: Binance and OKX charge funding every 8 hours, Bybit every 1 hour for some perps, BitMEX every 8 hours, etc. Returned timestamps reflect each charge. Don't assume a uniform cadence when comparing series across exchanges.
Args: exchange_id: CCXT exchange ID supporting perps, e.g. "binance", "okx", "bybit", "bitmex", "bitget", "bingx", "gate", "mexc", "kucoinfutures", "hyperliquid". symbol: Perp symbol with settle suffix. Linear (USDT-margined): "BTC/USDT:USDT". Inverse (coin-margined): "BTC/USD:BTC". since_ms: Optional unix-millis lower bound. If null, the exchange returns its default window (typically the most-recent N rows). limit: Max number of rows to return; clamped to [1, 1000].
Returns:
Array of rows oldest-first, each with timestamp (unix millis),
datetime (ISO 8601), symbol, fundingRate (e.g. 0.0001 = 1 bp),
and exchange-specific extras under info. On unsupported exchanges
returns {"error": "..."}.
Inputs: exchange_id (required), symbol (required), since_ms, limit.
get_global_defiA
Get global DeFi market stats: total DeFi market cap, DeFi-to-Eth ratio, top DeFi coin by share.
For protocol-level TVL or chain-level breakdowns, use get_protocol_tvl
or list_chains_tvl (DefiLlama) instead — they're much more granular.
Returns:
Object with data containing defi_market_cap, eth_market_cap,
defi_to_eth_ratio, trading_volume_24h, defi_dominance,
top_coin_name, top_coin_defi_dominance.
Inputs: no named parameters.
get_global_marketA
Get global cryptocurrency market stats: total market cap, total 24h volume, BTC/ETH dominance.
Use for macro questions like "what's the total crypto market cap?", "is BTC dominance rising?", "how many coins exist?".
Returns:
Object with data containing:
- active_cryptocurrencies, upcoming_icos, ongoing_icos, ended_icos, markets
- total_market_cap (mapping of currency -> amount)
- total_volume (mapping of currency -> amount)
- market_cap_percentage (per-coin share of total cap, e.g. {"btc": 52.1})
- market_cap_change_percentage_24h_usd
- updated_at
Inputs: no named parameters.
get_market_chartA
Get historical price, market cap and total volume time series for a coin.
Use this to draw line charts or compute returns/volatility over a window.
For candlestick (OHLC) data use get_aggregated_ohlc instead.
Granularity is auto-selected by CoinGecko based on days:
days <= 1 -> ~5-minute datapoints
days <= 90 -> ~hourly datapoints
days > 90 -> daily datapoints
Args: coin_id: CoinGecko coin ID (e.g. "bitcoin"). vs_currency: Quote currency (e.g. "usd", "eur", "btc"). days: Window in days. Examples: "1", "7", "14", "30", "90", "180", "365", or "max" for the full history. interval: Force daily granularity by passing "daily". Leave empty for auto.
Returns: Object with three arrays of [unix_ms, value] pairs: - prices - market_caps - total_volumes
Note: coin_id is validated against ^[a-z0-9][a-z0-9._-]{0,127}$.
Inputs: coin_id (required), vs_currency, days, interval.
get_nft_collectionA
Get detailed data for a single NFT collection: floor price, market cap, volume, holders, links.
Args:
nft_id: CoinGecko NFT collection ID, e.g. "bored-ape-yacht-club",
"cryptopunks". Use search or list_nfts to find IDs.
Returns:
NFT collection object with floor_price, market_cap, volume_24h,
floor_price_in_usd_24h_percentage_change, number_of_unique_addresses,
total_supply, links, image, etc.
Note: nft_id is validated against ^[a-z0-9][a-z0-9._-]{0,127}$.
Inputs: nft_id (required).
get_open_interestA
Get the current open interest (OI) for a perpetual contract on one exchange.
Open interest is the total notional/contract count of outstanding positions on a venue. Reading OI alongside price:
OI rising with price rising -> new longs entering, trend has fuel
OI rising with price falling -> new shorts loading up
OI falling with price rising -> short squeeze / covering rally
OI falling with price falling -> longs capitulating This is descriptive, not advice. For funding-rate context use
get_funding_rate(snapshot) orget_funding_rate_history(series).
Falls back to fetch_open_interest_history(timeframe="1h", limit=1) when
the exchange exposes only the historical endpoint.
Args: exchange_id: CCXT exchange ID supporting perps. symbol: Perp symbol with settle suffix, e.g. "BTC/USDT:USDT" or "BTC/USD:BTC" for inverse.
Returns:
Object with symbol, openInterestAmount (in base units / contracts),
openInterestValue (notional in quote), timestamp, datetime, and
exchange-specific info. On unsupported exchanges returns
{"error": "..."}.
Inputs: exchange_id (required), symbol (required).
get_orderbookA
Get a Level-2 order-book snapshot (top bids and asks) from a specific exchange.
Use to assess liquidity, spread, and short-term supply/demand on a venue. Note this is a snapshot, not a stream.
Args: exchange_id: CCXT exchange ID. symbol: CCXT unified symbol, e.g. "BTC/USDT". limit: How many price levels per side (default 20). Some exchanges cap this; CCXT will return as many as the venue allows.
Returns:
Object with symbol, timestamp, datetime, bids (array of
[price, amount] pairs sorted high to low), asks (low to high), nonce.
Inputs: exchange_id (required), symbol (required), limit.
get_priceA
Get the current spot price of one or more cryptocurrencies.
Use this for the cheapest, fastest "what is X worth right now?" lookup.
For historical prices, use get_market_chart or get_aggregated_ohlc.
For real-time prices on a specific venue, use get_exchange_ticker.
Args:
coin_ids: Comma-separated CoinGecko coin IDs, e.g. "bitcoin,ethereum,solana".
IDs are NOT ticker symbols — call search first if unsure.
vs_currencies: Comma-separated target currencies, e.g. "usd,eur,btc".
include_market_cap: Include each coin's market cap in the response.
include_24hr_vol: Include 24h trading volume.
include_24hr_change: Include 24h price change percent.
include_last_updated_at: Include unix timestamp of last update.
Returns: Mapping of {coin_id: {currency: price, ...}}. When the optional flags are enabled, additional fields like "_market_cap", "_24h_vol", "_24h_change", and "last_updated_at" appear alongside the price.
Inputs: coin_ids (required), vs_currencies, include_market_cap, include_24hr_vol, +2 more.
get_protocol_tvlA
Get a single protocol's metadata, current TVL, and recent TVL history.
Use after list_protocols to drill into one protocol — e.g. "what is
Aave's TVL on each chain?" or "show me Lido's last 90 days of TVL."
The raw DefiLlama response is enormous (multi-year daily series for the
overall protocol AND every chain it touches), so this tool trims each
history series to the last history_days daily points and drops the
per-token breakdown arrays (tokens, tokensInUsd).
Args:
slug: Protocol slug from list_protocols (e.g. "aave-v3", "lido",
"uniswap-v3"). NOT a CoinGecko coin ID.
history_days: Number of trailing daily points to keep for each TVL
series. Default 90; use a smaller value for compactness or a
larger value (up to ~1500) for long-range analysis.
Returns:
Protocol object with id, name, symbol, category, chains,
chain, description, url, mcap, currentChainTvls (snapshot
per chain), tvl (recent series of {date, totalLiquidityUSD}), and
chainTvls (per-chain trimmed series).
Note: slug is validated against ^[a-z0-9][a-z0-9._-]{0,127}$.
Inputs: slug (required), history_days.
get_recent_tradesA
Get recent public trades (the tape) for a symbol on a specific exchange.
Use to inspect order flow, identify large prints, or compute very short-term trade-driven metrics.
Args: exchange_id: CCXT exchange ID. symbol: Unified symbol, e.g. "BTC/USDT". limit: Number of recent trades to return (max ~1000 depending on venue).
Returns:
Array of trades with id, timestamp, datetime, symbol, side,
price, amount, cost, takerOrMaker.
Inputs: exchange_id (required), symbol (required), limit.
get_token_dex_priceA
Get DefiLlama oracle spot prices for tokens identified by chain:address.
Use when you have a token's contract address and want a price without
going through CoinGecko/DexScreener — DefiLlama aggregates DEX prices
across many sources. For human-friendly token discovery (search by
symbol/name), use dex_search (DexScreener) or CoinGecko's search.
Args:
coins: Comma-separated chain:address identifiers, e.g.
"ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,bsc:0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c".
Chain identifiers follow DefiLlama's naming (e.g. "ethereum",
"bsc", "polygon", "arbitrum", "base", "solana"). Solana uses
"solana:".
Returns:
Object with a coins map keyed by chain:address, where each value
has decimals, price, symbol, timestamp, confidence.
Note: Each chain:address segment of coins is validated. Chain matches
^[a-z0-9-]{1,40}$ and address is EVM hex, Solana base58, or DefiLlama
token id.
Inputs: coins (required).
get_top_gainers_losersA
Get the biggest price movers (gainers and losers) over a time window.
NOTE: This endpoint typically requires a CoinGecko API key (Demo tier is
fine). Without a key it may return an error — fall back to list_top_coins
and sort client-side if so.
Args: vs_currency: Quote currency. duration: Time window for price change. top_coins: Universe to scan — "300", "500", "1000", or "all".
Returns:
Object with top_gainers and top_losers arrays of coin objects
including usd_24h_change (or whichever duration you chose).
Inputs: vs_currency, duration, top_coins.
get_trendingA
Get currently trending coins, NFT collections and categories on CoinGecko (last 24h searches).
Use to answer "what is the market paying attention to right now?" or to surface narratives. This is search-driven, not volume-driven, so it captures emergent interest before price moves.
Returns:
Object with arrays coins, nfts, and categories. Each coin item
includes item.id, item.name, item.symbol, item.market_cap_rank,
and item.data with price/24h-change snapshot.
Inputs: no named parameters.
health_checkA
Parallel-ping every upstream data source and report status + latency.
DEBUGGING tool. Call only when the user reports something is broken ("X is down", "data looks stale") or when you suspect an upstream is degraded. Do NOT call on every request — issues fresh network calls.
Pings in parallel:
CoinGecko: /ping
DefiLlama: /protocols?limit=1
DexScreener: /latest/dex/search?q=BTC
Alternative.me: /fng/?limit=1
CCXT/Binance: fetch_status() (fetch_ticker fallback)
Returns:
Object with checked_at (ISO8601 UTC), all_ok (bool — true iff every
source succeeded), and sources — array sorted by latency asc. Each
entry has source, ok, latency_ms, and detail (short success
identifier or <ExceptionType>: <first 100 chars> on failure).
Inputs: no named parameters. Returns: object
list_categoriesA
List all coin categories with aggregated market data (market cap, 24h volume, 24h change).
Use to discover narratives ("Layer 1", "DeFi", "Meme", "AI", "RWA",
"Liquid Staking", ...) and to find category IDs you can pass to
list_top_coins(category=...).
Args: order: Sort order.
Returns:
Array of categories with id, name, market_cap,
market_cap_change_24h, volume_24h, top_3_coins, updated_at.
Inputs: order.
list_chains_tvlA
List blockchain networks ranked by current total DeFi TVL.
Use for "which chains have the most DeFi activity?", "how does Solana's
TVL compare to Ethereum's?", or to discover chain names you can pass to
get_chain_tvl_history or list_protocols(chain=...).
Args: limit: Number of chains to return after sorting by TVL desc (1..200).
Returns:
Array of chain summaries with name, tvl, tokenSymbol, chainId,
gecko_id, cmcId.
Inputs: limit.
list_derivatives_exchangesA
List derivatives (futures/perp/options) exchanges ranked by open interest or volume.
Use to compare derivatives venues (Binance Futures, Bybit, OKX, dYdX, etc.) by size.
Args: order: Sort order. per_page: 1..250 per page. page: Page number.
Returns:
Array of derivatives exchanges with id, name, open_interest_btc,
trade_volume_24h_btc, number_of_perpetual_pairs,
number_of_futures_pairs, year_established, country, url.
Inputs: order, per_page, page.
list_dex_volumesA
List DEXes ranked by 24-hour trading volume.
Use for "biggest DEXes by volume", "Uniswap vs PancakeSwap volume", or to
see momentum (each entry includes 1d/7d/30d change percentages). Pair with
CCXT's get_exchange_ticker for centralized-exchange volumes.
Args: limit: Number of DEXes to return (1..200).
Returns:
Object with a summary (totals across all DEXes: total24h,
total7d, total30d, change_1d, change_7d, change_1m) and
protocols — an array of name, displayName, slug, category,
chains, total24h, total7d, total30d, total1y, totalAllTime,
change_1d, change_7d, change_1m.
Inputs: limit.
list_exchanges_directoryA
List centralized exchanges from CoinGecko's directory, ranked by trust score / volume.
This is CoinGecko's curated directory with metadata (year established,
country, trust scores, 24h BTC-equivalent volume). For exchanges you can
actually query in real time via this MCP, see list_supported_exchanges.
Args: per_page: 1..250 exchanges per page. page: Page number.
Returns:
Array of exchanges with id, name, year_established, country,
url, image, trust_score, trust_score_rank, trade_volume_24h_btc,
trade_volume_24h_btc_normalized.
Inputs: per_page, page.
list_fees_revenueA
List protocols ranked by fees or revenue (daily or all-time).
Useful for "which protocols make the most money?", "Tron vs Ethereum
fees", or "Aave's revenue this month". DefiLlama distinguishes fees
(gross paid by users) from revenue (kept by the protocol/token holders),
and offers daily and all-time aggregations — pick via data_type.
Args:
limit: Number of protocols to return (1..200).
data_type: Which metric series to pull. "dailyFees" = fees on a daily
basis (typical for "what's hot today?"), "dailyRevenue" = revenue
on a daily basis, "totalFees"/"totalRevenue" = cumulative all-time.
Note: regardless of data_type, each protocol's per-window fields
are still named total24h, total7d, total30d, etc., but they
now refer to the chosen metric.
Returns:
Object with a summary (totals across all protocols: total24h,
total7d, total30d, change_1d, change_7d, change_1m) and
protocols — an array of name, displayName, slug, category,
chains, total24h, total7d, total30d, total1y, totalAllTime,
change_7dover7d, change_30dover30d.
Inputs: limit, data_type.
list_latest_dex_tokensA
List the latest tokens that have set up a profile on DexScreener.
A profile means the project has filled in description / website / socials on DexScreener — typically a sign of a newly-launched but at least somewhat promoted token. Useful as an early-signal feed for "what's new today?"
NOTE: a profile does not imply legitimacy or liquidity. Cross-check with
get_dex_token_pairs(token_address, ...) before quoting prices.
Args: limit: Max tokens to return (the API itself returns up to ~30).
Returns:
Array of token-profile objects with chainId, tokenAddress, url,
description, icon, and a links array of websites/socials.
On API failure returns {"error": "..."}.
Inputs: limit.
list_nftsA
List NFT collections sortable by floor price, market cap, or 24h volume.
Args: order: Sort order. per_page: 1..250. page: Page number.
Returns:
Array of NFT collections with id, name, symbol, asset_platform_id,
contract_address. Use get_nft_collection for details on one.
Inputs: order, per_page, page.
list_protocolsA
List DeFi protocols ranked by TVL (or 1d/7d change, or market cap).
Use this for "what are the biggest DeFi protocols?", "which protocols had
the largest TVL inflows/outflows today?", or to find a protocol's slug
before calling get_protocol_tvl. Far more granular than CoinGecko's
get_global_defi, which only returns aggregate DeFi market cap.
Args:
limit: Number of protocols to return after sorting (1..500).
sort_by: Metric to rank by, descending. "tvl" = current TVL,
"change_1d"/"change_7d" = TVL change %, "mcap" = token market cap.
chain: Optional chain name filter (e.g. "Ethereum", "Solana", "Base",
"Arbitrum"). Matches against each protocol's chains array,
case-insensitive. Empty string disables the filter.
Returns:
Array of protocol summaries with name, slug, symbol, category,
chain, chains, tvl, change_1h, change_1d, change_7d,
mcap, url.
Note: chain (when non-empty) is validated against ^[a-z0-9][a-z0-9._-]{0,127}$.
Inputs: limit, sort_by, chain.
list_stablecoinsA
List stablecoins ranked by current circulating market cap.
Use for "what are the biggest stablecoins?", "is USDT or USDC bigger?",
"where is USDC issued (which chains)?", or to track peg health
(price field shows the current oracle price).
Args:
limit: Number of stablecoins to return (1..200).
include_chain_breakdown: If true, includes a chainCirculating map
of supply per chain. If false, drops it to keep the response
small (the breakdown for the top stablecoins is verbose).
Returns:
Array of stablecoin summaries with id, name, symbol, pegType,
pegMechanism, price, circulating, circulatingPrevDay,
circulatingPrevWeek, circulatingPrevMonth, chains, and
(optionally) chainCirculating. The id field is what
get_stablecoin_detail would accept (DefiLlama internal id).
Inputs: limit, include_chain_breakdown.
list_supported_exchangesA
List all exchange IDs that this server can query in real time via CCXT.
Use this when you need to know which exchange_id values are valid for the
other CCXT-backed tools (get_exchange_markets, get_exchange_ticker,
get_orderbook, get_recent_trades, get_exchange_ohlcv, get_funding_rate).
Returns:
Object with count and exchanges (array of lowercase exchange IDs
such as "binance", "okx", "coinbase", "kraken", "bybit", "kucoin",
"huobi", "bitfinex", "gateio", "mexc").
Inputs: no named parameters.
list_top_boosted_tokensA
List currently top-boosted tokens on DexScreener (paid promotion).
"Boosts" are paid promotion slots — projects pay to surface their token. Read these results with skepticism: high boost spend does NOT imply quality, traction or safety. This list is mostly useful as a signal of "what is being actively pushed right now" rather than "what is good".
For an unbiased early-tokens view prefer list_latest_dex_tokens; for
actual price/liquidity always confirm via get_dex_token_pairs.
Args: limit: Max tokens to return.
Returns:
Array of boosted-token objects with chainId, tokenAddress, url,
description, icon, links, and totalAmount (boost spend).
On API failure returns {"error": "..."}.
Inputs: limit.
list_top_coinsA
List top coins with market data (price, market cap, volume, change %) — sortable and paginated.
The workhorse for "show me the top N coins" / "top by volume" / "top in DeFi" style questions. Each call returns up to 250 coins; paginate for more.
Args:
vs_currency: Quote currency (e.g. "usd").
order: Sort order. Default is descending market cap.
per_page: 1..250 coins per page.
page: Page number, 1-indexed.
category: Optional category ID to filter by (see list_categories),
e.g. "decentralized-finance-defi", "layer-1", "meme-token".
price_change_percentages: Comma list of windows to include —
any of "1h,24h,7d,14d,30d,200d,1y".
Returns: Array of coin objects with id, symbol, name, image, current_price, market_cap, market_cap_rank, total_volume, high_24h, low_24h, price_change_*_in_currency, ath, atl, circulating_supply, etc.
Inputs: vs_currency, order, per_page, page, +2 more.
list_yield_poolsA
List DeFi yield-bearing pools (lending, staking, LPs) filtered & ranked by APY or TVL.
The DefiLlama yields endpoint returns ~20k pools, so this tool aggressively
filters and slices client-side. Use for "best stablecoin yields right now",
"highest APY on Aave", "Lido vs Rocket Pool TVL", etc. Pair with
list_protocols if you want protocol-level TVL rather than per-pool APY.
Args:
min_tvl_usd: Minimum pool TVL in USD. Default 1M filters out tiny
pools. Set to 0 to disable.
project: Optional project filter, e.g. "aave-v3", "lido", "compound-v3".
Matches the project field, case-insensitive.
chain: Optional chain filter, e.g. "Ethereum", "Solana", "Arbitrum".
Case-insensitive exact match against chain.
symbol: Optional symbol/token substring filter, e.g. "USDC", "ETH",
"STETH". Case-insensitive substring match against symbol.
limit: Number of pools to return after filtering & sorting (1..500).
sort_by: Metric to rank by, descending. "apy" = current APY,
"tvlUsd" = pool size, "apyMean30d" = 30-day mean APY.
Returns:
Array of pool summaries with pool (DefiLlama pool id), chain,
project, symbol, tvlUsd, apy, apyBase, apyReward,
apyMean30d, apyPct1D, apyPct7D, apyPct30D, stablecoin,
ilRisk, exposure, predictions, rewardTokens, underlyingTokens.
Note: project/chain/symbol (when non-empty) are validated. project
and chain use ^[a-z0-9][a-z0-9._-]{0,127}$; symbol allows mixed case
via ^[A-Za-z0-9._-]{0,63}$.
Inputs: min_tvl_usd, project, chain, symbol, +2 more.
searchA
Universal CoinGecko search — resolves names/symbols to IDs across coins, exchanges, categories and NFTs.
ALWAYS use this first when the user mentions a coin/exchange/NFT by name or ticker symbol and you don't already know the canonical CoinGecko ID. Most other tools require IDs.
Args: query: Free-text query, e.g. "btc", "uniswap", "bored ape".
Returns: Object with arrays: - coins: [{ id, name, symbol, market_cap_rank, ... }] - exchanges: [{ id, name, market_type }] - categories: [{ id, name }] - nfts: [{ id, name, symbol }]
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 49 tools
Every tool has a clearly distinct purpose, with no overlapping functionality. Tools like get_price, get_exchange_ticker, compare_prices, and get_consolidated_orderbook are all price-related but target different sources and granularities, clearly differentiated by descriptions.
All tools follow a consistent verb_noun snake_case pattern (e.g., get_price, list_top_coins, compare_funding_rates). The naming is predictable and makes it easy to infer tool purpose from the name alone.
With 49 tools, the server is significantly over the typical well-scoped range of 3-15. While each tool appears justified, the sheer number makes it overwhelming for an agent to efficiently select the right tool, increasing cognitive load.
The tool set covers an extensive range of crypto data: prices, market data, exchanges, DEX, DeFi, NFTs, stablecoins, funding rates, and more. Minor gaps exist (e.g., no direct historical price series for multiple coins simultaneously), but overall the surface is comprehensive for the domain.
Maintenance
Related MCP Connectors
Crypto market & research MCP for AI agents: prices, derivatives, options, on-chain, sentiment, news.
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
Unlock the power of real-time cryptocurrency data with our Crypto Price Insights MCP server.
Crypto MCP with 21 tools for market data, DeFi, analytics, and sentiment. Post-paid USDC billing.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides real-time and historical cryptocurrency market data through integration with major exchanges. This server enables LLMs like Claude to fetch current prices, analyze market trends, and access detailed trading information.783MIT
- FlicenseNot gradedqualityCmaintenanceEnables MCP-compatible AI clients to access live crypto market data and AI-driven quantitative analysis, with structured outputs and full observability.-
- AlicenseBqualityDmaintenanceMCP server that exposes QuantXData's institutional crypto market data APIs to AI assistants, enabling natural language queries for trades, order books, OHLCV, options, and more across 120+ exchanges.12MIT
- AlicenseCqualityDmaintenanceA Model Context Protocol server exposing 58 online tools (crypto, data, image, text, etc.) and workflow execution, enabling MCP clients like Claude Desktop to invoke them via natural language.588 npmMIT