API Reference

WS v2/ Kline

Get the Kline Data for specific trading pairs

Request Parameters


PARAMETERTYPEReq'dExampleDESCRIPTION
topicSTRINGYklineTopic for "kline" data push
eventSTRINGYsubSubscribe ("sub") or Unsubscribe ("cancel")
paramsDICTIONARYY-Request Parameters
> symbolSTRINGY-Trading Pairs see [Get] Get Exchange Info
> klineTypeSTRINGY1mType of Kline. See klineType: section below

klineType:

klineType
1m -- 1 minute
1d -- 1 day
1w -- 1 week


Request Demo

{
    "topic":"kline",
    "event":"sub",
    "params":{
        "symbol": "ETHUSDT",
        "klineType":"1m"
    }
}


WS Push Content


PARAMETERTYPEExampleDESCRIPTION
topicSTRINGklineTopic for "kline" data push
paramsDICTIONARY-Request Parameters
> symbolSTRING-Trading Pairs see [Get] Get Exchange Info
> klineTypeSTRING1mType of Kline
dataDICTIONARY-WS Push Contenet Data
> tLONG1730100300000Data Time (milisecond)
> sSTRINGETHUSDTTrading Pair
> snSTRINGETHUSDTTrading Pair Name
> cSTRING (decimal)1803.02close
> hSTRING (decimal)1806.97high
> lSTRING (decimal)1803.02low
> oSTRING (decimal)1806.07open
> vSTRING (decimal)0.075Total traded base asset volume

WS Push Demo

{
    "topic": "kline",
    "params": {
        "symbol": "ETHUSDT",
        "klineType": "1m"
    },
    "data": {
        "t": 1730100300000,
        "s": "ETHUSDT",
        "sn": "ETHUSDT",
        "c": "1803.02",
        "h": "1806.97",
        "l": "1803.02",
        "o": "1806.07",
        "v": "0.075"
    }
}