Contract Orders
Place an order
POST /v1/contract/order/single
Module | Type | Resource Isolation Type | Rate Limit |
Contract Order(CONTRACT_ORDER) | Submit(SUBMIT) | Trading Pair(SYMBOL) | 5 |
Parameters
Name | Type | Required | Description |
symbol | String | Yes | Trading pair,eg.BTC/USDT |
side | String | Yes | Trading direction,Available values:BUY,SELL |
positionType | String | Yes | Position type,Available values:ALL,SINGLE |
positionSide | String | Yes | Position direction,Available values:BOTH,LONG,SHORT |
type | String | Yes | Order type,Available values:LIMIT,MARKET,PLAN_LIMIT,PLAN_MARKET |
price | Decimal | No | Order price |
volume | Integer | Yes | Order trading volume |
triggerType | String | No | Plan order trigger type,Available values:MARK_PRICE,CONTRACT_PRICE |
triggerPrice | Decimal | No | Plan order trigger price |
clientOrderId | String | No | User-defined order ID (maximum length of 32 characters, must be unique) |
Response Parameters
Name | Type | Description |
orderId | Long | Order ID |
clientOrderId | String | User-defined order ID (if provided) |
Request Example
Response Example
Batch Order Placement
POST /v1/contract/order/batch
Module | Type | Resource Isolation Type | Rate Limit |
Contract Order(CONTRACT_ORDER) | Submit(SUBMIT) | Trading Pair(SYMBOL) | 5 |
Parameters
Name | Type | Required | Description |
| Array | Yes | Array of parameters, a batch can contain up to 10 orders |
symbol | String | Yes | Trading pair,eg.BTC/USDT |
side | String | Yes | Trading direction,Available values:BUY,SELL |
positionType | String | Yes | Position type,Available values:ALL,SINGLE |
positionSide | String | Yes | Position direction,Available values:BOTH,LONG,SHORT |
type | String | Yes | Order type,Available values:LIMIT,MARKET,PLAN_LIMIT,PLAN_MARKET |
price | Decimal | No | Order price |
volume | Integer | Yes | Order trading volume |
triggerType | String | No | Plan order trigger type,Available values:MARK_PRICE,CONTRACT_PRICE |
triggerPrice | Decimal | No | Plan order trigger price |
clientOrderId | String | No | User-defined order ID (maximum length of 32 characters, must be unique) |
Response Parameters
Name | Type | Description |
orderId | Long | Order ID |
clientOrderId | String | User-defined order ID (if provided) |
errCode | String | Order rejection error code (only applicable for rejected orders) |
errMsg | String | Order rejection error message (only applicable for rejected orders) |
Request Example
Response Example
Adjust Order Leverage
POST /v1/contract/order/leverage
Module | Type | Resource Isolation Type | Rate Limit |
Contract Order(CONTRACT_ORDER) | Submit(SUBMIT) | Trading Pair(SYMBOL) | 5 |
Parameters
Name | Type | Required | Description |
symbol | String | Yes | Trading Pair |
leverage | Integer | Yes | Leverage |
Response Parameters
Name | Type | Description |
symbol | String | Trading Pair |
leverage | Integer | Leverage |
Request Example
Response Example
Cancel Order
POST /v1/contract/order/cancel
Module | Type | Resource Isolation Type | Rate Limit |
Contract Order(CONTRACT_ORDER) | Submit(SUBMIT) | Trading Pair(SYMBOL) | 5 |
Parameters
Name | Type | Required | Description |
symbol | String | Yes | Trading Pair |
orderId | Long | Yes | Order ID |
clientOrderId | String | No | User-defined order ID (maximum length of 32 characters, must be unique) |
Response Parameters
Name | Type | Description |
orderId | Long | Order ID |
clientOrderId | String | User-defined order ID (if provided) |
errCode | String | Order rejection error code (only applicable for rejected orders) |
errMsg | String | Order rejection error message (only applicable for rejected orders) |
Request Example
Response Example
Batch Cancel Orders
POST /v1/contract/order/cancel/batch
Module | Type | Resource Isolation Type | Rate Limit |
Contract Order(CONTRACT_ORDER) | Submit(SUBMIT) | Trading Pair(SYMBOL) | 5 |
Parameters
Name | Type | Required | Description |
symbol | String | Yes | Trading Pair |
orderIds | Array | No | Order IDs, separated by commas, (either orderIds or clientOrderIds must be provided, can only choose one, up to 50 orders). It's recommended to use orderIds for cancellation, which is faster and more stable than clientOrderIds. No more than 50 orders at a time. |
clientOrderIds | Array | No | User-defined order IDs, separated by commas, (either orderIds or clientOrderIds must be provided, can only choose one, up to 50 orders). It's recommended to use orderIds for cancellation, which is faster and more stable than clientOrderIds. No more than 50 orders at a time. |
Response Parameters
Name | Type | Description |
orderId | Long | Order ID |
clientOrderId | String | User-defined order ID (if provided) |
errCode | String | Order rejection error code (only applicable for rejected orders) |
errMsg | String | Order rejection error message (only applicable for rejected orders) |
Request Example
Response Example
Query unfilled orders
GET /v1/contract/order/open
Module | Type | Resource Isolation Type | Rate Limit |
Contract Order(CONTRACT_ORDER) | Query(QUERY) | Trading Pair(SYMBOL) | 5 |
Parameters
Name | Type | Required | Description |
symbol | String | Yes | Trading Pair |
direction | String | No | Trading direction,Available values:BUY,SELL |
positionSide | String | No | Position direction,Available values:BOTH,LONG,SHORT |
types | Array | No | Combination of order types to query, separated by commas,Available values:LIMIT,MARKET,PLAN_LIMIT,PLAN_MARKET |
limit | Integer | No | Number of orders to return, maximum value is 500 |
Response Parameters
Name | Type | Description |
symbol | String | Trading Pair |
orderId | Long | Order ID |
clientOrderId | String | User-defined order ID (if provided) |
positionType | String | Position type:ALL,SINGLE |
positionSide | String | Position direction:BOTH,LONG,SHORT |
type | String | Order type:LIMIT,MARKET,PLAN_LIMIT,PLAN_MARKET |
side | String | Trading direction:BUY,SELL |
price | BigDecimal | Order price |
volume | Integer | Order trading volume |
triggerPrice | BigDecimal | Plan order trigger price |
triggerType | Integer | Plan order trigger type,1:mark price,2:latest price |
dealVolume | Integer | Transaction quantity |
leverageLevel | Integer | Leverage |
multiplier | BigDecimal | Multiplier |
avgPrice | BigDecimal | Average transaction price |
freezeAmount | BigDecimal | Freeze margin |
feeAmount | BigDecimal | Fee |
feeRateMaker | Double | Maker rate |
feeRateTaker | Double | Taker rate |
Request Example
Response Example
Query historical orders
GET /v1/contract/order/history
Module | Type | Resource Isolation Type | Rate Limit |
Contract Order(CONTRACT_ORDER) | Query(QUERY) | Trading Pair(SYMBOL) | 5 |
Parameters
Name | Type | Required | Description |
symbol | String | Yes | Trading Pair |
direction | String | No | Trading direction,Available values:BUY,SELL |
positionSide | String | No | Position direction,Available values:BOTH,LONG,SHORT |
types | Array | No | Combination of order types to query, separated by commas,Available values:LIMIT,MARKET,PLAN_LIMIT,PLAN_MARKET |
limit | Integer | No | Number of orders to return, default value is 100,maximum value is 500 |
Response Parameters
Name | Type | Description |
symbol | String | Trading Pair |
orderId | Long | Order ID |
clientOrderId | String | User-defined order ID (if provided) |
positionType | String | Position type:ALL,SINGLE |
positionSide | String | Position direction:BOTH,LONG,SHORT |
type | String | Order type:LIMIT,MARKET,PLAN_LIMIT,PLAN_MARKET |
side | String | Trading direction:BUY,SELL |
price | BigDecimal | Order price |
volume | Integer | Order trading volume |
triggerPrice | BigDecimal | Plan order trigger price |
triggerType | Integer | Plan order trigger type,1:mark price,2:latest price |
dealVolume | Integer | The number of transactions |
leverageLevel | Integer | Leverage Level |
multiplier | BigDecimal | Multiplier |
avgPrice | BigDecimal | Average transaction price |
freezeAmount | BigDecimal | Freeze margin |
feeAmount | BigDecimal | Fee |
feeRateMaker | Double | Maker rate |
feeRateTaker | Double | Taker rate |
realizedAmount | BigDecimal | Realized profit and loss |
refundMarginAmount | BigDecimal | Returned margin |
status | Integer | Order Status:2 All completed,3 Partially completed,4 Cancelled,8 Execution succeed, 9 Execution failed |
canceledVolume | Integer | Cancellation quantity |
canceledUserType | Integer | Operator type,0: Not revoked,1:system,2:user |
canceledDate | Date | Cancellation time |
earningRate | BigDecimal | Earning rate |
Request Example
Response Example
Query user fee rate
GET /v1/contract/order/fee-rate
Module | Type | Resource Isolation Type | Rate Limit |
Contract Order(CONTRACT_ORDER) | Submit(QUERY) | Trading Pair(SYMBOL) | 5 |
Parameters
Name | Type | Required | Description |
symbol | String | Yes | Trading Pair |
Response Parameters
Name | Type | Description |
symbol | String | Trading Pair |
openTakerFeeRate | BigDecimal | Opening fee rate for taker |
openMakerFeeRate | BigDecimal | Opening fee rate for marker |
closeTakerFeeRate | BigDecimal | closing fee rate for taker |
closeMakerFeeRate | BigDecimal | closing fee rate for takermaker |
Request Example
Response Example