Skip to content
Account Profile & Status

Update Account State/Disable Account

This interface is used to update the status of a specified securities account. By providing the account number account_no and the target state to_state, the account can be switched to the specified status, supporting three operations: activate (active), suspend (suspend), and disable (disable).

POSThttps://b-api.longbridge.xyz/v1/whaleapi/account/change_account_state

Authorization

AuthorizationstringheaderRequired

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

Request body application/json

account_nostringrequired

Account Number. Account Number

to_statestringrequired

To State 更改账户状态action,修改帐号状态到 active

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