# Contract Market

# Query Funding Rate

GET /v1/contract/market/funding-rate

Module Type Resource Isolation Type Rate Limit
Contract Market(CONTRACT_MARKET) Query(QUERY) 5

# Parameters

Name Type Required Description
symbol String Yes Trading pair

# Response Parameters

Name Type Description
symbol String Trading pair
fundingRate BigDecimal Funding rate
fundingTime Long Funding time

# Request Example

GET /v1/contract/market/funding-rate?symbol=BTC/USDT

# Response Example

{
	"code": "200",
	"message": "OK",
	"timestamp": "1704799591872",
	"data": {
		"symbol": "BTC/USDT",
		"fundingRate": "0.0001",
		"fundingTime": "1704799590638"
	}
}

# Query Funding Rate History

GET /v1/contract/market/funding-rate/history

Module Type Resource Isolation Type Rate Limit
Contract Market(CONTRACT_MARKET) Query(QUERY) 5

# Parameters

Name Type Required Description
symbol String Yes Trading pair
startTime Date No Start time,Format:yyyy-MM-dd HH:mm:ss
endTime Date No End time,Format:yyyy-MM-dd HH:mm:ss
limit Integer No Number of returned records, default 100, maximum value 500

# Response Parameters

Name Type Description
symbol String Trading pair
fundingRate BigDecimal Funding rate
fundingTime Long Funding time

# Request Example

GET /v1/contract/market/funding-rate/history?symbol=BTC/USDT

# Response Example

{
	"code": "200",
	"message": "OK",
	"timestamp": "1704873662671",
	"data": [
		{
            "symbol": "BTC/USDT",
            "fundingRate": "0.0001",
            "fundingTime": "1704844800000"
		},
		{
            "symbol": "BTC/USDT",
            "fundingRate": "0.0001",
            "fundingTime": "1704816000000"
		}
	]
}

# Query Recent Trade Records

GET /v1/contract/market/trades

Module Type Resource Isolation Type Rate Limit
Contract Market(CONTRACT_MARKET) Query(QUERY) 5

# Parameters

Name Type Required Description
symbol String Yes Trading pair
limit Integer No Number of returned records, default 500, maximum value 500

# Response Parameters

Name Type Description
symbol String Trading pair
price BigDecimal Trading price
amount BigDecimal Trading volume
direction String Trading direction:BUY,SELL
timestamp Long Trading timestamp

# Request Example

GET /v1/contract/market/trades?symbol=BTC/USDT

# Response Example

{
	"code": "200",
	"message": "OK",
	"timestamp": "1705890036357",
	"data": [
		{
            "symbol": "BTC/USDT",
            "price": "45672.7",
            "amount": "40",
            "direction": "BUY",
            "timestamp": "1705874641022"
		},
		{
            "symbol": "BTC/USDT",
            "price": "45695.9",
            "amount": "360",
            "direction": "SELL",
            "timestamp": "1705874641022"
		}
	]
}

# Query Trading Pair

GET /v1/contract/market/symbols

Module Type Resource Isolation Type Rate Limit
Contract Market(CONTRACT_MARKET) Query(QUERY) 1

# Parameters

NONE

# Response Parameters

Name Type Description
base String Underlying currency
quote String Price currency
contractType String Contract type:E(Perpetual contract)
multiplier BigDecimal Contract multiplier
status Integer Trading status:0 Not tradable,1 tradable
showStatus Integer Shelf status:0 on,1 off
sysBidHoldMax Long Maximum net long position on the platform
sysAskHoldMax Long Maximum net short position on the platform
bidOrderMax Integer Maximum number of single long orders
bidOrderMin Integer Minimum number of single long orders
askOrderMax Integer Maximum number of single short orders
askOrderMin Integer Minimum number of single short orders
bidEntrustMax Long Maximum number of user long orders
askEntrustMax Long Maximum number of user short orders
entrustMax Long Maximum total number of orders placed by a user
leverMax Integer Maximum leverage
leverMin Integer Minimum leverage
priceChangeMin BigDecimal Minimum price change
feePrecision BigDecimal Fee accuracy
fundingAdjustRate BigDecimal Funding rate adjustment value
liquidateRate BigDecimal Forced liquidation fee
limitOrderBidPirceUpLimit BigDecimal Limit buy price cap
limitOrderAskPirceDownLimit BigDecimal Limit buy price lower
maxOrderPrice BigDecimal The maximum price for placing a limit order
minOrderPrice BigDecimal The minimum price for placing a limit order
marketPriceThreshold BigDecimal Market price protection threshold
openMakerFee BigDecimal Opening fee rate for maker
openTakerFee BigDecimal Opening fee rate for taker
closeMakerFee BigDecimal Closing fee rate for maker
closeTakerFee BigDecimal Closing fee rate for taker

