getTokenChart
Retrieve historical price chart data for tokens from DeFi Llama using token identifiers and customizable time intervals. Analyze price trends with options for data points and search width.
Instructions
Gets historical price chart data for one or more tokens from DeFi Llama
Input Schema
Name | Required | Description | Default |
---|---|---|---|
options | No | Optional configuration for the chart data | |
period | No | Time interval between data points. Format: 1h, 4h, 1d, 1w (defaults to "1d") | 1d |
startTime | No | ISO timestamp for the start time (e.g., "2025-01-01T00:00:00Z") | |
tokens | Yes | Token identifier in format "chain:address" (e.g., "ethereum:0x...", "coingecko:ethereum") or array of such identifiers |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"options": {
"additionalProperties": false,
"description": "Optional configuration for the chart data",
"properties": {
"searchWidth": {
"description": "Time range on either side to find price data (e.g., \"600\" for 10 minutes)",
"type": "string"
},
"span": {
"default": 10,
"description": "Number of data points to return. Defaults to 10. To create a chart you need many data points.",
"type": "number"
}
},
"type": "object"
},
"period": {
"default": "1d",
"description": "Time interval between data points. Format: 1h, 4h, 1d, 1w (defaults to \"1d\")",
"type": "string"
},
"startTime": {
"description": "ISO timestamp for the start time (e.g., \"2025-01-01T00:00:00Z\")",
"type": "string"
},
"tokens": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
],
"description": "Token identifier in format \"chain:address\" (e.g., \"ethereum:0x...\", \"coingecko:ethereum\") or array of such identifiers"
}
},
"required": [
"tokens"
],
"type": "object"
}