New Order(TRADE)
API Description
Send in a new order.
Method
order.place
Request
{
"id": "3f7df6e3-2df4-44b9-9919-d2f38f90a99a",
"method": "order.place",
"params": {
"apiKey": "HMOchcfii9ZRZnhjp2XjGXhsOBd6msAhKz9joQaWwZ7arcJTlD2hGPHQj1lGdTjR",
"positionSide": "BOTH",
"price": 43187.00,
"quantity": 0.1,
"side": "BUY",
"symbol": "BTCUSDT",
"timeInForce": "GTC",
"timestamp": 1702555533821,
"type": "LIMIT",
"signature": "0f04368b2d22aafd0ggc8809ea34297eff602272917b5f01267db4efbc1c9422"
}
}
Request Weight
0
Request Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| symbol | STRING | YES | |
| side | ENUM | YES | |
| positionSide | ENUM | NO | Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. |
| type | ENUM | YES | |
| timeInForce | ENUM | NO | |
| quantity | DECIMAL | NO | |
| reduceOnly | STRING | NO | "true" or "false". default "false". Cannot be sent in Hedge Mode |
| price | DECIMAL | NO | |
| newClientOrderId | STRING | NO | A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: ^[\.A-Z\:/a-z0-9_-]{1,36}$ |
| newOrderRespType | ENUM | NO | "ACK", "RESULT", default "ACK" |
| priceMatch | ENUM | NO | only available for LIMIT order; can be set to OPPONENT/ OPPONENT_5/ OPPONENT_10/ OPPONENT_20/ QUEUE/ QUEUE_5/ QUEUE_10/ QUEUE_20; Can't be passed together with price |
| selfTradePreventionMode | ENUM | NO | NONE:No STP / EXPIRE_TAKER:expire taker order when STP triggers/ EXPIRE_MAKER:expire taker order when STP triggers/ EXPIRE_BOTH:expire both orders when STP triggers; default NONE |
| goodTillDate | LONG | NO | order cancel time for timeInForce GTD, mandatory when timeInforce set to GTD; order the timestamp only retains second-level precision, ms part will be ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds and smaller than 253402300799000 |
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
Additional mandatory parameters based on type:
| Type | Additional mandatory parameters |
|---|---|
LIMIT | timeInForce, quantity, price |
MARKET | quantity |
- If
newOrderRespTypeis sent asRESULT:
MARKETorder: the final FILLED result of the order will be return directly.LIMITorder with specialtimeInForce: the final status result of the order(FILLED or EXPIRED) will be returned directly.selfTradePreventionModeis only effective whentimeInForceset toIOCorGTCorGTD.- In extreme market conditions, timeInForce
GTDorder auto cancel time might be delayed comparing togoodTillDate
Response Example
{
"id": "3f7df6e3-2df4-44b9-9919-d2f38f90a99a",
"status": 200,
"result": {
"orderId": 325078477,
"symbol": "BTCUSDT",
"status": "NEW",
"clientOrderId": "iCXL1BywlBaf2sesNUrVl3",
"price": "43187.00",
"avgPrice": "0.00", // Will be removed after CM migration
"origQty": "0.100",
"executedQty": "0.000",
"cumQty": "0.000",
"cumQuote": "0.00000", // Will be removed after CM migration
"timeInForce": "GTC",
"type": "LIMIT",
"reduceOnly": false,
"closePosition": false,
"side": "BUY",
"positionSide": "BOTH",
"stopPrice": "0.00",
"workingType": "CONTRACT_PRICE",
"priceProtect": false,
"origType": "LIMIT",
"priceMatch": "NONE",
"selfTradePreventionMode": "NONE",
"goodTillDate": 0,
"updateTime": 1702555534435
},
"rateLimits": [
{
"rateLimitType": "ORDERS",
"interval": "SECOND",
"intervalNum": 10,
"limit": 300,
"count": 1
},
{
"rateLimitType": "ORDERS",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 1200,
"count": 1
},
{
"rateLimitType": "REQUEST_WEIGHT",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 2400,
"count": 1
}
]
}