Skip to content
Account Profile & Status

Close Account

Closes a securities account.

Request parameters

  • Required: account_no (securities account)
  • See the field definitions for each field's format, allowed values, and business meaning.

Business notes

Closing requires prerequisites to be met (for example, zero account assets and no in-flight orders). If they are not met, a corresponding error code is returned (such as 404062, 404092, 404093).

If the account had asset changes today, the call returns 404089 (ASSETS_CHANGED) and the account cannot be closed today; retry on the next ledger day. The code starts with 404 but does not mean the endpoint path is missing.

Risk warning

This operation is irreversible — a closed account cannot be restored. Before calling, be certain the target securities account is correct and all closing prerequisites are satisfied.

Result

On success, the account is closed. The resulting state is defined by the 200 response.

POSThttps://b-api.lbkrs.com/v1/whaleapi/account/close

Authorization

AuthorizationstringheaderRequired

Send the Broker ACCESS_TOKEN as Authorization: Bearer <token>.

Permission

account.last_approve_account_cancellation

The Broker ACCESS_TOKEN must be granted the permission above, or the call will be rejected.

Request body application/json

account_nostringrequired

Account Number. Account Number

account_no is the securities account number (such as L6VQEU00121996). It differs from the customer ID member_id and the internal securities account ID aaid.

Responses

HTTP 200Success
HTTP 400Bad request. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 401The user is not authenticated, or the login session has expired.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 403The current account is not authorized to use this feature. Grant the required permission to the account in User Permission.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 408The request timed out. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

Whale Docs