Generates and returns a .SVG vector image of a sparkline (mini chart) for use in stock lists, tiles, and other UI components.

The /intraday-sparkline endpoint will return a JSON object with a populated SVG with intraday data for each provided ticker. The resulting JSON includes the symbol of the asset and its associated SVG string, like this:

924924

The SVG is rendered with the aspect ratio of 5:1, but it will grow to fit its container. The stroke will remain the same size given the vector-effect="non-scaling-stroke" property on the returned SVG.

For equity and ETF assets, the SVG is rendered with intraday data at 5-minute intervals and a cardinal curve. The available x-axis space is scaled to the entire market day. If the endpoint is fetched on a weekend or holiday, it will show the results from the previous market day until the next market day begins.

For crypto assets, the SVG is rendered with data from the past 24 hours at 15-minute intervals and a cardinal curve. Unlike the equity and ETF assets, the x-axis for crypto assets will always include a full sparkline, rather than allotting space for the expected market day. The color is determined by whether or not the current price is higher or lower than the price 24 hours ago.

If the asset doesn't have any intraday data returned, it will return null as to prevent failure for a batch request.

707707

Rendered results of the /intraday-sparkline endpoint in the mid-morning with all default values.

Ready to get started? Get your free trial API key ➔
Language
Authentication
Query
Click Try It! to start a request and see the response here!