get_companies_holdings
Retrieve public companies' Bitcoin or Ethereum treasury holdings, including total holdings, value, and market cap dominance. Ideal for tracking institutional adoption and answering queries about corporate crypto treasuries.
Instructions
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 }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin_id | No | bitcoin |
Implementation Reference
- coin_mcp/coingecko.py:534-552 (handler)The actual tool handler. Decorated with @mcp.tool(), accepts a Literal['bitcoin','ethereum'] coin_id (default 'bitcoin'), makes a GET request to CoinGecko's /companies/public_treasury/{coin_id} endpoint via the shared _cg_get helper, and returns raw JSON.
@mcp.tool() async def get_companies_holdings( coin_id: Literal["bitcoin", "ethereum"] = "bitcoin", ) -> Any: """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 }`. """ return await _cg_get(f"/companies/public_treasury/{coin_id}") - coin_mcp/coingecko.py:543-551 (schema)Input schema: coin_id is Literal['bitcoin','ethereum'] with default 'bitcoin'. Output described in docstring: object with total_holdings, total_value_usd, market_cap_dominance, and companies array.
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 }`. """ - coin_mcp/coingecko.py:534-534 (registration)Tool registration via @mcp.tool() decorator. The 'mcp' object is the FastMCP instance imported from coin_mcp.core (line 7).
@mcp.tool() - coin_mcp/core.py:220-225 (helper)_cg_get helper — constructs the full URL using _coingecko_base() and passes auth headers, then delegates to _http_get which uses the TTL cache.
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(), )