GET/market/{chainId}/tokens/{tokenAddress}/priceHistory/
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/cowswap/market/{chainId}/tokens/{tokenAddress}/priceHistory/Cache cached 5s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeHistorical OHLC USD price candles for an ERC-20 token over a Unix-timestamp window and interval (e.g. 5m, 15m, 1h, 4h, 1d).
Try this endpoint
Reads the credential from API_HUB_KEY; it never appears in the URL.
curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/cowswap/market/1/tokens/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/priceHistory/?from=1795558190&to=1796162990&interval=1h"Parameters
| name | in | type | description | |
|---|---|---|---|---|
chainId | path | str | required | EVM numeric chain ID: 1 (Ethereum), 100 (Gnosis), 42161 (Arbitrum), 8453 (Base), 137 (Polygon), 43114 (Avalanche), 56 (BNB), 59144 (Linea), or 11155111 (Sepolia). Chain slugs are also accepted. example: 1 |
tokenAddress | path | str | required | ERC-20 token contract address. example: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 |
from | query | int | required | Window start Unix timestamp in seconds. example: 1795558190 |
to | query | int | required | Window end Unix timestamp in seconds. example: 1796162990 |
interval | query | str | required | Candle timeframe (e.g. 5m, 15m, 1h, 4h, 1d). default: 1hexample: 1h |
countback | query | int | optional | Optional maximum number of bars to return. |
Response
type: object
data key: bars
pagination: none
sample: {
"providerId": "int",
"bars": "array[169]"
}