POST/liquidity/pool/price-history

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

Fetch per-pool historical price time series (both token0/token1 directions) for v2, v3, or v4 pools.

Try this endpoint

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sX POST "https://openapihub.dev/run/uniswap/liquidity/pool/price-history" \
  -H "X-Hub-Key: $API_HUB_KEY" -H "Content-Type: application/json" \
  -d '{"pool": {"chainId": 1, "addressOrId": "0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640", "version": "POOL_PROTOCOL_V3"}, "duration": "HISTORY_DURATION_DAY"}'

Parameters

nameintypedescription
poolbodydictrequiredPool reference object: {chainId: int|str, addressOrId: str (20-byte address for v2/v3 or 32-byte 0x-prefixed poolId for v4), version: 'POOL_PROTOCOL_V2'|'POOL_PROTOCOL_V3'|'POOL_PROTOCOL_V4' (or 'v2'/'v3'/'v4')}.
example: {"chainId":1,"addressOrId":"0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640","version":"POOL_PROTOCOL_V3"}
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

Response

type: object
data key: points
pagination: none
sample: {
  "points": [
    {
      "timestamp": "str",
      "priceToken0InToken1": "float",
      "priceToken1InToken0": "float"
    }
  ]
}