Token price history
getTokenPriceHistoryFetch historical USD price quotes for an ERC-20 token on a chosen EVM chain, with timestamps and block numbers, to build charts or analyze past value.
Instructions
Historical USD price series for a token contract on a chain, via the Ankr Advanced API indexer: a list of { timestamp, usd, block } quotes.
limit_applied reports the cap the call was actually made with (default 100, max 1000). When count reaches that cap the response sets possibly_truncated: true: this endpoint returns NO continuation token, so a clipped series and a series that simply ends are indistinguishable, and there is no cursor to page with. Treat such a series as incomplete-of-unknown-length rather than the full history; raise limit or walk fromTimestamp/toTimestamp yourself.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chain": "<chain>",
"contractAddress": "<contractAddress>"
},
"name": "getTokenPriceHistory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | Chain, from listChains aapiChains | |
| limit | No | Max quotes (default 100) | |
| interval | No | Interval between quotes, in seconds | |
| toTimestamp | No | End UNIX timestamp (seconds) | |
| fromTimestamp | No | Start UNIX timestamp (seconds) | |
| contractAddress | Yes | ERC-20 token contract address |