POST/data/v2/token/price-history
Auth X-Hub-Key from API_HUB_KEYExecute
POST /run/uniswap/data/v2/token/price-historyCache executed live on every call — a read-only POST answer is never cachedCost free · weight 0 · standard rate classSource billing freeFetch historical USD price points for a token over a duration window.
Try this endpoint
Reads the credential from API_HUB_KEY; it never appears in the URL.
curl -sX POST "https://openapihub.dev/run/uniswap/data/v2/token/price-history" \
-H "X-Hub-Key: $API_HUB_KEY" -H "Content-Type: application/json" \
-d '{"singleChain": {"chainId": 1, "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}, "duration": "HISTORY_DURATION_DAY"}'Parameters
| name | in | type | description | |
|---|---|---|---|---|
singleChain | body | dict | required | Single-chain token selector {chainId: int|str, address: str}. example: {"chainId":1,"address":"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"} |
duration | body | strHISTORY_DURATION_HOUR | HISTORY_DURATION_DAY | HISTORY_DURATION_WEEK | HISTORY_DURATION_MONTH | HISTORY_DURATION_YEAR | HISTORY_DURATION_MAX | required | Lookback duration window (accepts HISTORY_DURATION_* or shorthands '1h', '1d', '1w', '1m', '1y', 'max'). default: HISTORY_DURATION_DAYexample: HISTORY_DURATION_DAY |
Response
type: object
data key: points
pagination: none
sample: {
"points": [
{
"timestamp": "str",
"priceUsd": "float"
}
]
}