# Nansen Token OHLCV Data

> Nansen Token OHLCV Data is a paid API for AI agents from api.nansen.ai, paid per call via MPP or x402, $0.01/call, status unknown (last checked 2026-09-13).

Retrieve OHLCV (open, high, low, close, volume) price candlestick data for a specific token from Nansen's on-chain analytics platform

## Facts

- Endpoint: GET https://api.nansen.ai/api/v1/tgm/token-ohlcv
- Price: $0.01/call
- Payment: MPP, x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-nansen-ai-344cd7e3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VhyWtEYxFu1n4-_zBcjpn

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-nansen-ai-344cd7e3
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Retrieve token OHLCV candle data

## Output

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.

## Example request

```json
{
 "date": {
  "to": "2025-01-01T00:00:00Z",
  "from": "2024-12-01T00:00:00Z"
 },
 "chain": "ethereum",
 "timeframe": "1d",
 "token_address": "0x6982508145454ce325ddbe47a25d4ec3d2311933"
}
```

## Request schema (JSON Schema)

```json
{
 "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 D
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "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_us
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-nansen-ai-344cd7e3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.nansen.ai](https://www.zero.xyz/host/api.nansen.ai/llms.txt)
