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

GET /v1/candles

#GET /v1/candlesgetCandles

OHLCV bars of one market (the chart's own bars); venue mcap = the TOTAL indexes

Bars { t, o, h, l, c, v [, qv, bv, qbv] }, t = bar open (unix s). Pages go backward in time: next_cursor asks for the page before the oldest bar.

Scopemarket:read
Lowest tiersandbox
Weight (units)1 for a window whose oldest bar is within 30 days and at most 1,000 bars; 10 for older history
History each tier may readSandbox: 30 days; Starter: 365 days; Elite (included): 365 days; Developer: 1825 days; Business: all recorded
Paginatedyes: follow meta.next_cursor
SDKPython client.market.candles ยท JavaScript cd.market.candles

Parameters

ParameterInTypeDescription
venue requiredquerystringVenue id (see /v1/venues), lower case.
symbol requiredquerystringThe venue's symbol (BTCUSDT; see /v1/markets).
res requiredquerystringResolution: minutes (1 ... 720), 1D, 1W, 1M; seconds (1S ... 45S) and ticks (10T ...) from Developer.
fromquerystringStart, inclusive: unix seconds or RFC 3339.
toquerystringEnd, exclusive: unix seconds or RFC 3339. Default now.
limitqueryintegerRows per page, at most 5,000 (default 500).
cursorquerystringmeta.next_cursor of the previous page (opaque; bound to the route).

Answer

data: a list of bars { t, o, h, l, c, v, qv?, bv?, qbv? }

Errors

  • 400 invalid_param, invalid_cursor
  • 401 unauthorized: missing, unknown, revoked or expired key
  • 403 insufficient_scope, tier_required
  • 404 not_found, not_available, not_in_sandbox
  • 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

Example

Shell
curl "https://api.chartdeck.trade/v1/candles?venue=binance&symbol=BTCUSDT&res=60" \
  -H "Authorization: Bearer $CHARTDECK_API_KEY"
Python
from chartdeck import Client

client = Client()  # reads CHARTDECK_API_KEY
r = client.market.candles(venue="binance", symbol="BTCUSDT", res="60")
print(r.data, r.meta["attribution"])
JavaScript
import { ChartDeck } from '@chartdeck/api';

const cd = new ChartDeck();  // reads CHARTDECK_API_KEY
const r = await cd.market.candles({ venue: "binance", symbol: "BTCUSDT", res: "60" });
console.log(r.data, r.meta.attribution);

The Developer API documentation is in English.