Get K-Line
Get K-Line
(Authentication type: NONE, See Interface Permission)
Request Format
GET https://api-cloud.bitmart.com/contract/v1/ifcontract/quote
Request Limit
Request Parameter
Field | Type | Required? | Description |
---|---|---|---|
contractID | long | Yes | Contract ID |
startTime | long | Yes | Start time |
endTime | long | Yes | End time |
unit | int | Yes | Frequency |
resolution | string | Yes | Frequency unit, M: minute, H: hour, D: day |
Instruction
Request example
curl https://api-cloud.bitmart.com/contract/v1/ifcontract/quote?contractID=1&startTime=1584343602&endTime=1585343602&unit=5&resolution=M
Response Data
Field | Type | Description |
---|---|---|
low | string | Lowest price |
high | string | Highest price |
open | string | Open price |
close | string | Close price |
last_price | string | Last trade price |
avg_price | string | Average price |
volume | string | Volume |
base_coin_volume | string | Volume in base coin (base coin is the first coin in the trading pair) |
quote_coin_volume | string | Volume in quote coin (quote coin is the second coin in the trading pair) |
timestamp | string | Timestamp, in seconds |
rise_fall_rate | string | Price change ratio |
rise_fall_value | string | Price change value |
Example of returned data format
{
"code": 1000,
"trace":"886fb6ae-456b-4654-b4e0-d681ac05cea1",
"message": "OK",
"data": [
{
"low": "130",
"high": "130",
"open": "130",
"close": "130",
"last_price": "130",
"avg_price": "130",
"volume": "0",
"base_coin_volume": "163.9",
"quote_coin_volume": "34555.38199999999999998882",
"timestamp": 1532610000,
"rise_fall_rate": "0",
"rise_fall_value": "0"
}
]
}