Timestamps are in MS, it’s JS timestamps.
Query details
You can query up to 10 assets as the same time (even tho if you are facing this you might want to use our data streams). The market data asset query pattern is explained in great details here, with blockchain format, etc. For example, you can query with parameters:Parameter | Type | Description |
---|---|---|
assets | string | Comma-separated list of asset names or contract addresses (up to 10). Example: "Bitcoin,0x7d1a...,Hedera" . |
symbols | string | Comma-separated list of token symbols (used as alternative to assets ). Example: "ETH,USDT" . |
blockchains | string | Comma-separated list of blockchain identifiers (resolved internally). Example: "1,137" . |
ids | string | Comma-separated list of Mobula asset IDs (numeric identifiers). |
period | string | Candle resolution. Supported: 1s , 1min , 5min , 15min , 1h , 1d , 7d , 30d . If omitted, auto-derived. |
from | number | Start timestamp (ms) applied to all assets if froms is not provided. Defaults to 30 days ago. |
froms | string | Comma-separated list of start timestamps (ms), one per asset. Overrides from . |
to | number | End timestamp (ms) applied to all assets if tos is not provided. Defaults to now. |
tos | string | Comma-separated list of end timestamps (ms), one per asset. Overrides to . |
Need more than 10 assets? You can use the /all
endpoint to get all assets listed on Mobula (curated, not all DeFi tokens)
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
Usage Example:
- Query by Asset and Mulitple Time Range
Query Parameters
Response
200 - application/json
Market multi history response