Skip to main content

Overview

Sparklines are a visual representation of price data over a period of time. They are available for the last 7 days and are returned as a JSON array of price points. To add them to your response, include the ?sparkline=7d query parameter.
Sparklines may be added to either the Get Multiple Assets or Get Single Asset endpoints.

Example Request

curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.blockworks.com/v1/assets/ethereum?sparkline=7d"

Example Response

{
  "id": 2,
  "code": "ETH",
  "title": "Ethereum",
  "slug": "ethereum",
  ... // other asset data
  "sparkline_7d": "[4320.656767290254,4305.000222677031,4378.403865674114,...]"
}

Response Fields

FieldTypeDescription
sparkline_7dNumber[]Array of price points for the last 7 days

See Also

I