Historical K-line
Last updated
Last updated
Fields
name
type
Required fields
illustrate
symbol_id
Product ID
uint64
yes
trade_type
Transaction Type
uint32
yes
1: Full position contract, 2: Isolated position contract, 3: Leverage, 5: Spot, 6: Stock
trade_mode
Trading Model
uint32
yes
1:MM, 2:ButterflyMM, 3:Matchmaking, 4:Aggregation
kline_type
K-line type
uint32
yes
1 minute K, 2 is 5 minute K, 3 is 15 minute K, 4 is 30 minute K, 5 is hour K, 6 is 2 hour K, 7 is 4 hour K, 8 is daily K, 9 is weekly K, 10 is monthly K
kline_timestamp_end
Line end timestamp
uint64
no
Unit: Seconds
query_kline_num
Query the number of K lines
uint32
yes
kline_timestamp_end is 0, query_kline_num is not 0, query the latest query_kline_num K-lines (including the current K-line) kline_timestamp_end is not 0, query_kline_num is not 0, query the query_kline_num K-lines from kline_timestamp_end to the previous query_kline_num K-lines In other cases, the interface directly returns an error, indicating that the query service is not supported
Fields
name
type
illustrate
symbol_id
Product ID
uint64
trade_type
Transaction Type
uint32
1: Full position contract, 2: Isolated position contract, 3: Leverage, 5: Spot, 6: Stock
trade_mode
Trading Model
uint32
1:MM, 2:ButterflyMM, 3:Matchmaking, 4:Aggregation
kline_type
K-line type
uint32
1 minute K, 2 is 5 minute K, 3 is 15 minute K, 4 is 30 minute K, 5 is hour K, 6 is 2 hour K, 7 is 4 hour K, 8 is daily K, 9 is weekly K, 10 is monthly K
price_digits
Price decimal places
uint32
kline_list
K-line list
array
See the kline_list definition below for the specific format.
Fields
name
type
illustrate
timestamp
The timestamp of the K line
uint64
Unit: Seconds
open_price
The opening price of the K-line
string
close_price
The closing price of the K-line
string
high_price
The highest price of the K line
string
low_price
The lowest price of the K line
string
last_tick_time
The last tick time of the K line
uint64
Unit: milliseconds
last_tick_seq
The last tick number of the K-line
uint64
transactions_number
The number of transactions of this K line
string