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. The default response is a SVG image, if you want a png you can just add a parampng=true to the query.
| Name | Type | Required | Description |
|---|---|---|---|
asset | string | No | The asset identifier to query. This can be the token’s name or the contract address |
blockchain | string | No | Blockchain name (e.g., "ethereum"). Required if using a contract address. |
symbol | string | No | Asset symbol (e.g., "BTC"). |
id | string | No | Mobula internal asset ID. |
timeFrame | string | No | Timeframe for the sparkline (e.g., "24h", "7d"). Default: "24h". |
png | string | No | If "true", returns the image in PNG format instead of SVG. |
Usage Examples
- Query by
Asset Address&BlockchainwithPNGoutput and7-daytimeframe:
- Query by
Asset Name&Blockchain:
Query Response
Returns the 24h sparkline url for the given asset.
Query Parameters
Response
200 - application/json
Market sparkline response