{"uid":"cap_7EDW-q-mwrqfycGDP12ar","slug":"nansen-token-ohlcv-26f49142","name":"Nansen Token OHLCV","description":"Get unified OHLCV (Open, High, Low, Close, Volume) data for tokens across supported chains.\n\n**Low timeframes** (sub-hourly + 4h): `1m`, `5m`, `15m`, `30m`, `1h`, `4h`\n**High timeframes** (multi-day): `1d`, `1w`, `1M`\n\nReturns OHLCV candle data including:\n- **Price data**: open, high, low, close prices\n- **Volume data**: trading volume in token units and USD\n- **Market cap data**: market capitalization at each time point\n\nDate range defaults to the last 30 days if not specified.\n\n**Sub-daily resolution notes** (`1m`, `5m`, `15m`, `30m`, `1h`, `4h`)\n\n- **Open price**: Derived from the previous completed candle's close (carry-forward).\n  The first candle can have `open: null` when no earlier close is available.\n  Hyperliquid uses exchange-provided candles.\n- **High and low**: The `low`–`high` range always includes the open and close.\n  Because the open is the previous candle's close, a candle that follows a gap\n  includes the price from before the gap, which can be many minutes or hours\n  earlier for low-liquidity tokens. From `5m` upward, prices come from\n  five-minute samples, so the range can miss moves that reverse inside a\n  five-minute interval. `1m` highs and lows come from trades in that minute plus\n  the open.\n- **Gaps**: At `1m`, only minutes with at least one qualifying on-chain trade emit\n  a candle. At `5m` and above, intervals with no price sample are also omitted for\n  low-liquidity tokens. The candle array may be sparse. This is expected behavior\n  and is independent of the `truncated` flag, which reports only the\n  50,000-candle server cap.\n- **Token-unit volume** (`1m` only): The `volume` field is null at `1m` resolution.\n  Use `volume_usd` for volume data at this timeframe.\n- **Time range boundary** (`1m` only): The `to` parameter is exclusive — the candle\n  starting at exactly `to` is not included (`[from, to)` semantics). All other\n  timeframes (`5m` and above) use an inclusive upper bound (`[from, to]`).","url":"https://api.nansen.ai/api/v1/tgm/token-ohlcv?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","title":"TokenOHLCVRequest","required":["chain","timeframe"],"properties":{"date":{"anyOf":[{"type":"object","title":"DateRange","properties":{"to":{"anyOf":[{"type":"string"}],"title":"To","examples":["2025-01-31T23:59:59Z"],"description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31). A time with an offset is converted to UTC; a time without one is read as UTC."},"from":{"anyOf":[{"type":"string"}],"title":"From","examples":["2025-01-01T00:00:00Z"],"description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01). A time with an offset is converted to UTC; a time without one is read as UTC."}},"description":"Date range model matching the API schema."}],"description":"Date range for the data (defaults to last 30 days if not specified)"},"chain":{"enum":["algorand","aptos","arbitrum","arc","avalanche","base","bitcoin","bitlayer","bnb","chiliz","ethereum","gravity","hyperevm","hyperliquid","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","robinhood","sei","solana","sonic","stacks","starknet","stellar","sui","ton","tron","viction"],"type":"string","title":"TGMOHLCVChain","description":"Chains supported for TGM OHLCV endpoint (includes Bitcoin)."},"timeframe":{"enum":["1m","5m","15m","30m","1h","4h","1d","1w","1M"],"type":"string","title":"ResolutionEnum","description":"Supported OHLCV resolution values."},"date_range":{"anyOf":[{"type":"object","title":"TokenOHLCVDateRange","required":["start","end"],"properties":{"end":{"type":"string","title":"End","examples":["2025-02-01T00:00:00Z"],"description":"End date and time (ISO format)"},"start":{"type":"string","title":"Start","examples":["2025-01-01T00:00:00Z"],"description":"Start date and time (ISO format)"}},"description":"DEPRECATED: Use 'date' field with standard DateRange instead."}],"deprecated":true,"description":"DEPRECATED: Use 'date' instead. Date range with start/end fields."},"token_address":{"anyOf":[{"type":"string"}],"title":"Token Address","examples":["0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"],"description":"Token contract address"},"token_addresses":{"anyOf":[{"type":"array","items":{"type":"string"}}],"title":"Token Addresses","examples":[["0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9","0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"]],"description":"Array of token contract addresses for batch queries (max 10, or max 5 for Hyperliquid, mutually exclusive with token_address)"}},"description":"Request model for Token OHLCV endpoint.\n\nThis endpoint provides unified OHLCV (Open, High, Low, Close, Volume) data\nfor tokens across supported chains with different time resolutions.","additionalProperties":false},"responseSchema":{"anyOf":[{"type":"object","title":"TokenOHLCVResponse","required":["chain","token_address","timeframe","data"],"properties":{"data":{"type":"array","items":{"type":"object","title":"OHLCVCandle","required":["interval_start","market_cap"],"properties":{"low":{"anyOf":[{"type":"number"}],"title":"Low","examples":[98.75],"description":"Lowest price in the interval, never above the open or close"},"high":{"anyOf":[{"type":"number"}],"title":"High","examples":[105.25],"description":"Highest price in the interval, never below the open or close"},"open":{"anyOf":[{"type":"number"}],"title":"Open","examples":[100.5],"description":"Opening price. For sub-daily timeframes (`1m`, `5m`, `15m`, `30m`, `1h`, `4h`) this is the previous completed candle's close (carry-forward); Hyperliquid uses the exchange-provided open. Null on the first candle of a response when no earlier close is available, for example at inception or for a low-liquidity token with no candle just before the requested start; that candle's high and low then cover only its own prices."},"close":{"anyOf":[{"type":"number"}],"title":"Close","examples":[103],"description":"Closing price"},"volume":{"anyOf":[{"type":"number"}],"title":"Volume","examples":[1000000],"description":"Trading volume in token units. Null for `1m` resolution — token-unit volume is not available at that resolution; use `volume_usd` instead."},"market_cap":{"type":"object","title":"MarketCapData","properties":{"low":{"anyOf":[{"type":"number"}],"title":"Low","examples":[1400000000],"description":"Lowest market cap in the candle, never above the open or close"},"high":{"anyOf":[{"type":"number"}],"title":"High","examples":[1600000000],"description":"Highest market cap in the candle, never below the open or close"},"open":{"anyOf":[{"type":"number"}],"title":"Open","examples":[1500000000],"description":"Market cap at candle open"},"close":{"anyOf":[{"type":"number"}],"title":"Close","examples":[1550000000],"description":"Market cap at candle close"}},"description":"Market capitalization data for OHLCV candles."},"volume_usd":{"anyOf":[{"type":"number"}],"title":"Volume Usd","examples":[100000000],"description":"Trading volume in USD"},"interval_start":{"type":"string","title":"Interval Start","examples":["2025-01-15T12:00:00Z"],"description":"Start time of the candle interval (ISO datetime string)"}},"description":"Individual OHLCV candle data point."},"title":"Data","description":"OHLCV candle data points, ordered by interval_start"},"chain":{"type":"string","title":"Chain","examples":["ethereum"],"description":"Blockchain chain"},"timeframe":{"type":"string","title":"Timeframe","examples":["1h"],"description":"Time resolution used"},"truncated":{"type":"boolean","title":"Truncated","default":false,"description":"True if the result reached the candle cap and some candles were omitted. On most chains the cap is 50,000 candles for this token and the omitted candles are the most recent ones, since results are ordered by interval_start ascending. Hyperliquid tokens are served from Hyperliquid's own feed, which applies a smaller per-response cap of roughly 5,000 candles and omits the oldest candles instead, so the returned data starts later than requested. Narrow the date range for complete coverage."},"token_address":{"type":"string","title":"Token Address","examples":["0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"],"description":"Token contract address"},"truncation_note":{"anyOf":[{"type":"string"}],"title":"Truncation Note","description":"Human-readable detail when 'truncated' is true, naming the cap that was reached and which end of the requested range was omitted."}},"description":"Response model for Token OHLCV endpoint (single token).\n\nContains the requested OHLCV data with metadata about the request parameters."},{"type":"object","title":"TokenOHLCVBatchResponse","required":["chain","timeframe","tokens"],"properties":{"chain":{"type":"string","title":"Chain","examples":["ethereum"],"description":"Blockchain chain"},"tokens":{"type":"array","items":{"type":"object","title":"TokenOHLCVTokenData","required":["token_address","data"],"properties":{"data":{"type":"array","items":{"type":"object","title":"OHLCVCandle","required":["interval_start","market_cap"],"properties":{"low":{"anyOf":[{"type":"number"}],"title":"Low","examples":[98.75],"description":"Lowest price in the interval, never above the open or close"},"high":{"anyOf":[{"type":"number"}],"title":"High","examples":[105.25],"description":"Highest price in the interval, never below the open or close"},"open":{"anyOf":[{"type":"number"}],"title":"Open","examples":[100.5],"description":"Opening price. For sub-daily timeframes (`1m`, `5m`, `15m`, `30m`, `1h`, `4h`) this is the previous completed candle's close (carry-forward); Hyperliquid uses the exchange-provided open. Null on the first candle of a response when no earlier close is available, for example at inception or for a low-liquidity token with no candle just before the requested start; that candle's high and low then cover only its own prices."},"close":{"anyOf":[{"type":"number"}],"title":"Close","examples":[103],"description":"Closing price"},"volume":{"anyOf":[{"type":"number"}],"title":"Volume","examples":[1000000],"description":"Trading volume in token units. Null for `1m` resolution — token-unit volume is not available at that resolution; use `volume_usd` instead."},"market_cap":{"$ref":"#/components/schemas/MarketCapData","description":"Market capitalization data for the candle"},"volume_usd":{"anyOf":[{"type":"number"}],"title":"Volume Usd","examples":[100000000],"description":"Trading volume in USD"},"interval_start":{"type":"string","title":"Interval Start","examples":["2025-01-15T12:00:00Z"],"description":"Start time of the candle interval (ISO datetime string)"}},"description":"Individual OHLCV candle data point."},"title":"Data","description":"OHLCV candle data points, ordered by interval_start"},"token_address":{"type":"string","title":"Token Address","examples":["0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"],"description":"Token contract address"}},"description":"OHLCV data for a single token within a batch response."},"title":"Tokens","description":"OHLCV data per token, ordered by token address. Only tokens with available data are included. A requested token with no data is omitted from this array, not returned with an empty data list. Compare the length of this array against the number of token addresses in your request to detect omitted tokens."},"timeframe":{"type":"string","title":"Timeframe","examples":["1h"],"description":"Time resolution used"},"truncated":{"type":"boolean","title":"Truncated","default":false,"description":"True if the result reached the candle cap and some candles were omitted. On most chains the cap is 50,000 candles shared across all requested tokens: candles are collected in interval_start ascending, then token_address ascending order, so the most recent candles across all tokens are omitted first and a single token with dense data may consume a disproportionate share of the cap. Hyperliquid tokens are served from Hyperliquid's own feed, which caps each token separately at roughly 5,000 candles and omits that token's oldest candles instead; the flag is true when at least one token was cut short. To ensure complete coverage, narrow the date range or query tokens individually."},"truncation_note":{"anyOf":[{"type":"string"}],"title":"Truncation Note","description":"Human-readable detail when 'truncated' is true, naming the cap that was reached and which end of the requested range was omitted."}},"description":"Response model for batch Token OHLCV requests (multiple tokens).\n\nContains OHLCV data grouped by token address."}],"title":"Response Get Token Ohlcv Api V1 Tgm Token Ohlcv Post"},"example":null,"exampleRequest":null,"tags":["blockchain","smart-money","wallet","tokens","defi","analytics","profiler","dex","pnl","onchain","prediction-market","data"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_A-ToaH64TX2NJ7PNlCY0N","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"Nansen","brandSlug":"nansen","brandBaseUrl":"https://nansen.ai","brandDocsUrl":"https://docs.nansen.ai","whatItDoes":"Returns unified OHLCV candlestick data (open, high, low, close, volume, market cap) for any token across 35+ supported blockchains at multiple timeframes.","exampleAgentPrompt":"Pull me the daily OHLCV candles for the AAVE token (0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9) on Ethereum from January 1 2025 to January 31 2025 — I want the open, high, low, close, volume, and market cap for each day.","exampleUseCases":null,"resultDescription":"An array of OHLCV candle objects, each containing: interval_start timestamp, open/high/low/close prices, trading volume in token units and USD, and market cap OHLC values. Results are ordered by interval_start and cover the requested date range at the specified timeframe resolution.","failureModes":["Missing required fields (chain, token_address, timeframe) returns 422 validation error","Unsupported chain value returns 422 with enum validation error","Invalid token address format may return empty data or 404","Date range too large for low timeframes may return timeout or truncated results","Token not found on specified chain returns empty data array","Invalid timeframe string returns 422 enum validation error"],"whenToPreferThis":"Use this endpoint when you need historical price candlestick data for a specific token on a supported blockchain. It is the unified replacement for legacy TGM price endpoints and supports both sub-hourly (1m–1h) and multi-hour (4h–1M) timeframes. Prefer this over generic market data APIs when you need on-chain analytics context (market cap history, volume in token units) alongside price data, or when working with DeFi tokens on chains like Solana, Base, Arbitrum, or Avalanche that may not be covered by centralized exchange APIs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-03T06:39:23.902Z","isFirstParty":false,"canonicalSlug":"nansen-token-ohlcv-26f49142"}