# Request Example

GET /v1/contract/market/symbols

# Response Example

{
	"code": "200",
	"message": "OK",
	"timestamp": "1704963409455",
	"data": [
		{
		    "base": "BTC",
		    "quote": "USDT",
	            "contractType": "E",
	            "multiplier": "0.0001",
	            "status": 1,
	            "showStatus": 1,
	            "sysBidHoldMax": "999999999999",
	            "sysAskHoldMax": "999999999999",
	            "bidOrderMax": 277777778,
	            "bidOrderMin": 10,
	            "askOrderMax": 277777778,
	            "askOrderMin": 10,
	            "bidEntrustMax": "277777778",
	            "askEntrustMax": "277777778",
	            "entrustMax": "50",
	            "leverMax": 200,
	            "leverMin": 1,
	            "priceChangeMin": "0.01",
	            "feePrecision": "0.001",
	            "fundingAdjustRate": "0",
	            "liquidateRate": "0.006",
	            "limitOrderBidPirceUpLimit": "0.1",
	            "limitOrderAskPirceDownLimit": "0.1",
	            "maxOrderPrice": "100000",
	            "minOrderPrice": "10",
	            "marketPriceThreshold": "0.005",
	            "openMakerFee": "0.0002",
	            "openTakerFee": "0.0002",
	            "closeMakerFee": "0.0002",
	            "closeTakerFee": "0.0002"
		}
	]
}

# Query Depth Data

GET /v1/contract/market/depth

Module Type Resource Isolation Type Rate Limit
Contract Market(CONTRACT_MARKET) Query(QUERY) 1

# Parameters

Name Type Required Description
symbol String Yes Trading pair
limit Integer No Number of depth levels to be returned, available values:[5, 10, 20, 50, 100, 500],default100

# Response Parameters

Name Type Description
bids array All current buy orders [price, size, size]
asks array All current buy orders [price, size, size]
timestamp Long Timestamp

# Request Example

GET /v1/contract/market/depth?symbol=BTC/USDT&limit=5

# Response Example

{
	"code": "200",
	"message": "OK",
	"timestamp": "1705042807484",
	"data": {
		"bids": [
			[
				"46153.8",
				"0",
				"477"
			],
			[
				"46153.6",
				"0",
				"435"
			],
			[
				"46153.3",
				"0",
				"393"
			],
			[
				"46153.1",
				"0",
				"394"
			],
			[
				"46152.9",
				"0",
				"399"
			]
		],
		"asks": [
			[
				"46154.2",
				"0",
				"364"
			],
			[
				"46154.4",
				"0",
				"375"
			],
			[
				"46154.6",
				"0",
				"476"
			],
			[
				"46154.8",
				"0",
				"498"
			],
			[
				"46155.0",
				"0",
				"484"
			]
		],
		"timestamp": "1705042807484"
	}
}

# Query K-Line

GET /v1/contract/market/klines

Module Type Resource Isolation Type Rate Limit
Contract Market(CONTRACT_MARKET) Query(QUERY) 5

# Parameters

Name Type Required Description
symbol String Yes Trading pair
period String Yes Time granularity of returned data, which corresponds to the time interval of each candlestick, available options: [1min,5min,15min,30min,60min,4hour,1day,1mon,1week]
limit Integer No Number of K-line data to be returned, available values: [1,1000],default 100

# Response Parameters

Name Type Description
id Long Timestamp in UTC, in seconds, used as the id for this candlestick
symbol String Trading pair
period String Time granularity
open BigDecimal Opening price in this period
close BigDecimal Closing price in this period
low BigDecimal Lowest price in this period
high BigDecimal Highest price in this period
vol BigDecimal Trading volume measured in the quote currency
amount BigDecimal Trading volume measured in the base currency
count Integer Number of trades
time Long Time

# Request Example

GET /v1/contract/market/klines?limit=1&period=1min&symbol=BTC/USDT

# Response Example

{
	"code": "200",
	"message": "OK",
	"timestamp": "1714442460000",
	"data": [
		{
		    "id": "1714442460000",
	            "time": "1714442460000",
	            "amount": "10830453.7066",
	            "count": "117",
	            "open": "63508",
	            "close": "63367",
	            "low": "63309.9",
	            "high": "63518",
	            "vol": "170.881",
	            "symbol": "btcusdt",
	            "period": "1min"
		}
	]
}