Get asset price history
History - Prices & OHLCV Candles
Get Asset Price History
Retrieve historical price data for one or multiple assets.
GET
Get asset price history
Overview
This endpoint retrieves historical price data for assets. Use GET for a single asset or POST for batch requests (up to 10 assets).How to get the asset ID?You can retrieve an asset’s ID using:
- The Search endpoint - search by asset name and get the ID from the response
- The All Assets endpoint - list all assets with their IDs
GET Request (Single Asset)
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | number | Cond. | Mobula’s internal asset ID. Either id or address must be provided. |
address | string | Cond. | Contract address. Either id or address must be provided. |
chainId | string | Cond. | Chain identifier (e.g., "ethereum", "base"). Required when using address. |
period | string | No | Candle resolution. Supported: 5m, 15m, 1h, 6h, 1d. Defaults to auto-granularity. |
from | number | No | Start timestamp (ms). Defaults to 0 (epoch). |
to | number | No | End timestamp (ms). Defaults to current time. |
Example
POST Request (Batch)
Request Body
Send an array of asset queries directly (minimum 1, maximum 10 per request). Each item uses the same parameters as the GET request.Example
Response Format
All response fields use camelCase naming convention:| Field | Type | Description |
|---|---|---|
priceHistory | number[][] | Array of [timestamp, price] tuples |
id | number | Mobula’s internal asset ID |
name | string | Asset name |
symbol | string | Asset symbol |
chainId | string | Chain identifier |
address | string | Contract address |
error | string | Error message if the asset could not be fetched (batch only) |
GET Response Example
POST Response Example
Data Granularity
- 5 minutes for the last 7 days
- 6 hours for the last 30 days
- 1 day for the remaining of history
Period Options
5mfor 5 minutes15mfor 15 minutes1hfor 1 hour6hfor 6 hours1dfor 1 day
Notes
- Maximum 10 assets per POST request
- Rate limit: 5 credits (GET), 10 credits (POST)
Query Parameters
Token contract address
Blockchain chain ID (required when using address)
Asset ID (alternative to address+chainId)
Candle period (e.g., "5m", "1h", "1d")
Start timestamp (unix seconds)
End timestamp (unix seconds)
Response
200 - application/json
Asset price history response