Retrieve OHLCV (Open, High, Low, Close, Volume) candlestick data for one or multiple pools/markets.
| 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 |
| 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 |
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 weekIs `period` compatible with TradingView’s ResolutionString?
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):1S, 5S, … → Mobula 1s, 5s, …1, 5, 15, 30 → 1m, 5m, 15m, 30m60 → 1h; 240 → 4h; 360 → 6h; 720 → 12h1D → 1d, 1W → 1w1M (one month):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:1T, 5T, …) — Mobula serves time-based OHLCV candles, not tick aggregation.1h for unknown non-empty values, or 5m when period is omitted on this endpoint).1s, 5s, 15s, 30s, 1m, 5m, 15m, 30m, 1h, 4h, 6h, 12h, 1d, 1w.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.amount is specified and a date range is provided, the default cap is 2000. Without a date range, the default is 300 candles.