Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_stablecoin_charts_by_chain

Retrieve historical market capitalization charts for stablecoins on specific blockchain networks to analyze stablecoin adoption and trends over time.

Instructions

GET /stablecoins/stablecoincharts/{chain}

Get historical mcap sum of all stablecoins in a chain. Parameters: chain: chain slug (e.g., 'Ethereum') stablecoin: stablecoin ID (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYes
stablecoinNo

Implementation Reference

  • The handler function decorated with @mcp.tool() registers and implements the tool. It constructs parameters if stablecoin is provided and calls the shared make_request helper to fetch data from DefiLlama's /stablecoins/stablecoincharts/{chain} endpoint, returning the JSON response as a string.
    @mcp.tool() async def get_stablecoin_charts_by_chain(chain: str, stablecoin: Optional[int] = None) -> str: """GET /stablecoins/stablecoincharts/{chain} Get historical mcap sum of all stablecoins in a chain. Parameters: chain: chain slug (e.g., 'Ethereum') stablecoin: stablecoin ID (optional) """ params = {} if stablecoin is not None: params['stablecoin'] = stablecoin result = await make_request('GET', f'/stablecoins/stablecoincharts/{chain}', params) return str(result)
  • Shared helper function used by all tools, including get_stablecoin_charts_by_chain, to make HTTP requests to the DefiLlama API using httpx.
    async def make_request(method: str, endpoint: str, params: Optional[Dict[str, Any]] = None) -> Any: """Make a request to the DefiLlama API.""" try: response = await client.request(method, endpoint, params=params) response.raise_for_status() return response.json() except Exception as e: return f"Error: {str(e)}"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/0xReisearch/crypto-mcp-beta'

If you have feedback or need assistance with the MCP directory API, please join our Discord server