Skip to main content
GET
/
v1
/
chains
/
{chainAlias}
/
tokens
/
{tokenAliasOrTokenAddress}
/
price
/
sparkline
Get sparkline price data for a token
curl --request GET \
  --url https://api.moralis.com/v1/chains/{chainAlias}/tokens/{tokenAliasOrTokenAddress}/price/sparkline \
  --header 'X-Api-Key: <api-key>'
{
  "chain": "0x1",
  "range": "7d",
  "fromDate": "2025-01-01T00:00:00.000Z",
  "toDate": "2025-01-08T00:00:00.000Z",
  "page": 1,
  "cursor": null,
  "result": [
    {
      "timestamp": "2025-01-02T09:00:00.000Z",
      "price": "0.00123"
    }
  ],
  "meta": {
    "syncedAt": {
      "0x1": 19800000
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.moralis.com/llms.txt

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

For BTC, pass bitcoin as chainAlias and native as tokenAliasOrTokenAddress. The response is a compact, chart-ready price array — drop it directly into a sparkline widget without resampling.

Authorizations

X-Api-Key
string
header
required

Path Parameters

chainAlias
enum<string>
required

The alias of the chain.

Available options:
0x1,
ethereum,
0x171,
pulse,
0x2105,
base,
0x38,
binance,
0x89,
polygon,
0xa,
optimism,
0xa86a,
avalanche,
bitcoin-mainnet,
bitcoin,
solana-mainnet,
sol
tokenAliasOrTokenAddress
string
required

The token address or alias

Query Parameters

range
enum<string>
required

The time range for the sparkline. Determines the interval and window size.

Available options:
24h,
7d,
30d,
90d,
1y
Example:

"7d"

Response

200 - application/json
chain
string
required

The resolved blockchain chain ID

Example:

"0x1"

range
enum<string>
required

The sparkline range used for this result

Available options:
24h,
7d,
30d,
90d,
1y
Example:

"7d"

fromDate
string
required

ISO-8601 timestamp of the computed window start

Example:

"2025-01-01T00:00:00.000Z"

toDate
string
required

ISO-8601 timestamp of the computed window end

Example:

"2025-01-08T00:00:00.000Z"

page
number
required

Always 1. Sparkline responses are not paginated.

Example:

1

cursor
object
required

Always null. Sparkline responses are not paginated.

Example:

null

result
object[]
required

Array of price data points

meta
object
required