sort: 3 # follow a certain sequence of letters or numbers

Market API

 

Available Futures List

GET /api/v1/perpetual/public

Return:

Parameter Mandatory Type Description Default Value Value Range
code y int status,200:success    
msg y string Tips    
data y object Derivatives Info    

Response

{
    "code": 200,
    "msg": "success",
    "data": [
        {
            "amount24": "3848",
            "base": "btc",
            "code": "btcusd",
            "direction": 1,
            "env": 1,
            "fluctuation": "-10.04",
            "fund": "0.00375",
            "high": "9100",
            "indexPrice": "7913.84",
            "low": "8100",
            "markPrice": "7918.29",
            "maxLever": 100,
            "minQuoteDigit": 2,
            "minTradeDigit": 8,
            "price": "8100",
            "quote": "usd",
            "size24": "4.39717319",
            "totalPosition": "1830",
            "unitAmount": 10
        }
    ],
}
Derivatives InfoReturn:
Parameter Mandatory Type Description Default Value Value Range
code y string Contractcode    
base y string base currency name,如btc、usdt    
quote y string quote currency name,usd,usdt    
direction y string Side 0:Linear Contract,1:Inverse Contract    
minTradeDigit y string Min. transaction decimal places of base currency    
minQuoteDigit y string Min. transaction decimal places of quote currency    
price y string Latest Price    
quote y string quote change    
fluctuation y string quote change    
high y string Highest price    
low y string Lowest price    
amount24 y string 24H Vol.(Cont)    
size24 y string 24H Vol.(Cont)    
totalPosition y string Holdings of lowest price    
fund y string Fee rate    
markPrice y string Mark price    
indexPrice y string Index price    
unitAmount y string quoteFace value of a contract, Default1    
env y string Test or not 0:listing,1:testing    
maxLever y string Max.Leverage    

 

 

 

 

Kline

GET /api/v1/perpetual/public/{contractCode}/candles

Request Parameter:

Path Parameter
Parameter Mandatory Type Description Default Value Value Range
contractCode y string Futurescode    
Query
Parameter Mandatory Type Description Default Value Value Range
kline y string klineType   1min,3min,5min,15min,30min,1hour,2hour,4hour,6hour,12hour,day,week
since n int Timestamp,Default Value0    
size n int Klineamount    
klineType n int KlineType 1 1-Latest Price 2-Mark Price 3-Index Price

Return:

Response

{
    "code":0,
    "data":[
        [
            1543405500000,//time
            "100",//Lowest
            "100",//Highest
            "100",//Open price
            "100",//Close price
            "0",//Transaction Vol.
            "0"//Transaction value
        ]
    ],
    "msg":"success"
}
Parameter Mandatory Type Description Default Value Value Range
code y int status,200:success    
msg y string Tips    
data y object      

 

 

   

 

 

Depth Info

GET /api/v1/perpetual/public/products/{contractCode}/orderbook

Path Parameter
Parameter Mandatory Type Description Default Value Value Range
contractCode y string Futurescode    

 

Response

{
    "asks": [
      //asks
        [
            "9721.47",  //price
            "225",      //(Cont)
            "225"       //Total(Cont)
        ]
    ],
    "bids": [
      //bids
        [
            "9720", 
            "480",
            "480"
        ]
    ]
}

Return:

Parameter Mandatory Type Description Default Value Value Range
asks y object ask    
bids y object bid    

  

 

   

 

 

Latest transaction data

GET /api/v1/perpetual/public/{contractCode}/fills

Request Parameter:

Path Parameter

Parameter|Mandatory|Type|Description|Default Value|Value Range ————- | ————- | ————- | ————- | ————- | ————- contractCode|y|string|Futurescode||

Response

{
    "code": 200,
    "data": [
        [
            "9695.28",  //Deal price
            "496",      //(Cont)
            "long",     //Side
            1582269058972, //time
            9916897     //transactionid
        ]
    ],
    "msg": "success"
}

Return:

Parameter Mandatory Type Description Default Value Value Range
code y string statuscode    
data y object Returnresult    
msg y string Info    

   

Index Price Info

GET /api/v1/perpetual/public/{contractCode}/indexInfo

Request Parameter:

Path Parameter

| Parameter | Mandatory | Type | Description | Default Value | Value Range | | ———— | ——— | —— | ———– | ————- | ———– | | contractCode | y | string | Futurescode | | |

Response

{
    "code": 200,
    "data": {
        "components": [
            {
                "name": "binance_contract",
                "price": "38983.69999999",
                "symbol": "BTC/USDT",
                "wgt": "1"
            }
        ],
        "index": "btc",
        "indexPrice": "38983.69999999",
        "time": 1650269513885
    },
    "msg": "success"
}

Return:

Parameter Type Description Default Value Value Range
components obejct Individual Exchange Index Info    
>name string Exchange Name binance_contract-Binance Futures,binance-Binance,huobi-Huobi,okex-OK  
>price string Price    
>symbol string Trade Pairs    
>wgt number Weight    
index object Index currency    
indexPrice string Index price    
time number Time    

 

 

 

 

 

资金费用历史

GET /api/v1/perpetual/public/{contractCode}/fee-rate

Path Parameter
Parameter Mandatory Type Description Default Value Value Range
contractCode y string Futurescode    
page n int Page    
pageSize n int Size    

 

Return:

Response

{
    "code":200,
    "data":
    {
            "amount24":830768400,
            "contractCode":"etcusd",
            "createdDate":1546603201000,
            "feeRate":-0.00375,
            "id":5,
            "insuranceSize":0,
            "modifyDate":1546603201000,
            "size24":8307684,
            "timeIndex":1546603201000,
            "userPositionAmount":198000000
    },
    "msg":"success"
}

 

Parameter Mandatory Type Description Default Value Value Range
amount24 y string 24H Vol.    
contractCode y string Futurescode    
createdDate y string Creation Time    
feeRate y string Fee rate    
id y string PRIMARY KEYid    
insuranceSize y string Risk Reserves    
modifyDate y string Modify time    
size24 y string 24H Vol.(Cont)    
timeIndex y string Time to generate current data    
userPositionAmount y string Total Holdings    

 

 

Latest Mark price and Fee rate

GET /api/v1/perpetual/public/{contractode}/premiumIndex

Path Parameter
Parameter Mandatory Type Description Default Value Value Range
contractCode y string Futurescode    

 

Return:

Response

{
    "code": 200,
    "data": {
        "baseCurrency": "usdt",
        "contractCode": "btcusdt",
        "estimateFeeRate": "0.00375",
        "indexPrice": "39008.4",
        "lastFeeRate": "0.00375",
        "lastPrice": "41500",
        "markPrice": "39008.4",
        "quoteCurrency": "usdt",
        "time": 1650270347001,
        "totalPosition": "19193"
    },
    "msg": "success"
}

 

Parameter Type Description Default Value Value Range
baseCurrency string Base currency    
contractCode string Contractcode    
estimateFeeRate string EstimateFee rate    
indexPrice string Index price    
lastFeeRate string Last updatedFee rate    
lastPrice string Latest transaction price    
markPrice string Mark price    
quoteCurrency string Quote currency    
time string Update time    
totalPosition string Total Positions