Skip to main content

ClosePositionResp

statusint32

Status code of the closing order.

typeint32

Event type code of the closing order response.

symbolstring

Market symbol of the closing order (e.g. BTC-PERP).

postOnlyboolean

Whether the closing order is post-only.

orderSidestring

Side of the closing order (opposite to the position direction).

Possible values: [BUY, SELL]

orderIdstring

Server-assigned order id of the closing order.

clOrderIDstring

Client-assigned order id echoed back, if provided in the request.

timestampint64

Server timestamp of the response, in milliseconds since epoch.

pricedouble

Requested limit price of the closing order (0 for market orders).

avgFilledPricedouble

Average fill price achieved so far.

messagestring

Human-readable message describing the result.

originalOrderSizeint64

Original order size at submission, in contracts.

currentOrderSizeint64

Current remaining size on the order book, in contracts.

filledSizeint64

Size filled by the most recent fill event, in contracts.

totalFilledSizeint64

Total size filled since order submission, in contracts.

remainingSizeint64

Size still outstanding on the order, in contracts.

positionModestring

Position mode of the closed position (ONE_WAY or HEDGE).

Possible values: [ONE_WAY, HEDGE, ISOLATED]

positionDirectionstring

Position direction of the closed position (LONG or SHORT).

Possible values: [LONG, SHORT]

positionIdstring

Identifier of the position being closed.

timeInForcestring

Time-in-force applied to the closing order (e.g. GTC, IOC, FOK).

ClosePositionResp
{
"status": 0,
"type": 0,
"symbol": "string",
"postOnly": true,
"orderSide": "BUY",
"orderId": "string",
"clOrderID": "string",
"timestamp": 0,
"price": 0,
"avgFilledPrice": 0,
"message": "string",
"originalOrderSize": 0,
"currentOrderSize": 0,
"filledSize": 0,
"totalFilledSize": 0,
"remainingSize": 0,
"positionMode": "ONE_WAY",
"positionDirection": "LONG",
"positionId": "string",
"timeInForce": "string"
}