POST/data/v2/token/ohlc

Claude ↗ChatGPT ↗
Auth X-Hub-Key from API_HUB_KEYExecute POST /run/uniswap/data/v2/token/ohlcCache executed live on every call — a read-only POST answer is never cachedCost free · weight 0 · standard rate classSource billing free

Fetch token OHLC candlestick bars (openUsd, highUsd, lowUsd, closeUsd) by duration preset or explicit resolution/time range.

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/ohlc" \
  -H "X-Hub-Key: $API_HUB_KEY" -H "Content-Type: application/json" \
  -d '{"singleChain": {"chainId": 1, "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}, "duration": "HISTORY_DURATION_DAY", "resolution": "OHLC_RESOLUTION_ONE_HOUR", "startTime": "2026-11-28T00:00:00Z", "endTime": "2026-12-01T00:00:00Z"}'

Parameters

nameintypedescription
singleChainbodydictrequiredSingle-chain token selector {chainId: int|str, address: str} (alternative to multichain).
example: {"chainId":1,"address":"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}
durationbodystr
HISTORY_DURATION_HOUR | HISTORY_DURATION_DAY | HISTORY_DURATION_WEEK | HISTORY_DURATION_MONTH | HISTORY_DURATION_YEAR | HISTORY_DURATION_MAX
requiredLookback duration window (accepts HISTORY_DURATION_* or shorthands '1h', '1d', '1w', '1m', '1y', 'max').
default: HISTORY_DURATION_DAY
example: HISTORY_DURATION_DAY
resolutionbodystroptionalOptional explicit candle interval (requires RFC 3339 startTime): OHLC_RESOLUTION_ONE_MINUTE|FIVE_MINUTE|ONE_HOUR|FOUR_HOUR|ONE_DAY.
example: OHLC_RESOLUTION_ONE_HOUR
startTimebodystroptionalOptional RFC 3339 UTC start timestamp when using explicit resolution.
example: 2026-11-28T00:00:00Z
endTimebodystroptionalOptional RFC 3339 UTC end timestamp when using explicit resolution.
example: 2026-12-01T00:00:00Z

Response

type: object
data key: candles
pagination: none
sample: {
  "candles": [
    {
      "timestamp": "str",
      "openUsd": "float",
      "highUsd": "float",
      "lowUsd": "float",
      "closeUsd": "float"
    }
  ]
}