Contract Market Data Endpoints

Check Server Time

Rate Limit:20 requests per 2 seconds

HTTP Request Time to return to server

  • GET /api/swap/v3/market/time

Response:

{
    "epoch":"1591099099.896", //Unix timestamp in seconds
    "iso":"2020-06-02T11:58:19.896Z", //SO8601 standard time format
    "timestamp":1591099099896 //Unix timestamp in milliseconds
}

Response Field

FieldDescription

epoch

Unix timestamp in seconds

iso

ISO8601 standard time format

timestamp

Unix timestamp in milliseconds

Contract Information

Rate Limit:20 requests per 2 seconds

HTTP Requests Get market data.

  • GET /api/swap/v3/market/contracts

Response:

[
  {
    "symbol":"cmt_btcusdt",  //Contract name
    "coin":"USDT", //Margin currency
    "contract_val":"0.0001", //Contract value
    "delivery":[  //Settlement time
         "07:00:00",
         "15:00:00",
         "23:00:00"
     ], 
    "forwardContractFlag":true, //(true or false) , forward contract or not
    "priceEndStep":5, //Prices' Last Digit in Cents
    "quote_currency":"USDT", //Denominated currency
    "size_increment":"0", //Quantity Precision
    "tick_size":"1", //Price  Precision
    "underlying_index":"BTC" //Contract currency
    "minLeverage":1 // minimum  leverage
    "maxLeverage":100 //maximum leverage
  }
]

Response Field

FieldDescription

symbol

Contract name

coin

Margin currency

contract_val

Contract value

delivery

Settlement time

forwardContractFlag

(true or false) , forward contract or not

priceEndStep

Prices' Last Digit in Cents

quote_currency

Denominated currency

size_increment

Quantity Precision

tick_size

Price Precision

underlying_index

Contract currency

minLeverage

minimum leverage

maxLeverage

maximum leverage

Order Book

Rate Limit:20 requests per 2 seconds

HTTP Requests get order book data

  • GET /api/swap/v3/market/depth

Request Parameter

ParametersTypeRequiredDescription

symbol

String

Yes

Contract name

limit

Integer

Yes

depth size Range between (1- 200)

Response:

{
   "asks":[
         [
            "8858.0", //price
            "19299"//quantity
        ]   
     ],
   "bids":[
         [
            "7466.0", //price
            "499"  //quantity
        ],
         [
            "4995.0",
            "12500"
        ]
     ],
   "timestamp":"1591237821479" 
}

Response Field

FieldDescription

asks

Sell side depth

bids

Buy side depth

timestamp

Timestamp

Get All Symbol Ticker Data

Rate Limit:20 requests per 2 seconds

HTTP Requests Get all symbol ticker data

  • GET /api/swap/v3/market/tickers

Response:

[
    {
        "symbol":"cmt_bchusdt", //Contract name
        "best_ask":"332.00",  //Best ask price
        "best_bid":"203.00", //Best bid price
        "high_24h":"394",  //Highest price in the past 24 hours
        "last":"332",     //Last traded price
        "low_24h":"332", //Lowest price in the past 24 hours
        "timestamp":"1591240033936", //System timestamp
        "volume_24h":"0",  //Trading volume of past 24 hours
        "priceChangePercent": "-0.63",  //24-hour price change percentage
        "base_volume":"15722.59",  //24-hour volume, by currency
 }
]

Response Field

FieldDescription

symbol

Contract name

best_ask

Best ask price

best_bid

Best bid price

high_24h

Highest price in the past 24 hours

last

Last traded price

low_24h

Lowest price in the past 24 hours

timestamp

System timestamp

volume_24h

Trading volume of past 24 hours

priceChangePercent

24-hour price change percentage

base_volume

24-hour volume, by currency

Get Ticker Data By Symbol

Rate Limit:20 requests per 2 seconds

HTTP Requests Get Ticker Data By Symbol

  • GET /api/swap/v3/market/ticker

Request Parameter

ParametersTypeRequiredDescription

symbol

String

Yes

Contract name

Response:

{
    "symbol":"cmt_btcusdt",   //Contract name 
    "best_ask":"8858.0",     //Best ask price
    "best_bid":"7466.0",    //Best bid price   
    "high_24h":"8858",     //Highest price in the past 24 hours
    "last":"8858",        //Last traded price  
    "low_24h":"8858",    //Lowest price in the past 24 hours
    "timestamp":"1591252726275",  //System Timestamp
    "volume_24h":"0",   //Trading volume of past 24 hours
    "priceChangePercent": "-0.63"  //24-hour price change percentage
}

Response Field

FieldDescription

symbol

Contract name

best_ask

Best ask price

best_bid

Best bid price

high_24h

Highest price in the past 24 hours

last

Last traded price

low_24h

Lowest price in the past 24 hours

timestamp

System timestamp

volume_24h

Trading volume of past 24 hours

priceChangePercent

24-hour price change percentage

base_volume

24-hour volume, by currency

Get Trades List

Rate Limit:20 requests per 2 seconds

HTTP Requests Get Trades List By Symbol

  • GET /api/swap/v3/market/trades

Request Parameter

ParametersTypeRequiredDescription

symbol

String

Yes

Contract name

limit

String

Yes

Number of results per request

Response:

[
  {
      "symbol":"cmt_btcusdt",    //Contract name
      "price":"7844.00",        //Deal price
      "side":"buy",            //Transaction direction: sell, buy
      "size":"48",            //The number of transactions
      "timestamp":"1591111746879",    //Transaction timestamp
      "trade_id":"651735392382353615"   //Transaction id
 }
]

