Skip to content
ChartDeck Developer API docs Account Get an API key

GET /v1/charts/{kind}.png

#GET /v1/charts/{kind}.pnggetChartPicture

A STRATA chart as a PNG picture (1200 x 675) for a bot to post

Answers image/png, not the JSON envelope (errors stay JSON). The data are those of the matching /v1/strata route; the picture carries the title, the price axis, the current price and the attribution, and the X-Attribution header repeats meta.attribution (lines joined by " | "). Drawn at most once per 45 s per (kind, coin, venue, window, theme): Cache-Control: private, max-age=<seconds left>; a cached picture costs its weight. Under load: 503 render_busy / render_timeout with Retry-After.

Scopecharts:read
Lowest tiersandbox
Weight (units)liquidation-levels 10; the heatmaps 15 (7d window), 20 (30d)
SDKPython client.charts.picture ยท JavaScript cd.charts.picture

Parameters

ParameterInTypeDescription
kind requiredpath"liquidation-levels" | "liquidation-heatmap" | "positions-heatmap" | "net-longs-heatmap" | "net-shorts-heatmap" | "long-short-delta-heatmap"liquidation-levels (/v1/strata/levels), liquidation-heatmap (/v1/strata/heatmap), positions-heatmap = open interest parked by price, net-longs-heatmap, net-shorts-heatmap, long-short-delta-heatmap (/v1/strata/netpos; 404 split_unavailable where the venues publish no long/short split).
coinquerystringCoin ticker (BTC); required unless symbol is given.
symbolquerystringAlternative to coin: the USDT perpetual (BTCUSDT).
venuequerystringPin one venue (default: every venue the model uses for the coin).
windowquery"7d" | "30d"default "7d"Model look-back window (30d from Developer).
themequery"dark" | "light"default "dark"Picture colours.

Errors

  • 400 invalid_param, invalid_cursor
  • 401 unauthorized: missing, unknown, revoked or expired key
  • 403 insufficient_scope, tier_required
  • 404 unknown_chart, no_data, split_unavailable, not_in_sandbox, sandbox_not_recorded
  • 422 window_too_large
  • 429 rate_limited (per minute) or quota_exhausted (month; X-Quota-* headers, Retry-After = seconds to the next month); see Retry-After
  • 503 api_disabled, overloaded, render_busy, render_timeout, renderer_unavailable

Example

Shell
curl "https://api.chartdeck.trade/v1/charts/liquidation-levels.png" \
  -H "Authorization: Bearer $CHARTDECK_API_KEY"
Python
from chartdeck import Client

client = Client()  # reads CHARTDECK_API_KEY
r = client.charts.picture("<kind>")
print(r.data, r.meta["attribution"])
JavaScript
import { ChartDeck } from '@chartdeck/api';

const cd = new ChartDeck();  // reads CHARTDECK_API_KEY
const r = await cd.charts.picture("<kind>");
console.log(r.data, r.meta.attribution);

The Developer API documentation is in English.