Historical Token OHLCV
Beta — subject to breaking changes.
Historical counterpart of /tgm/token-ohlcv. Returns OHLCV candles over a window anchored to exactly one of as_of_date or as_of_ts.
Differences from /tgm/token-ohlcv:
Flat date contract:
date_from+as_of_date(nodate/date_rangewrapper).as_of_dateis the data-window upper bound.Hyperliquid requests may instead provide a timezone-aware
as_of_ts; only candles completed by that exact instant are returned. A candle whose interval ends exactly atas_of_tsis included.High-tf (
1d,1w) supportsapply_blacklist_filterto exclude blacklisted token prices fromvolume_usd.Low-tf (
5m,15m,30m,1h,4h) does not supportapply_blacklist_filter; passing it returns 400.4halways excludes its trailing partial bucket, for spot and Hyperliquid alike, with eitheras_of_dateoras_of_ts. Other low-tf timeframes may still include a partial trailing bucket withas_of_date.For
4h, a date-onlyas_of_date(e.g.2026-04-15) means through the end of that day, so the day's final completed bucket (20:00-24:00) is included. A datetime-valuedas_of_dateis an exact instant instead: e.g.2026-04-15T23:59:59Zexcludes that same bucket, because it has not closed yet at23:59:59.
Accepted timeframes: 5m, 15m, 30m, 1h, 4h, 1d, 1w. 1m and 1M are not supported.
Hyperliquid: chain="hyperliquid" is supported; pass the coin symbol (e.g. "BTC", "HYPE", "@1", "XYZ/USDC") in token_address. The apply_blacklist_filter flag is not accepted for Hyperliquid; market-cap fields are returned as null (HL perps have no market-cap concept). Candles from 2025-05-29 are built from fills and match the exchange's own candles; volume is base units and volume_usd is volume × close, as on /tgm/token-ohlcv. Both are null before 2025-05-29 (mark-price candles, no volume) and on the trailing partial bucket when as_of_date lands mid-bucket on a day or week timeframe. Weekly candles start Thursday 00:00 UTC, as on the exchange.
API key for authentication
Request model for the historical TGM token OHLCV endpoint.
Blockchain chain (ethereum, solana, base, bnb, hyperliquid).
ethereumPossible values: Token contract address. For chain='hyperliquid', pass the coin symbol instead (e.g. "BTC", "HYPE", "@1", "XYZ/USDC").
0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9Start of the data window, ISO 8601 (date or datetime).
2025-06-01T00:00:00ZSnapshot anchor; semantically equivalent to date_to. The data window is [date_from, as_of_date]. Date-only values are treated as end-of-day. Asymmetry: the blacklist anchor uses the date part only, while the data-window upper bound preserves the time component if supplied. So as_of_date='2025-06-07T15:30:00Z' clamps the data to 15:30 but evaluates the blacklist as of the full day 2025-06-07 (daily granularity).
2025-06-07T23:59:59ZExact UTC-normalized cutoff for Hyperliquid requests. Only candles that are complete at this timestamp are returned. Provide exactly one of as_of_date or as_of_ts.
2026-03-30T12:02:17.123456ZOHLCV interval. Accepted: 5m, 15m, 30m, 1h, 4h, 1d, 1w. 1m and 1M are not supported.
1dPossible values: High-tf-only (1d/1w). When True, prices for currently-flagged blacklisted tokens resolve to NULL in volume_usd (prod-equivalent). When False, historical prices are returned regardless of current blacklist status. Passing this with a low-tf timeframe returns 400 — low-tf has no blacklist plumbing (sources the unfiltered 5m feed).
trueHistorical TGM Token OHLCV data
Bad Request
Unauthorized
Payment Required
Forbidden
Not Found
Unprocessable Content
Too Many Requests
Internal Server Error
Bad Gateway
Service Unavailable
Gateway Timeout
POST /api/v1beta1/tgm/historical-token-ohlcv HTTP/1.1
Host: api.nansen.ai
apikey: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 240
{
"chain": "ethereum",
"token_address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
"date_from": "2025-06-01T00:00:00Z",
"as_of_date": "2025-06-07T23:59:59Z",
"as_of_ts": "2026-03-30T12:02:17.123456Z",
"timeframe": "1d",
"apply_blacklist_filter": true
}{
"chain": "ethereum",
"token_address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
"timeframe": "1h",
"data": [
{
"interval_start": "2025-01-15T12:00:00Z",
"open": 100.5,
"high": 105.25,
"low": 98.75,
"close": 103,
"volume": 1000000,
"volume_usd": 100000000,
"market_cap": {
"open": 1500000000,
"high": 1600000000,
"low": 1400000000,
"close": 1550000000
}
}
],
"truncated": false,
"truncation_note": "text"
}Last updated
Was this helpful?