Response Field

FieldDescription

symbol

Contract name

price

Deal price

side

Transaction direction: sell, buy

size

The number of transactions

timestamp

Transaction timestamp

trade_id

Transaction id

Kline/Candlestick Data

Rate Limit:20 requests per 2 seconds

HTTP Requests Retrieve the candlestick charts of the trading pairs.

  • GET /api/swap/v3/market/candles

Request Parameter

ParametersTypeRequiredDescription

symbol

String

Yes

Contract name

startTime

Long

Yes

Start time (time stamp)

endTime

Long

Yes

End time (time stamp)

granularity

String

Yes

Bar size in seconds, default 60, must be one of [60/180/300/900/1800/3600/7200/14400/21600/43200/86400/604800] or returns error

Descriptiongranularity

1min

60

5min

300

15min

900

30min

1800

1h

3600

4h

14400

12h

43200

1d

86400

7d

604800

Response:

[
    "1556687460000",    //System timestamp
    "5315.5",          //Open price
    "5315.5",         //Higest price
    "5315.5",        //Lowest price
    "5315.5",       //Closing price
    "342",         //Transaction volume 
    "0.064340137494"   //Transaction volume (converted by currency)
]

Response Field

FieldDescription

timestamp

System timestamp

open

Open price

high

Higest price

low

Lowest price

close

Closing price

volume

Transaction volume

currency_volume

Transaction volume (converted by currency)

Index Price

Rate Limit:20 requests per 2 seconds

HTTP Requests Get index price by symbol.

  • GET /api/swap/v3/market/index

Request Parameter

ParametersTypeRequiredDescription

symbol

String

Yes

Contract name

Response:

{
    "symbol":"cmt_btcusdt",   //Contract name
    "index":"9654.1",        //Index price
    "timestamp":"1591256590003"  //System timestamp
}

Response Field

FieldDescription

symbol

Contract name

index

Index price

timestamp

System timestamp

Open Interest

Rate Limit:20 requests per 2 seconds

HTTP Requests Get present open interest of a specific symbol.

  • GET /api/swap/v3/market/open_interest

Request Parameter

ParametersTypeRequiredDescription

symbol

String

Yes

Contract name

Response:

{
    "symbol": "cmt_btcusdt",//Contract  name
    "amount": "4097696",//Total holdings
    "base_volume": "4097.696",//Total holdings,left coin vol
    "target_volume": "47124323.5392",//Total holdings,right coin vol
    "timestamp": "1603109860796",// System Timestamp
    "forwardContractFlag": true //Is it a forward contract
}

Response Field

FieldDescription

symbol

Contract name

amount

Total holdings

forwardContractFlag

Is it a forward contract

timestamp

System timestamp

base_volume

Total holdings,left coin vol

target_volume

Total holdings,right coin vol

Current Price Limits

Rate Limit:20 requests per 2 seconds

HTTP Requests Retrieve the ceiling of the buy price and floor of sell price of the contract.

  • GET /api/swap/v3/market/price_limit

Request Parameter

ParametersTypeRequiredDescription

symbol

String

Yes

Contract name

Response:

{
     "symbol":"cmt_btcusdt",    //Contract name
     "forwardContractFlag":true,  //Is it a forward contract
     "highest":"14474.5",        //Ceiling of buying price
     "lowest":"4824.5",         //Floor of selling price
     "timestamp":"1591257126461"   //System Timestamp
 }

Response Field

FieldDescription

symbol

Contract name

forwardContractFlag

Is it a forward contract

highest

Maximum Buy Price

lowest

Lowest selling price

timestamp

System timestamp

Get Next Settlement Time

Rate Limit:20 requests per 2 seconds

HTTP Requests Get the time of next settlement.

  • GET /api/swap/v3/market/funding_time

Request Parameter

ParametersTypeRequiredDescription

symbol

String

Yes

Contract name

Response:

{
     "symbol":"cmt_btcusdt",     //Contract name
     "forwardContractFlag":false,     //Is it a forward contract
     "funding_time":"1591282800000"  //time of current funding
 }

Response Field

FieldDescription

symbol

Contract name

forwardContractFlag

Is it a forward contract

funding_time

time of current funding

Funding Rate History

Rate Limit:20 requests per 2 seconds

HTTP Requests Get funding rate history

  • GET /api/swap/v3/market/historyFundRate

Request Parameter

ParametersTypeRequiredDescription

symbol

String

Yes

Contract name

pageIndex

String

Yes

Page number, empty default first page, starting from 1

pageSize

String

Yes

Number of data per page

Response:

 {
     "symbol":"cmt_btcusdt",       //Contract name
     "funding_rate":"0.001",      //current funding rate
     "funding_time":"19238271212"    //Settlement time
 }

Response Field

FieldDescription

symbol

Contract name

funding_rate

Funding rate

funding_time

Settlement time

Mark Price

Rate Limit:20 requests per 2 seconds

HTTP Requests Get the mark price.

  • GET /api/swap/v3/market/mark_price

Request Parameter

ParametersTypeRequiredDescription

symbol

String

Yes

Contract name

Response:

 {
     "symbol":"cmt_btcusdt",       //Contract name
     "mark_price":"8047.87",      //Specify the margin price
     "timestamp":"1591264230941"   //System Timestamp
 }

Response Field

FieldDescription

symbol

Contract name

mark_price

Specify the margin price

timestamp

System timestamp

Last updated