Skip to main content

Get Candlestick Data

  • GET /capi/v2/market/candles

Weight(IP): 1

Request parameters

ParameterTypeRequired?Description
symbolStringYesTrading pair
granularityStringYesCandlestick interval[1m,5m,15m,30m,1h,4h,12h,1d,1w]
limitIntegerNoThe size of the data ranges from 1 to 1000, with a default of 100
priceTypeStringNoPrice Type : LAST latest market price; MARK mark; INDEX index;
LAST by default

Request example

curl "https://api-contract.weex.com/capi/v2/market/candles?symbol=cmt_bchusdt&granularity=1m"

Response parameters

ParameterTypeDescription
index[0]StringCandlestick time
Unix millisecond timestamp
index[1]StringOpening price
index[2]StringHighest price
index[3]StringLowest price
index[4]StringClosing price
index[5]StringTrading volume of the base coin
index[6]StringTrading volume of quote currency

Response example

[
[
"1716707460000",//Candlestick time
"69174.3",//Opening price
"69174.4",//Highest price
"69174.1",//Lowest price
"69174.3",//Closing price
"0", //Trading volume of the base coin
"0.011" //Trading volume of quote currency
]
]