Get market OHLCV history
History - Prices & OHLCV Candles
Get Market OHLCV History
Retrieve OHLCV (Open, High, Low, Close, Volume) candlestick data for one or multiple pools/markets.
GET
Get market OHLCV history
Overview
This endpoint retrieves OHLCV candlestick data for a specific pool/market by its address. Use this when you know the pool address directly. Use GET for a single pool or POST for batch requests (up to 10 pools). For asset-based queries (by name, symbol, or token address), use Token OHLCV History instead.GET Request (Single Market)
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
address | string | Yes | Pool/market contract address |
chainId | string | Yes | Chain identifier (e.g., "ethereum", "base", "solana") |
period | string | No | Candle resolution: 1s, 5s, 15s, 30s, 1m, 5m, 15m, 30m, 1h, 4h, 6h, 12h, 1d, 1w. Default: 5m |
from | number | No | Start timestamp (ms). Default: 0 |
to | number | No | End timestamp (ms). Default: current time |
amount | number | No | Maximum number of candles to return (max: 2000) |
usd | boolean | No | Return USD prices. Default: true |
fill | boolean | No | Forward-fill empty candles between trades so the series has no gaps (each filled candle carries the previous close, volume 0). Makes the candle count a function of span and period, independent of trade activity. Default: false |
Step-by-Step Tutorial and Video Walkthrough
- Check out the guide: Here
Usage Example
POST Request (Batch)
Request Body
Send an array of market queries directly (minimum 1, maximum 10 per request). Each item uses the same parameters as the GET request.Example
Response Format
Response fields use abbreviated naming for optimal payload size:| Field | Type | Description |
|---|---|---|
t | number | Candle timestamp (ms) |
o | number | Opening price |
h | number | Highest price during the period |
l | number | Lowest price during the period |
c | number | Closing price |
v | number | Volume during the period |
GET Response Example
POST Response Example
Period Options
1s- 1 second5s- 5 seconds15s- 15 seconds30s- 30 seconds1m- 1 minute5m- 5 minutes15m- 15 minutes30m- 30 minutes1h- 1 hour4h- 4 hours6h- 6 hours1d- 1 day1w- 1 week
FAQ
Is `period` compatible with TradingView’s ResolutionString?
Is `period` compatible with TradingView’s ResolutionString?
Mobula’s
TradingView uses
Aliases such as
period is not the same format as TradingView’s ResolutionString. Treat them as different contracts and map values in your datafeed before calling Mobula.Often maps cleanly (Mobula normalizes case):- Seconds: TV
1S,5S, … → Mobula1s,5s, … - Minute numerals:
1,5,15,30→1m,5m,15m,30m - Hour-style minute counts:
60→1h;240→4h;360→6h;720→12h - Days / weeks:
1D→1d,1W→1w
1M (one month):TradingView uses
1M for one month. Mobula lowercases the string, so 1M becomes 1m, which means one minute, not one month. Never forward TV’s monthly resolution unchanged.Not a direct match:- Tick bars (
1T,5T, …) — Mobula serves time-based OHLCV candles, not tick aggregation. - Unrecognized strings — fall back to a default period (commonly
1hfor unknown non-empty values, or5mwhenperiodis omitted on this endpoint).
1s, 5s, 15s, 30s, 1m, 5m, 15m, 30m, 1h, 4h, 6h, 12h, 1d, 1w.Aliases such as
5min or 60 → 1h are accepted by the API layer. Do not use 1month / TV-style monthly here: they normalize to 1M, which this OHLCV history service does not support.Recommendation: Add an explicit tradingViewResolutionToMobulaPeriod(resolution) (or equivalent) in your integration instead of passing TV resolutions straight through.Notes
- Maximum 2000 candles per request. If no
amountis specified and a date range is provided, the default cap is 2000. Without a date range, the default is 300 candles. - Maximum 10 markets per POST request
- Rate limit: 5 credits (GET), 10 credits (POST)
- This endpoint uses real-time swap data combined with pre-aggregated OHLCV data for optimal performance
Query Parameters
Pool/market contract address
Blockchain chain ID (e.g., "evm:56", "solana:solana")
Start date (timestamp or ISO string)
End date (timestamp or ISO string)
Candle period (e.g., "5m", "1h", "1d")
Maximum number of candles (max 2000)
Return USD prices (default: true)
Forward-fill empty candles between trades so the series has no gaps (default: false)
Response
200 - application/json
Market OHLCV history response