Tokens API
A token's risk-score history over time
The history behind token-score: the same source's risk reading sampled over a trailing window (1d/7d hourly, 30d daily) instead of read once. ETH, BNB and BASE only.
/api/external/token-analysis/token-score-history/{chain}/{mint}What it returns
The history behind token-score: the same source's composite risk reading, sampled over a trailing window instead of read once. Every point uses the same rugScore convention as token-score (0-100, HIGHER = MORE RISK) and the same direction (inverted from a source whose own scale runs higher = safer). The bucket width is NOT constant across timeframe: 1d and 7d typically sample HOURLY (24 and 168 points respectively), while 30d typically samples DAILY (31 points) rather than hourly — a caller expecting 720 hourly points at 30d can get 31 daily ones. granularityHours states the spacing actually observed IN THIS RESPONSE, computed from its own points rather than assumed from timeframe alone, so a consumer never has to hardcode that mapping or trust a number that could disagree with the data beside it. Points are chronological, oldest first.
Chains
- BNB Chain BNB
- Ethereum ETH
- Base BASE
Request
Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.
curl -H "x-dex-data-key: $DEXDATA_API_KEY" \ "https://api.dexdata.io/api/external/token-analysis/token-score-history/BNB/<mint>"
| Parameter | Description |
|---|---|
timeframequery · string · optional | How far back to read. Defaults to 1d (24 hourly points). 7d is also hourly (168 points); 30d switches to DAILY points (31), not hourly — see this endpoint's own description for why that matters before charting it.1d7d30d |
chainpath · string · required | ETH, BNB and BASE only; every other chain returns 400. |
mintpath · string · required | The token mint address (Solana) or contract address (EVM). |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
timeframe | string | The timeframe this response actually covers — echoes the request (or its default). |
granularityHours | number | Hours between consecutive points, computed from THIS response's own points — a fact about the data returned here, not a value looked up from timeframe. Typically 1 for 1d/7d and 24 for 30d, but read this field rather than assuming either: it describes exactly what this response contains, on this call, and can differ from the usual value without warning. |
points | object[] | Chronological, oldest first. Empty when the source had nothing for this window — never null. |
points[].at | number | |
points[].rugScore | number | null | 0-100, HIGHER = MORE RISK, same convention as token-score. null only when this point had no reading — never confuse it with a real, maximally-risky 100. |
Start building with DexData today
Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.
Get a free API key