Public API · v1

Market sparklines in one URL.

Use a live, cacheable SVG in HTML, Markdown, dashboards, bots, or anywhere else an image works.

https://ticker-line.com/v1/sparkline?ticker=AAPL&timeframe=1m

Try it

Choose an example or enter a symbol. The URL and preview update together.

Live previewAAPL price over one month

Usage

HTML

<img
  src="https://ticker-line.com/v1/sparkline?ticker=AAPL&timeframe=1m"
  alt="AAPL price over one month"
  width="160"
  height="48"
/>

Markdown

![AAPL price over one month](https://ticker-line.com/v1/sparkline?ticker=AAPL&timeframe=1m)

Parameters

NameDefaultDescription
tickerrequiredProvider-supported symbol, normalized where safe.
timeframeoptional1m1d, 7d, 1m, 3m, 1y, or 5y.
themeoptionallightlight or dark.
filloptionalfalseFill gains and losses to the first-close reference line.
formatoptionalsvgsvg for embeds; json for metadata and semantic errors.

Errors

SVG requests stay embeddable: failures return HTTP 200 with a gray fallback image and error details in headers. JSON requests use semantic status codes.

Gray fallback sparkline for an unknown ticker
X-Error-Code: TICKER_NOT_FOUND
X-Error-Status: 404
400INVALID_REQUEST
404TICKER_NOT_FOUND
422INSUFFICIENT_DATA
429RATE_LIMITED
502PROVIDER_ERROR
503SERVICE_UNAVAILABLE

Freshness

Cache duration depends on timeframe, asset type, and market session. Recent ranges refresh in minutes; long histories refresh less often. Inspect X-Data-As-Of or JSON dataAsOf for the source timestamp.

During a provider outage, a recent cached chart may be served within a bounded stale window. No real-time guarantee is implied.

Terms

Free to call without an API key. Cache responses, avoid needless polling, and do not bypass rate limits. Charts may be delayed or contain errors and are not financial advice.