Get K-Line
Get k-line data within a specified time range of a specified trading pair
(Authentication type:NONE, See Interface Permission)
Request Format
GET https://api-cloud.bitmart.com/spot/v1/symbols/kline
Request Limit
Request Parameter
Field | Type | Required? | Description |
---|---|---|---|
symbol | string | Yes | Trading pair symbol |
from | long | Yes | Start timestamp (in seconds, UTC+0 TimeZome) |
to | long | Yes | End timestamp (in seconds, UTC+0 TimeZome) |
step | long | No | k-line step Steps (in minutes, default 1 minute) |
Request example
curl https://api-cloud.bitmart.com/spot/v1/symbols/kline?symbol=BMX_ETH&step=15&from=1525760116&to=1525769116
Response Data
Field | Type | Description |
---|---|---|
kline | List | K-Line data |
Instruction
Request K-Line data will return up to 500 records. If more than 500 is requested, server will return an empty array.
Description of k-line details field:
Field | Type | Description |
---|---|---|
last_price | string | Current price |
timestamp | long | Timestamp (in seconds, UTC+0 TimeZome) |
volume | string | Total volume |
high | string | Highest price |
low | string | Lowest price |
open | string | Open price |
close | string | Close price |
Example of returned data format
{
"message":"OK",
"code":1000,
"trace":"ae7ede4c-04a3-4004-bd8b-022a12d17e45",
"data":{
"klines":[
{
"timestamp":1590969600,
"open":"1.2400000000",
"high":"1.2400000000",
"low":"1.2000000000",
"close":"1.2000000000",
"last_price":"1.2000000000",
"volume":"4.9000000000"
}
]
}
}