Skip to content

046kline

杨晓强 edited this page Dec 6, 2021 · 3 revisions

K line data API

  • Acquire K line data

#example

#Request
{
  "method":"kline.query",
  "params":[
    "BTCBCH",              #1.market: See<API invocation description·market> 
    1629599859,            #2.start time
    1629599859,            #3.end time
    60                     #4.second for each cycle now supports: 1min,3min,5min,15min,30min,1hour,2hour,4hour,6hour,12hour,1day,3day,1week.
  ],
  "id": 5
}
#Response
{
  "error": null, 
  "result": [
    [
      1496458500, #time 
      "16.65", #opening
      "11.57", #closing
      "17.65", #highest
      "10.57", #lowest
      "1862" #volume
    ]
  ],
  "id": 5
}

HTTP API Introduction

Common API

Market API

Account API

Trading API

Margin API

Contract API

WebSocket API Introduction

Clone this wiki locally