Candles

GET
/v1/candles

OHLC bars in the TradingView UDF shape. v is always 0: an index price has no volume. At most 5000 bars per request.

Query Parameters

feed*string

A feed ID (either kind) or a symbol, such as Crypto.BTC/USD.

resolution*string

Bar size. 1, 5, 15, 60, 240 minutes or 1D; 1m, 5m, 15m, 1h, 4h, 1d also work.

Value in

  • "1"
  • "5"
  • "15"
  • "60"
  • "240"
  • "1D"
  • "1m"
  • "5m"
  • "15m"
  • "1h"
  • "4h"
  • "1d"
  • "D"
from*integer

Start, Unix seconds.

Range0 <= value
to*integer

End, Unix seconds, not before from.

Range0 <= value

Response Body

application/json

application/json

application/json

text/plain

text/plain

application/problem+json

curl -X GET "https://example.com/v1/candles?feed=Crypto.BTC%2FUSD&resolution=60&from=0&to=0"
{  "s": "ok",  "t": [    0  ],  "o": [    0  ],  "h": [    0  ],  "l": [    0  ],  "c": [    0  ],  "v": [    0  ]}