Place Order
- POST /capi/v2/order/placeOrder
Weight(IP): 2, Weight(UID): 5
Request parameters
| Parameter | Type | Required? | Description | 
|---|---|---|---|
| symbol | String | Yes | Trading pair | 
| client_oid | String | Yes | Custom order ID (no more than 40 characters) | 
| size | String | Yes | Order quantity (cannot be zero or negative). | 
| type | String | Yes | 1: Open long, 2: Open short, 3: Close long, 4: Close short | 
| order_type | String | Yes | 0: Normal, 1: Post-Only, 2: Fill-Or-Kill, 3: Immediate Or Cancel | 
| match_price | String | Yes | 0: Limit price, 1: Market price | 
| price | String | Yes | Order price (this is required for limit orders, and its accuracy and step size follow the futures information endpoint) | 
| presetTakeProfitPrice | BigDecimal | Yes | Preset take-profit price | 
| presetStopLossPrice | BigDecimal | Yes | Preset stop-loss price | 
Request example
curl -X POST "https://api-contract.weex.com/capi/v2/order/placeOrder" \
   -H "ACCESS-KEY:*******" \
   -H "ACCESS-SIGN:*" \
   -H "ACCESS-PASSPHRASE:*" \
   -H "ACCESS-TIMESTAMP:1659076670000" \
   -H "locale:zh-CN" \
   -H "Content-Type: application/json" \
   -d '{"symbol": "cmt_bchusdt","client_oid": "111111111222222","size": "1","type": "1","order_type": "0",
     "match_price": "0","price": "100","presetTakeProfitPrice": "105","presetStopLossPrice": "95"}'
Response parameters
| Parameter | Type | Description | 
|---|---|---|
| client_oid | string | Client-generated order identifier | 
| order_id | string | Order ID | 
Response example
{
	"client_oid": null,
	"order_id": "596471064624628269"
}