Skip to main content
GET
/
1
/
market
/
sparkline
Get market sparkline
curl --request GET \
  --url https://demo-api.mobula.io/api/1/market/sparkline
{
  "url": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.mobula.io/llms.txt

Use this file to discover all available pages before exploring further.

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 param png=true to the query.
NameTypeRequiredDescription
assetstringNoThe asset identifier to query. This can be the token’s name or the contract address
blockchainstringNoBlockchain name (e.g., "ethereum"). Required if using a contract address.
symbolstringNoAsset symbol (e.g., "BTC").
idstringNoMobula internal asset ID.
timeFramestringNoTimeframe for the sparkline (e.g., "24h", "7d"). Default: "24h".
pngstringNoIf "true", returns the image in PNG format instead of SVG.

Usage Examples

  • Query by Asset Address & Blockchain with PNG output and 7-day timeframe:
curl -X GET "https://demo-api.mobula.io/api/1/market/sparkline?asset=0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf&blockchain=8453&png=true&timeFrame=7d"
  • Query by Asset Name & Blockchain:
curl -X GET "https://demo-api.mobula.io/api/1/market/sparkline?asset=Tether&blockchain=ethereum&png=true"

Query Response

Returns the 24h sparkline url for the given asset.

Query Parameters

asset
string
blockchain
string
symbol
string
id
string
timeFrame
string
default:24h
png
string
default:false

Response

200 - application/json

Market sparkline response

url
string
required