Skip to main content

ClosePositionReq

symbolstringrequired

Market symbol of the position to close (e.g. BTC-PERP).

positionIdstringrequired

Identifier of the position to close.

orderTypestringrequired

Order type used to close the position (LIMIT or MARKET).

Possible values: [LIMIT, MARKET, OCO, TWAP, PEG, CONDITIONAL, TRAILING]

orderPricedouble

Limit price for the closing order. Required when orderType == LIMIT.

postOnlyboolean

If true, the closing order will only be placed as a maker; otherwise it is cancelled.

timeInForcestring

Time-in-force for the closing order. Defaults to GTC when omitted.

Possible values: [FOK, GTC, IOC, HALFSEC, HALFMIN, FIVEMIN, HOUR, TWELVEHOUR, DAY, WEEK, MONTH]

Default value: GTC
clOrderIdstring

Optional client-assigned order id echoed back in the response.

ClosePositionReq
{
"symbol": "string",
"positionId": "string",
"orderType": "LIMIT",
"orderPrice": 0,
"postOnly": true,
"timeInForce": "GTC",
"clOrderId": "string"
}