Skip to main content

K-Lines

K-Lines

V1

V1 version only support 1 minute ResumeNo: -1 means the latest record,-30 means the latest 30 historical records.

Request

Spot Request

{
"SendTopicAction": {
"Action": "1",
"FilterValue": "DeepCoin_BTC/USDT_1m",
"LocalNo": 6,
"ResumeNo": -1,
"TopicID": "11"
}
}

Contracts Request

{
"SendTopicAction": {
"Action": "1",
"FilterValue": "DeepCoin_BTCUSDT_1m",
"LocalNo": 6,
"ResumeNo": -1,
"TopicID": "11"
}
}

Response Parameters

Field NameTypeExampleDescription
Istring"BTCUSDT"Instrument ID
Pstring"1m"Period
Bint1757640420Begin time
Ofloat115819Open price
Cfloat115788.4Close price
Hfloat115819The highest price
Lfloat115787.6The lowest price
Vfloat4989Volume
Mfloat577697.5531Turnover

Response Example

{
"a": "PK",
"tt": 1757640455199,
"mt": 1757640455199,
"r": [
{
"d": {
"I": "BTCUSDT",
"P": "1m",
"B": 1757640420,
"O": 115819,
"C": 115788.4,
"H": 115819,
"L": 115787.6,
"V": 4989,
"M": 577697.5531
},
"t": "LK"
}
]
}

V2

Request

Spot Request

{
"Action": "1",
"Symbol": "BTC/USDT",
"LocalNo": 6,
"Count": 10, // Request historical data, maximum of 100
"Topic": "kline",
"PeriodID": "1m" // Period
}

Contracts Request

{
"Action": "1",
"Symbol": "BTCUSDT",
"LocalNo": 6,
"Count": 10, // Request historical data, maximum of 100
"Topic": "kline",
"PeriodID": "1m" // Period
}

Response Parameters

Field NameTypeExampleDescription
ttint1757640455199Trading timestamp
mtint1757640455199Market timestamp
istring"BTCUSDT"Instrument ID
pstring1mPeriod
darraydata

Response Example

{
"a": "PK",
"tt": 1757640455199,
"mt": 1757640455199,
"i": "BTCUSDT",
"p": "1m",
"d": [
[
"1739157660000", // Timestamp
"95900.5", // Open price
"95932.2", // Highest price
"95850.4", // Lowest price
"95913.4", // Close price
"20084", // Volume (base currency)
"1925967.4841" // Volume (quote currency)
]
]
}