Render a chart
Request a PNG chart with a market window, a view, and optional drawing commands.
POST
/v1/charts/rendersRequest body
Use exchange-qualified symbols and one supported interval. Omit date bounds for a recent closed-candle window, or provide both RFC3339 bounds for a historical image.
market.symbolstring · required- For example BINANCE:BTCUSDT or NASDAQ:AAPL. Binance spot history covers BTC, ETH and SOL; the connected feed supports accessible instruments with provider-dependent history. Your own candles are also accepted.
market.intervalenum- 1, 5, 15, 60, 240, or D. Intraday intervals are minutes.
market.rangeobject- Either { bars: 320 } (2–2000) or { from, to }. Both date bounds are required. The range is [from, to), with only fully closed candles.
viewobject- PNG dimensions, dark or light theme, and volume visibility. Defaults: 1440 × 900, dark, volume on.
commandsarray · optional- Existing typed drawing commands, up to 100. Chart-write scope is required. Never arbitrary HTML or JavaScript.
delivery.modeenum- artifact (default) or inline_base64. Images always carry dimensions, SHA-256 and expiration.
curl -X POST "$AGENT_CHARTING_URL/v1/charts/renders" \
-H "Authorization: Bearer $AGENT_CHARTING_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: my-chart-request-001" \
-d '{
"market": {
"symbol": "BINANCE:BTCUSDT",
"interval": "240",
"range": {
"from": "2023-01-01T00:00:00Z",
"to": "2023-02-01T00:00:00Z"
}
},
"view": {
"width": 1280,
"height": 720,
"theme": "dark",
"includeVolume": true
}
}'200 · completed (example)
{
"id": "render_…",
"status": "completed",
"image": {
"id": "img_…",
"mimeType": "image/png",
"width": 1280,
"height": 720,
"url": "/v1/artifacts/img_…",
"authentication": "bearer",
"sha256": "…"
},
"provenance": {
"managedAgent": false
}
}Response and permissions
Rendering completes inline when worker capacity is available. Queued requests return 202 and Location; poll the self link. Use Prefer: wait=5 to wait at most five seconds for a result without canceling the job. Supplied drawings are verified against the render manifest; rendered does not mean a model visually reviewed them.
Required scopes: market:read chart:read; add chart:write when sending commands.