Developer Portal

Reverse PositionPOST

Closes an open position with a market order and, on terminal fill, automatically opens an opposing position with the same filled quantity.

View as Markdown
POST
/accounts/{account_id}/positions/{position_id}/reverse

Authorization

AuthorizationRequiredBearer <token>

JWT token obtained from the login endpoint

In: header

Path Parameters

account_idRequiredstring

The account ID where the position to reverse belongs

position_idRequiredstring

Position ID to reverse

curl -X POST "http://localhost:8081/api/v1/accounts/<string>/positions/pos_123456/reverse" \
  -H "Authorization: Bearer <token>"

Position reverse closing order created successfully

{
  "closing_order_id": "ord_reverse_close_123456"
}