> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobula.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Track Token OHLCV History Across Ethereum, Solana, BNB, Base & More

> Use the Token OHLCV History endpoint to retrieve OHLCV candlestick data for a token by contract address.

The [**Get Token OHLCV History**](https://docs.mobula.io/rest-api-reference/endpoint/token-ohlcv-history) endpoint lets you retrieve OHLCV candlestick data for a token by contract address.

This returns open, high, low, close, and volume values across a selected candle period, across chains like [Solana](https://docs.mobula.io/blockchains/solana), [Ethereum](https://docs.mobula.io/blockchains/ethereum), [BNB Chain](https://docs.mobula.io/blockchains/bsc), [Base](https://docs.mobula.io/blockchains/base), and more.

It also supports batch queries when you need OHLCV history for multiple tokens.

***

<div style={{ position: 'relative', paddingBottom: '56.25%', height: 0, overflow: 'hidden' }}>
  <iframe src="https://www.youtube.com/embed/yRXfq6Rd3bU" title="YouTube video player" style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', border: 0 }} allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen />
</div>

***

## What this endpoint does

With this API, you can:

* Retrieve OHLCV (Open, High, Low, Close, Volume) candlestick data for a token
* Use GET for a single token and POST batch queries for up to 10 tokens
* Choose candle resolution using the `period` parameter
* Set a time range using `from` and `to` timestamps in milliseconds
* Return USD prices (`usd=true` by default)

***

## What you’ll need

* Basic knowledge of REST APIs
* A token contract address
* A Mobula API key

Note: All Mobula endpoints require an API key.\
Get a free API key: [Here](https://admin.mobula.io/)

Optional:

* DexScreener (to quickly find token addresses)

***

## When to use Token OHLCV History

Use this endpoint when you want to:

* Build price charts using OHLCV candles for a token
* Backtest or analyze price action with consistent time-based candles
* Pull historical volume and price movement for dashboards
* Fetch OHLCV history for multiple tokens using batch queries

If you only need the current token snapshot (metadata + price + liquidity + volume), use: [**Get Token Details**](https://docs.mobula.io/rest-api-reference/endpoint/token-details)

If you need token price history without OHLCV candlesticks, use: [**Get Asset Price History**](https://docs.mobula.io/rest-api-reference/endpoint/asset-price-history)

***

## Walkthrough to Get Token OHLCV History

### 1. Prepare your query

The `token/ohlcv-history` endpoint requires:

| Parameter | Description                                              |
| --------- | -------------------------------------------------------- |
| `address` | Token contract address                                   |
| `chainId` | Chain identifier (example: `ethereum`, `base`, `solana`) |

Optional parameters you can use:

* `period`: Candle resolution. Examples include `1m`, `5m`, `1h`, `4h`, `1d`, `1w`. Default is `5m`.
* `from`: Start timestamp in milliseconds. Default is `0`.
* `to`: End timestamp in milliseconds. Default is current time.
* `amount`: Maximum number of candles to return.
* `usd`: Return USD prices. Default is `true`.
* `fill`: Forward-fill empty candles between trades so the series has no gaps. Default is `false`.

### 2. Find a token address to test

To retrieve real token data:

* Open DexScreener
* Pick a token
* Copy the token contract address from the token page

This address is used as the `address` parameter.

### 3. Fill the API form

Once your token address is ready:

* Paste the token contract into the `address` field
* Enter the chain in `chainId` (example: `solana`)
* (Optional) set `period` or add `from` / `to` timestamps
* Click **Send** to retrieve the OHLCV history

***

## Reviewing the response

Each item in the response represents a candlestick:

* `t`: Candle timestamp in milliseconds
* `o`: Opening price for the candle
* `h`: Highest price during the candle window
* `l`: Lowest price during the candle window
* `c`: Closing price for the candle
* `v`: Volume during the candle window

Batch query note:

For POST batch requests, the response returns one entry per requested token with an `ohlcv` array and includes `address` and `chainId` for each token.

If no pool is found, the entry can return an `error` field.

***

## Try It Live with Mobula Token OHLCV History Demo (UI)

[Demo UI Homepage](https://mobula-demo-endpoint-production.up.railway.app/)

[Token OHLCV History Demo UI](https://mobula-demo-endpoint-production.up.railway.app/token-ohlcv-history)

[Docs](https://docs.mobula.io/rest-api-reference/endpoint/token-ohlcv-history)

***

## Summary

The [**Get Token OHLCV History**](https://docs.mobula.io/rest-api-reference/endpoint/token-ohlcv-history) endpoint helps you:

* Retrieve OHLCV candlestick history using `address` and `chainId`
* Choose candle resolution with `period` and narrow time range with `from` and `to`
* Batch query up to 10 tokens with POST for dashboards and research tools
* Visualize OHLCV history instantly in the demo UI

***

## Try Mobula for Free

Try our free API today and start building in minutes.\
Get your free API key: [Here](https://admin.mobula.io/)
