API reference

PNG behind a signed chart link

GET/charts/{token}.pngNo key needed

PNG behind a signed chart link

Returns the PNG a signed chart link points at. Chart links come from the agent tools and nowhere else: chart_url in a get_pattern_chart or demo result, which an app card loads as an image because a card cannot send the key. The token names one current setup; the link needs no key, is limited per IP, and stops working when the setup is no longer current or a week after it was issued, whichever comes first.

Authentication

No key needed. Without one the call is limited to 30 requests a minute per IP; with a key it counts against the key's limits instead.

Parameters

NameInTypeRequiredDescription
tokenpathstringyesThe signed token from a chart_url, without the .png suffix.

Request

curl "https://api.tradingpal.io/api/v1/charts/TOKEN.png" \
  -o setup.png

Response

PNG image of the setup: candles, both lines, trigger, stop and target. The body is the image bytes with Content-Type: image/png; there is no JSON envelope.

Errors

Errors are JSON with the Error shape; the fix field says what to do.

StatusCodeMeaningFix
429rate_limitedThe key passed 60 requests in a minute or 10,000 in a day, or a keyless caller passed 30 a minute from one IP.Wait details.retry_after_seconds, then retry. Cache the nightly answers; they do not change until the next session.
404setup_not_foundNo current setup on that ticker has the setup_id you passed to chart.png.Call the patterns route again and use a setup_id from tonight’s answer; ids change when a pattern is redrawn.