Candles

The Candles endpoint provides OCHL (Open, Close, High, Low) and volume data for the specified funding currency or trading pair. The endpoint provides the last 100 candles by default, but a limit and a start and/or end timestamp can be specified.

Response Fields

IndexFieldTypeDescription
[0]MTSintMillisecond epoch timestamp
[1]OPENintFirst execution during the time frame
[2]CLOSEintLast execution during the time frame
[3]HIGHintHighest execution during the time frame
[4]LOWintLowest execution during the timeframe
[5]VOLUMEfloatQuantity of symbol traded within the timeframe

Available candles

Trading pair candles

KeyTime frameTrading pairExample
trade1m, 5m, 15m, ...tBTCUSD, tLTCUSD, tETHUSD, ...trade:1m:tBTCUSD

Funding currency candles

KeyTime frameFunding currencyPeriodExample
trade1m, 5m, 15m, ...fUSD, fBTC, fETH, ...:pPERIODtrade:1m:fUSD:p30

Aggregate funding currency candles

KeyTime frameFunding currencyAggregation [10, 30]PeriodExample
trade1m, ...fUSD, ...:aAGGR:pSTART:p:ENDtrade:1m:fUSD:a10:p2:p10

📘

Time frame available values

Available values: "1m", "5m", "15m", "30m", "1h", "3h", "6h", "12h", "1D", "1W", "14D", "1M".

🚧

Funding Candles

Be sure to specify a period or aggregated period when retrieving funding candles. If you wish to mimic the candles found in the UI, use the following setup to aggregate all funding candles: a30:p2:p30.
Example: https://api-pub.bitfinex.com/v2/candles/trade:1h:fUSD:a30:p2:p30/hist.

🚧

Specifying either "hist" or "last" section is mandatory for all keys.


Rate Limit: 30 reqs/min (requests per minute)
Path Params
string
required
Defaults to trade:1m:tBTCUSD

Check Available candles table to understand how to compose this argument.

string
required
Defaults to hist

Available values: "last", "hist".

Query Params
int32

+1: sort in ascending order | -1: sort in descending order (by MTS field).

int64

If start is given, only records with MTS >= start (milliseconds) will be given as response.

int64

If end is given, only records with MTS <= end (milliseconds) will be given as response.

int32

Number of records in response (max. 10000).

Response

Language
Click Try It! to start a request and see the response here! Or choose an example:
application/json