get_global_defi
Get global DeFi market overview: total market cap, DeFi-to-Eth ratio, top coin share, and 24h trading volume.
Instructions
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- coin_mcp/coingecko.py:372-384 (handler)The `get_global_defi` tool handler function. Decorated with @mcp.tool() on line 372, this async function calls CoinGecko's /global/decentralized_finance_defi endpoint and returns global DeFi market stats including total DeFi market cap, DeFi-to-Eth ratio, top DeFi coin by share, trading volume, and DeFi dominance.
@mcp.tool() async def get_global_defi() -> Any: """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`. """ return await _cg_get("/global/decentralized_finance_defi") - coin_mcp/core.py:94-94 (registration)The tool is registered via @mcp.tool() decorator (line 372 of coingecko.py) on the FastMCP instance defined in core.py. The registration decorator is @mcp.tool() and the mcp instance is created at line 58 of core.py. Line 94 of core.py documents get_global_defi in the instruction table as 'DeFi TVL totals (high level, CoinGecko view)'.
| DeFi TVL totals (high level, CoinGecko view) | get_global_defi | - coin_mcp/coingecko.py:7-7 (registration)The tool imports the `mcp` FastMCP instance from `coin_mcp.core` (line 7 of coingecko.py: `from .core import _bool_str, _cg_get, mcp`). The @mcp.tool() decorator on line 372 registers `get_global_defi` as an MCP tool.
from .core import _bool_str, _cg_get, mcp