Appearance
Get Kline
Rate Limit: 10 req/sec/ip
Description
Interface is used to get future kline history.
HTTP Request
- GET /api/v1/futures/market/kline
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | true | Trading pair, based on the symbolName, i.e. BTCUSDT |
| startTime | int64 | false | The start time is to query the k-lines after this time,The millisecond format of the Unix timestamp, such as 1672410780000 |
| endTime | int64 | false | The end time is to query the k-lines before this time,The millisecond format of the Unix timestamp, such as 1672410780000 |
| interval | string | true | kline interval such as 1m 5m 15m 30m 1h 2h 4h 6h 8h 12h 1d 3d 1w 1M |
| limit | int | false | Default: 100, maximum: 200 |
| type | string | false | Kline type, values: LAST_PRICE, MARK_PRICE; default: LAST_PRICE |
Request Example
bash
curl -X 'GET' --location 'https://fapi.bitunix.com/api/v1/futures/market/kline?symbol=BTCUSDT&startTime=1&endTime=10234&interval=15m'Response Parameters
| Parameter | Type | Description |
|---|---|---|
| open | string | open price |
| high | string | high price |
| low | string | low price |
| close | string | close price |
| quoteVol | string | Trading amount (quote currency turnover) for the kline period |
| baseVol | string | Trading volume (base coin) for the kline period |
Response Example
json
{"code":0,"data":[{"open":"60000","high":"60001","close":"60000","low":"59989.2","time":111111,"quoteVol":"1","baseVol":"60000","type":"LAST_PRICE"}],"msg":"Success"}