Merkl Developer Portal logo
get

/v4/tokens/prices/history

Get historical price snapshots for a token, newest first. Resolve by symbol (optionally scoped to a chainId) or by exact chainId+address. Snapshots are stored on change, so pass fill=carry-forward for one row per day of the range.

Query parameters

symbolstring

Token symbol (case-insensitive). Matches symbol or displaySymbol.

addressstring

Token address. Requires chainId for a unique result.

chainIdnumber | string

Chain ID. Required alongside address for a unique result; optional when using symbol.

fromstring (integer) | integer

Start day as Unix day integer (days since 1970-01-01 UTC). Defaults to today - 365 days.

tostring (integer) | integer

End day as Unix day integer (days since 1970-01-01 UTC). Defaults to today UTC.

fill"carry-forward"

Emit one row per day of the range, each carrying the newest price at or before it (anchored on the last row before from). Snapshots are stored on change only, so an absent day means 'unchanged' — use this to average or plot a range without re-deriving that. Days before the token's first snapshot stay absent.

Responses

200
Response for status 200
Schema
object[]
daystring (integer) | integerUnix day (days since 1970-01-01 UTC)
opennumber
closenumber
minnumber
maxnumber
avgnumber | null
samplesstring (integer) | integerNumber of samples folded into the day
sourcestring | null
Example
[
  {
    "day": 0,
    "open": 0,
    "close": 0,
    "min": 0,
    "max": 0,
    "avg": 0,
    "samples": 0,
    "source": "string"
  }
]