Skip to main content

Close At Market Price

Description​

Close orders at market price.

HTTP Request​

POST /v3/trade/position

Request Parameters​

ParameterRequiredTypeDescription
symbolYesStringAll positions will be closed if the symbol field is empty.
mgnModeYesStringMargin mode, CROSS ISOLATED
posSideNoStringPosition side. This parameter can be omitted in BOTH mode, and the default value is BOTH. You can only fill with BOTH.This parameter must be filled in under the LONG/SHORT mode. Fill in LONG for close-LONG and SHORT for close-SHORT.
clOrdIdNoStringClient Order ID as assigned by the client

Response Parameters​

ParameterTypeDescription
ordIdStringOrder ID
clOrdIdStringOrder ID as assigned by the user

Request Example​

{
"symbol":"BTC_USDT_PERP",
"mgnMode":"CROSS",
"clOrdId":"12345"
}

Response Example​

{
"code":200,
"data":{
"clOrdId":"12345",
"ordId":"331380687661957120"
},
"msg":"Success"
}