Enable or disable Hong Kong closing-only mode
POST{BASE_URL}/accounts/mode/closing-only
Turns closing-only mode on (status: true) or off (status: false)
for a Hong Kong account that the API key can access.
While closing-only mode is on, new orders and modify requests are
accepted only when position_effect is close. Anything else is
rejected with 400 DisallowedOrderAction_Error ("account is in
close-only mode"). Cancel requests are unaffected, and working orders
are not cancelled. Orders placed by Atomic Vaults operations are not
blocked. If the account is also frozen, the freeze applies first.
status defaults to false, so a request without it turns
closing-only mode off. On success the body is an empty JSON object.
Request
Responses
- 200
- 400
- 401
- 403
Account mode updated. The body is an empty JSON object.
The request could not be accepted, for example because the account or
symbol is unavailable, a required paired account is missing, buying power
or position is insufficient, required market pricing is unavailable, an
identifier is duplicated, or an order field or requested lifecycle action
is invalid. A missing account_number, or one not linked to the API key,
also returns 400 BasicInput_Error.
Missing or invalid X-API-KEY.
The API key is read-only and the request is not a GET.