Skip to main content
Glama

Token price history

getTokenPriceHistory
Read-only

Fetch 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesChain, from listChains aapiChains
limitNoMax quotes (default 100)
intervalNoInterval between quotes, in seconds
toTimestampNoEnd UNIX timestamp (seconds)
fromTimestampNoStart UNIX timestamp (seconds)
contractAddressYesERC-20 token contract address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only carry readOnlyHint and openWorldHint, and the description goes well beyond them: it discloses the response shape, the `limit_applied` echo, the `possibly_truncated` flag, and the crucial limitation that there is no continuation token so a clipped series is indistinguishable from a complete one. That is exactly the kind of hidden-behavior disclosure an agent needs before trusting a result set.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose and return shape, then the truncation caveat, which is the right order of priority. It is a touch dense and the "no continuation token / no cursor to page with" sentences restate the same point twice, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description correctly compensates by naming the returned fields ({ timestamp, usd, block }) plus the two response-level flags. For a 6-param read tool with only two required inputs, an agent has everything needed to call it and to interpret an ambiguous result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema's terse "Max quotes (default 100)": it explains that `limit_applied` reports the cap actually used and ties `limit`, `count`, and `possibly_truncated` together into a truncation semantic. Only `interval`'s interaction with the returned series is left unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource+scope: "Historical USD price series for a token contract on a chain", and even names the underlying data source (Ankr Advanced API indexer). The word "historical" cleanly separates it from the sibling getTokenPrice (current price) and getTokenHolders without requiring the agent to open either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It does not explicitly say when to pick this over getTokenPrice or listChains, so the sibling routing is left to inference from the purpose line. It does give operational usage guidance — treat a capped series as incomplete and either raise `limit` or walk `fromTimestamp`/`toTimestamp` — which is useful but not the when/when-not framing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.