Get market history
Get Historical Market Data (Legacy)
Retrieve historical price and volume data for an asset, with customizable time granularity for precise market analysis.
GET
Get market history
Query Details
Input in “asset” the name of the asset you want to query, or the contract address while adding the blockchain as a second parameter. The market data asset query pattern is explained in great details here, with blockchain format, etc.| Parameter | Type | Description |
|---|---|---|
asset | string | Asset name or contract address. If an address is provided, you must also provide blockchain. |
blockchain | string | Blockchain identifier (e.g., "ethereum", "base"). Required when asset is an address. |
symbol | string | Token ticker symbol (e.g., "ETH"). Optional alternative to asset. |
id | number | Mobula’s internal asset ID (numeric identifier). |
period | string | Candle resolution. Supported: 5m, 15m, 1h, 6h, 1d. Defaults to auto-granularity. |
from | number | Start timestamp (ms). Defaults to 0 (epoch). |
to | number | End timestamp (ms). Defaults to current time. |
Data details
Price data is computed using Octopus, Mobula’s market data engine. You can have a high-level overview of how it’s computing DeFi prices here. Data granularity is designed as follows:- 5 minutes for the last 7 days
- 6 hours for the last 30 days
- 1 day for the remaining of history
Granularity settings
You can set the granularity of the data by adding theperiod parameter.
5mfor 5 minutes15mfor 15 minutes1hfor 1 hour6hfor 6 hours1dfor 1 day
Usage Example:
- Query by Asset and Time Range
- Query by Asset and Period