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
periodparameter - Set a time range using
fromandtotimestamps in milliseconds - Return USD prices (
usd=trueby default)
What you’ll need
- Basic knowledge of REST APIs
- A token contract address
- A Mobula API key
Get a free API key: Here 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
Walkthrough to Get Token OHLCV History
1. Prepare your query
Thetoken/ohlcv-history endpoint requires:
| Parameter | Description |
|---|---|
address | Token contract address |
chainId | Chain identifier (example: ethereum, base, solana) |
period: Candle resolution. Examples include1m,5m,1h,4h,1d,1w. Default is5m.from: Start timestamp in milliseconds. Default is0.to: End timestamp in milliseconds. Default is current time.amount: Maximum number of candles to return.usd: Return USD prices. Default istrue.
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
address parameter.
3. Fill the API form
Once your token address is ready:- Paste the token contract into the
addressfield - Enter the chain in
chainId(example:solana) - (Optional) set
periodor addfrom/totimestamps - Click Send to retrieve the OHLCV history
Reviewing the response
Each item in the response represents a candlestick:t: Candle timestamp in millisecondso: Opening price for the candleh: Highest price during the candle windowl: Lowest price during the candle windowc: Closing price for the candlev: Volume during the candle window
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 Token OHLCV History Demo UI DocsSummary
The Get Token OHLCV History endpoint helps you:- Retrieve OHLCV candlestick history using
addressandchainId - Choose candle resolution with
periodand narrow time range withfromandto - 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