Get Candlestick Data
- GET
/capi/v2/market/candles
Weight(IP): 1
Request parameters
| Parameter | Type | Required? | Description |
|---|---|---|---|
| symbol | String | Yes | Trading pair |
| granularity | String | Yes | Candlestick interval[1m,5m,15m,30m,1h,4h,12h,1d,1w] |
| limit | Integer | No | The size of the data ranges from 1 to 1000, with a default of 100 |
| priceType | String | No | Price 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
| Parameter | Type | Description |
|---|---|---|
| index[0] | String | Candlestick time Unix millisecond timestamp |
| index[1] | String | Opening price |
| index[2] | String | Highest price |
| index[3] | String | Lowest price |
| index[4] | String | Closing price |
| index[5] | String | Trading volume of the base coin |
| index[6] | String | Trading 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
]
]