Place Order
Description
Place an order in futures trading.
HTTP Request
POST /v3/trade/order
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| symbol | Yes | String | A trading pair, consisting of two currencies: base currency and quote currency |
| side | Yes | String | Enumerate: BUY and SELL |
| mgnMode | Yes | String | Margin modeCROSS、ISOLATED, Required in LONG/SHORT mode, linked with posSide in buy/sell mode, either fill in all or leave them blank |
| posSide | Yes | String | Required in two-way position mode, and only LONG or SHORT can be selected,It is required in LONG/SHORT mode and linked with mgnMode in Buy/Sell mode. Either BOTH fields are filled in or BOTH fields are left blank. |
| type | Yes | String | Order type; enumerate MARKET, LIMIT, and LIMIT_MAKER |
| clOrdId | No | String | Order ID as assigned by the user |
| px | No | String | Price, applicable for limit orders only. No price input is required for market orders. |
| sz | Yes | String | Order size, specifically in Cont |
| reduceOnly | No | Boolean | Reduce only |
| timeInForce | No | String | Enumerate FOK, IOC, and GTC. It is an optional field with GTC by default. |
| stpMode | No | String | Enumerate - EXPIRE_TAKER - EXPIRE_MAKER - EXPIRE_BOTH Default is NONE |
Note:
posSide
- Position side, this parameter is not mandatory in
BOTHmode. If you pass it through, the only valid value isBOTH. - In long/short mode, it is mandatory. Valid values are
LONGorSHORT. - In long/short mode, side and posSide need to be specified in the combinations below:
- Open long: buy and open long (side: fill in
BUY; posSide: fill inLONG) - Open short: sell and open short (side: fill in
SELL; posSide: fill inSHORT) - Close long: sell and close long (side: fill in
SELL; posSide: fill inLONG) - Close short: buy and close short (side: fill in
BUY; posSide: fill inSHORT)
- Open long: buy and open long (side: fill in
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| ordId | String | Order ID |
| clOrdId | String | Client Order ID as assigned by the client |
Request Example
{
"clOrdId": "939a9d51-8f32-443a-9fb8-ff0852010487",
"symbol": "BTC_USDT_PERP",
"side": "buy",
"mgnMode": "CROSS",
"posSide": "LONG",
"type": "limit_maker",
"px": "46050",
"sz": "10",
"timeInForce": "GTC",
"stpMode": "EXPIRE_TAKER",
"reduceOnly": false
}
Response Example
{
"code":200,
"data":{
"clOrdId":"939a9d51-8f32-443a-9fb8-ff0852010487",
"ordId":"331375826421678080"
},
"msg":"Success"
}