Skip to main content

New UM Order (TRADE)

API Description

Place new UM order

HTTP Request

POST /papi/v1/um/order

Request Weight(Order)

1

Request Parameters

NameTypeMandatoryDescription
symbolSTRINGYES
sideENUMYES
positionSideENUMNODefault BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode.
typeENUMYESLIMIT, MARKET
timeInForceENUMNO
quantityDECIMALNO
reduceOnlySTRINGNO"true" or "false". default "false". Cannot be sent in Hedge Mode .
priceDECIMALNO
newClientOrderIdSTRINGNOA unique id among open orders. Automatically generated if not sent. Can only be string following the rule: ^[\.A-Z\:/a-z0-9_-]{1,32}$
newOrderRespTypeENUMNOACK, RESULT, default ACK
priceMatchENUMNOonly avaliable for LIMIT/STOP/TAKE_PROFIT 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
selfTradePreventionModeENUMNONONE: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
goodTillDateLONGNOorder 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 253402300799000Mode. It must be sent in Hedge Mode.
recvWindowLONGNO
timestampLONGYES

Additional mandatory parameters based on type:

TypeAdditional mandatory parameters
LIMITtimeInForce, quantity, price
MARKETquantity
  • If newOrderRespType is sent as RESULT :
    • MARKET order: the final FILLED result of the order will be return directly.
    • LIMIT order with special timeInForce: the final status result of the order(FILLED or EXPIRED) will be returned directly.
  • selfTradePreventionMode is only effective when timeInForce set to IOC or GTC or GTD.
  • In extreme market conditions, timeInForce GTD order auto cancel time might be delayed comparing to goodTillDate

Response Example

{
"clientOrderId": "testOrder",
"cumQty": "0",
"cumQuote": "0",
"executedQty": "0",
"orderId": 22542179,
"avgPrice": "0.00000",
"origQty": "10",
"price": "0",
"reduceOnly": false,
"side": "BUY",
"positionSide": "SHORT",
"status": "NEW",
"symbol": "BTCUSDT",
"timeInForce": "GTD",
"type": "MARKET",
"selfTradePreventionMode": "NONE", //self trading preventation mode
"goodTillDate": 1693207680000, //order pre-set auot cancel time for TIF GTD order
"updateTime": 1566818724722,
"priceMatch": "NONE"
}