Batch Place Orders
Request URL
POST /ftapi/v1/batchOrders
Request Parameters
| Name | Type | Description |
|---|---|---|
| symbolId | STRING | Trading pair, e.g., BTC-USDT-M |
| side | ENUM | Buy/sell direction: See OrderSide |
| type | ENUM | Order type, see OrderType |
| timeInForce | ENUM | Time in force, see TimeInForce |
| quantity | DECIMAL | Order quantity For a reduce-only order, omitting the quantity means closing the entire position. |
| price | DECIMAL | Order price |
| reduceOnly | BOOLEAN | Reduce only: false = no, true = yes |
| postOnly | BOOLEAN | Post only (Post Only) |
| reverseOrder | BOOLEAN | Reverse Order false = no, true = yes |
| tpSl | Take profit/stop loss | |
| tpTriggerType | ENUM | Take profit trigger type, see TriggerTypeEnum |
| tpPrice | DECIMAL | Take profit price |
| tpExecutePrice | DECIMAL | Take profit execution price |
| slTriggerType | ENUM | Stop loss trigger type, see TriggerTypeEnum |
| slPrice | DECIMAL | Stop loss price |
| slExecutePrice | DECIMAL | Stop loss execution price |
Response Parameters
| Name | Type | Description |
|---|---|---|
| code | STRING | Response Code |
| msg | STRING | Response Message |
| success | BOOLEAN | Success Flag |
| data | BOOLEAN | Data payload |
Request Example
[
{
"symbolId": "BTC-USDT-M",
"side": "BUY",
"price": 106000,
"quantity": 10,
"type": "LIMIT",
"timeInForce": "GTC",
"postOnly": false,
"tpSl": {
"tpTriggerType": "NONE",
"tpPrice": 0,
"tpExecutePrice": 0,
"slTriggerType": "NONE",
"slPrice": 0,
"slExecutePrice": 0
}
},
{
"symbolId": "BTC-USDT-M",
"side": "BUY",
"price": 106000,
"quantity": 10,
"type": "LIMIT",
"timeInForce": "GTC",
"postOnly": false,
"tpSl": {
"tpTriggerType": "NONE",
"tpPrice": 0,
"tpExecutePrice": 0,
"slTriggerType": "NONE",
"slPrice": 0,
"slExecutePrice": 0
}
}
]
Response Example
{
"code": "0",
"data": true,
"msg": "Request successful",
"success": true
}Error Codes
| Error Code | Description |
|---|---|
| 700000 | System error |
| 700001 | Position does not exist |
| 700004 | Invalid request parameters |
| 700008 | Request timeout |
| 700009 | Invalid parameter |
| 700011 | Invalid price |
| 700012 | Invalid order quantity |
| 700013 | Adjust margin exceeds maximum |
| 700016 | Position size in this direction has exceeded the maximum open limit; please adjust risk limit |
| 700017 | Insufficient balance |
| 700018 | Insufficient pending orders |
| 700019 | Invalid leverage multiple |
| 700022 | Insufficient closable quantity |
| 700040 | Trigger price is too close to current price and may be triggered immediately |
| 700041 | Trading not allowed for this contract |
| 700042 | Please select take profit or stop loss |
| 700043 | Take profit trigger price greater than average open price |
| 700044 | Take profit trigger price less than average open price |
| 700045 | Stop loss trigger price less than average open price |
| 700046 | Stop loss trigger price greater than average open price |
| 700047 | Trigger price is too close to open price and may be triggered immediately |
| 700048 | Order status error |
| 700052 | Exceeds maximum order count |
| 700057 | Stop loss trigger price cannot be lower than estimated liquidation price |
| 700058 | Stop loss trigger price cannot be higher than estimated liquidation price |
| 700060 | Order quantity cannot be less than minimum order quantity |
| 700061 | User banned from trading |
| 700062 | User banned from opening positions |
| 700068 | Take profit price must be greater than order price |
| 700069 | Take profit price must be greater than current price |
| 700070 | Stop loss price must be less than order price |
| 700071 | Stop loss price must be less than current price |
| 700072 | Take profit price must be less than order price |
| 700073 | Take profit price must be less than current price |
| 700074 | Stop loss price must be greater than order price |
| 700075 | Stop loss price must be greater than current price |
| 700076 | Take profit price must be greater than mark price |
| 700077 | Take profit price must be less than mark price |
| 700078 | Stop loss price must be greater than mark price |
| 700079 | Stop loss price must be less than mark price |
| 700080 | Stop loss price must be less than liquidation price |
| 700081 | Stop loss price must be greater than liquidation price |
| 700082 | Order quantity cannot be greater than maximum order quantity |
| 700089 | Take profit order price must be greater than open price |
| 700091 | Take profit order price must be less than open price |
| 700093 | Stop loss order price must be less than open price |
| 700095 | Stop loss order price must be greater than open price |
| 700096 | Take profit order price must be greater than latest price |
| 700097 | Take profit order price must be less than latest price |
| 700098 | Stop loss order price must be less than latest price |
| 700099 | Stop loss order price must be greater than latest price |
| 700106 | Order failed, please try again later or contact customer service |
Code Example
Last updated on: