Skip to main content
GET
/
2
/
token
/
ohlcv-history
Get token OHLCV history
curl --request GET \
  --url https://demo-api.mobula.io/api/2/token/ohlcv-history
{
  "data": [
    {
      "t": 123,
      "o": 123,
      "h": 123,
      "l": 123,
      "c": 123,
      "v": 123
    }
  ]
}
Timestamps are in MS (JavaScript timestamps).

Overview

This endpoint retrieves OHLCV candlestick data for a token by its contract address. It automatically resolves the largest pool for the token and includes pre-bonding curve data when available. Use GET for a single token or POST for batch requests (up to 10 tokens). For direct pool/market queries by pool address, use Market OHLCV History instead.

GET Request (Single Token)

Query Parameters

ParameterTypeRequiredDescription
addressstringYesToken contract address
chainIdstringYesChain identifier (e.g., "ethereum", "base", "solana")
periodstringNoCandle resolution: 5m, 15m, 1h, 4h, 1d, 1w. Default: 5m
fromnumberNoStart timestamp (ms). Default: 0
tonumberNoEnd timestamp (ms). Default: current time
amountnumberNoMaximum number of candles to return
usdbooleanNoReturn USD prices. Default: true

Usage Example

curl -X GET "https://api.mobula.io/api/2/token/ohlcv-history?address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&chainId=ethereum&period=1h"

POST Request (Batch)

Request Body

Send an array of token queries directly (minimum 1, maximum 10 per request). Each item uses the same parameters as the GET request.

Example

curl -X POST "https://api.mobula.io/api/2/token/ohlcv-history" \
  -H "Content-Type: application/json" \
  -d '[
    { "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "chainId": "ethereum", "period": "1h" },
    { "address": "0x6982508145454ce325ddbe47a25d4ec3d2311933", "chainId": "ethereum", "period": "1h" }
  ]'

Response Format

Response fields use abbreviated naming for optimal payload size:
FieldTypeDescription
tnumberCandle timestamp (ms)
onumberOpening price
hnumberHighest price during the period
lnumberLowest price during the period
cnumberClosing price
vnumberVolume during the period

GET Response Example

{
  "data": [
    {
      "t": 1754337900000,
      "o": 3245.67,
      "h": 3250.12,
      "l": 3240.00,
      "c": 3248.50,
      "v": 125000.50
    },
    {
      "t": 1754341500000,
      "o": 3248.50,
      "h": 3255.00,
      "l": 3245.00,
      "c": 3252.30,
      "v": 98500.25
    }
  ]
}

POST Response Example

{
  "data": [
    {
      "ohlcv": [
        {
          "t": 1754337900000,
          "o": 3245.67,
          "h": 3250.12,
          "l": 3240.00,
          "c": 3248.50,
          "v": 125000.50
        }
      ],
      "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "chainId": "evm:1"
    },
    {
      "ohlcv": [],
      "address": "0x0000000000000000000000000000000000000000",
      "chainId": "evm:1",
      "error": "No pool found for this token"
    }
  ]
}

Period Options

  • 5m - 5 minutes
  • 15m - 15 minutes
  • 1h - 1 hour
  • 4h - 4 hours
  • 1d - 1 day
  • 1w - 1 week

Features

  • Pre-bonding data: Automatically includes bonding curve data for tokens that graduated from bonding curves (e.g., pump.fun tokens)
  • Auto pool resolution: Automatically finds the largest liquidity pool for the token

Notes

  • Maximum 10 tokens per POST request
  • Rate limit: 5 credits (GET), 10 credits (POST)
  • This endpoint uses mode: token internally to include pre-bonding curve history when available

Query Parameters

address
string
required

Token contract address

chainId
string
required

Chain identifier (e.g., 'ethereum', 'base', 'solana')

period
string

Candle resolution: 5m, 15m, 1h, 4h, 1d, 1w. Default: 5m

from
number
default:0

Start timestamp (ms)

to
number

End timestamp (ms). Default: current time

amount
number

Maximum number of candles to return

usd
boolean
default:true

Return USD prices. Default: true

Response

200 - application/json

OHLCV history response

data
object[]
required