get_stablecoin_charts_all
Retrieve historical market capitalization data for stablecoins to analyze trends and performance over time.
Instructions
GET /stablecoins/stablecoincharts/all
Get historical mcap sum of all stablecoins.
Parameters:
stablecoin: stablecoin ID (optional)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_stablecoin_charts_all"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stablecoin | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- defillama_server.py:165-178 (handler)The main handler function for the 'get_stablecoin_charts_all' tool, decorated with @mcp.tool() for registration in FastMCP. It makes an API request to DefiLlama's stablecoin charts endpoint for all stablecoins, optionally filtered by stablecoin ID, and returns the JSON response as a string.
@mcp.tool() async def get_stablecoin_charts_all(stablecoin: Optional[int] = None) -> str: """GET /stablecoins/stablecoincharts/all Get historical mcap sum of all stablecoins. Parameters: stablecoin: stablecoin ID (optional) """ params = {} if stablecoin is not None: params['stablecoin'] = stablecoin result = await make_request('GET', '/stablecoins/stablecoincharts/all', params) return str(result)