{"uid":"cap_VhyWtEYxFu1n4-_zBcjpn","slug":"api-nansen-ai-344cd7e3","name":"Nansen Token OHLCV Data","description":"Retrieve token OHLCV candle data","url":"https://api.nansen.ai/api/v1/tgm/token-ohlcv","method":"GET","headers":{},"bodySchema":{"type":"object","title":"TokenOHLCVRequest","required":["chain","token_address","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)"},"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)"}},"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","avalanche","base","bitcoin","bitlayer","bnb","chiliz","ethereum","gravity","hyperevm","hyperliquid","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","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":{"type":"string","title":"Token Address","examples":["0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"],"description":"Token contract 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":{"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"},"high":{"anyOf":[{"type":"number"}],"title":"High","examples":[105.25],"description":"Highest price in the interval"},"open":{"anyOf":[{"type":"number"}],"title":"Open","examples":[100.5],"description":"Opening price"},"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"},"market_cap":{"type":"object","title":"MarketCapData","properties":{"low":{"anyOf":[{"type":"number"}],"title":"Low","examples":[1400000000],"description":"Lowest market cap in the candle"},"high":{"anyOf":[{"type":"number"}],"title":"High","examples":[1600000000],"description":"Highest market cap in the candle"},"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"},"token_address":{"type":"string","title":"Token Address","examples":["0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"],"description":"Token contract address"}},"description":"Response model for Token OHLCV endpoint.\n\nContains the requested OHLCV data with metadata about the request parameters."},"example":{"request":{"date":{"to":"2025-01-01T00:00:00Z","from":"2024-12-01T00:00:00Z"},"chain":"ethereum","timeframe":"1d","token_address":"0x6982508145454ce325ddbe47a25d4ec3d2311933"},"response":{"_truncated":true,"_originalSize":10030}},"exampleRequest":{"date":{"to":"2025-01-01T00:00:00Z","from":"2024-12-01T00:00:00Z"},"chain":"ethereum","timeframe":"1d","token_address":"0x6982508145454ce325ddbe47a25d4ec3d2311933"},"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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"},{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VZh19s3ixmAOqePLuWOL-","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null},{"uid":"pm_B7e4SU4EUedDxqM-WM0vU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Retrieve OHLCV (open, high, low, close, volume) price candlestick data for a specific token from Nansen's on-chain analytics platform","exampleAgentPrompt":"Pull the daily OHLCV candles for PEPE token (contract 0x6982508145454ce325ddbe47a25d4ec3d2311933 on Ethereum) from Nansen for the past 30 days so I can analyze its price trend.","exampleUseCases":[{"title":"Backtest DeFi token price strategy","prompt":"Grab 1-hour OHLCV candles for Uniswap (UNI, contract 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 on Ethereum) for the last 90 days from Nansen so I can backtest a moving average crossover strategy on it."},{"title":"Chart weekly crypto price trends","prompt":"Fetch weekly OHLCV candlestick data for AAVE (contract 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9 on Ethereum) from Nansen for the past 6 months — I want to build a price chart showing the long-term trend and volume patterns."},{"title":"Monitor intraday token volume spikes","prompt":"Pull 5-minute OHLCV candles for ARB token (contract 0x912CE59144191C1204E64559FE8253a0e49E6548 on Arbitrum) from Nansen for the past 24 hours so I can identify any unusual volume spikes or sharp price moves today."}],"resultDescription":"Returns time-series OHLCV candlestick data for the requested token, including open, high, low, close prices and trading volume for each time period, sourced from Nansen's on-chain data infrastructure.","failureModes":["Invalid or unrecognized token contract address returns 404 or empty result","Unsupported blockchain or network returns an error","Date range exceeds allowed historical depth","Missing required parameters such as token address or interval returns 400","Payment not provided or insufficient USDC balance blocks request","Rate limit exceeded returns 429"],"whenToPreferThis":"Use this endpoint when you need structured OHLCV price candlestick data for on-chain tokens, especially for DeFi or ERC-20 tokens tracked by Nansen's smart money analytics. Prefer this over generic price APIs when you need Nansen-sourced on-chain pricing that complements wallet labeling and smart money flow data. Best for quantitative analysis, charting, or backtesting token price movements.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:51:13.965Z","isFirstParty":false}