get_stablecoin_charts_by_chain
Track historical market capitalization of stablecoins on a specific blockchain. Input the chain slug to analyze stablecoin trends and gain insights into crypto market dynamics.
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
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | ||
| stablecoin | No |
Implementation Reference
- defillama_server.py:180-194 (handler)The handler function for 'get_stablecoin_charts_by_chain' tool, decorated with @mcp.tool(). It constructs parameters and calls the DefiLlama API endpoint /stablecoins/stablecoincharts/{chain} via the make_request helper, returning the JSON response as 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)