get_global_market
Retrieve global cryptocurrency market statistics: total market cap, 24h volume, BTC/ETH dominance, and more. Use to answer macro questions like total market cap or dominance trends.
Instructions
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
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- coin_mcp/coingecko.py:353-369 (handler)The actual tool handler for get_global_market. Decorated with @mcp.tool(), it calls _cg_get('/global') to fetch global crypto market stats from CoinGecko's /global endpoint.
@mcp.tool() async def get_global_market() -> Any: """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 """ return await _cg_get("/global") - coin_mcp/core.py:220-225 (helper)The _cg_get helper function used by the handler. Constructs the full CoinGecko API URL using the base URL (pro or public) and appends headers.
async def _cg_get(path: str, params: dict[str, Any] | None = None) -> Any: return await _http_get( f"{_coingecko_base()}{path}", params=params, headers=_coingecko_headers(), ) - coin_mcp/coingecko.py:353-354 (registration)The tool is registered via the @mcp.tool() decorator on the get_global_market function. The 'mcp' object is imported from coin_mcp.core.
@mcp.tool() async def get_global_market() -> Any: - coin_mcp/core.py:1-1 (helper)The mcp FastMCP instance imported by the tool module. Defined in coin_mcp/core.py at line 58.
"""coin-mcp core — FastMCP instance, configuration, and shared helpers.