Get Index K-Line

Get index K-Line (Authentication type: NONE, See Interface Permission)

Request Format

GET https://api-cloud.bitmart.com/contract/v1/ifcontract/indexquote

Request Limit

See Detailed Rate Limit

Request Parameter

Field Type Required? Description
indexID long Yes Index 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/indexquote?indexID=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
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",
      "timestamp": 1532610000,
      "rise_fall_rate": "0",
      "rise_fall_value": "0"
    }
  ]
}

results matching ""

    No results matching ""