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=1mTry it
Choose an example or enter a symbol. The URL and preview update together.
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
Parameters
| Name | Default | Description |
|---|---|---|
tickerrequired | — | Provider-supported symbol, normalized where safe. |
timeframeoptional | 1m | 1d, 7d, 1m, 3m, 1y, or 5y. |
themeoptional | light | light or dark. |
filloptional | false | Fill gains and losses to the first-close reference line. |
formatoptional | svg | svg 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.
X-Error-Code: TICKER_NOT_FOUND
X-Error-Status: 404INVALID_REQUESTTICKER_NOT_FOUNDINSUFFICIENT_DATARATE_LIMITEDPROVIDER_ERRORSERVICE_UNAVAILABLEFreshness
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.