Skip to main content

Account Events

Receive notifications for account-related events, including:

  • Account restrictions and status changes
  • Virtual Account (VA) BCAN code approval status changes
  • Account closure processing

Account Update Event

This event is triggered when an Omni-level account's restrictions or status changes.

Event Structure

{
"id": "event_c4b2c210-ce32-41d4-a9a1-cfad4fdf191c",
"event_type": "ACCOUNT",
"position": "CJO1fxACGAAgADAB",
"timestamp": "2025-03-29T07:02:33.200Z",
"payload": {
"account_id": "036UUF6TQA8CD0KHJPEC000000",
"account_number": "5KT05001",
"account_type": "CASH",
"restrictions": [
"HK_STOCK_NO_TRADE",
"HK_STOCK_LIQUIDATE_ONLY",
"US_STOCK_NO_TRADE",
"US_STOCK_LIQUIDATE_ONLY",
"CN_STOCK_LIQUIDATE_ONLY",
"CN_STOCK_NO_TRADE"
],
"update_time": "2025-03-29T07:02:33.200Z",
"biz_type": "ACCOUNT_UPDATE"
}
}

Response Fields

FieldTypeDescription
idstringUnique event identifier
positionstringCursor for event replay; re-pushes subsequent events within the current business type.
event_typestringEvent type, fixed as ACCOUNT
timestampstringEvent timestamp in ISO 8601 format
payloadobjectEvent payload data

Payload Fields

FieldTypeDescription
account_idstringAccount id
account_numberstringAccount number
account_typestringAccount type: CASH / MARGIN
restrictionsarrayArray of current account restrictions (full snapshot)
update_timestringUpdate timestamp in ISO 8601 format
biz_typestringBusiness type, fixed as ACCOUNT_UPDATE

Restriction Types

The restrictions array contains current account restrictions. Each push provides a complete snapshot of all active restrictions:

Restriction CodeDescription
HK_STOCK_NO_TRADEHong Kong stocks - No trading allowed
HK_STOCK_LIQUIDATE_ONLYHong Kong stocks - Liquidate only (can only close positions)
US_STOCK_NO_TRADEUS stocks - No trading allowed
US_STOCK_LIQUIDATE_ONLYUS stocks - Liquidate only (can only close positions)
CN_STOCK_NO_TRADEChina A-shares - No trading allowed
CN_STOCK_LIQUIDATE_ONLYChina A-shares - Liquidate only (can only close positions)
info
  • Each event push contains a full snapshot of current restrictions, not incremental changes
  • An empty restrictions array means no restrictions are currently active on the account

Virtual Account BCAN Update Event

This event is triggered when a Virtual Account's (VA) BCAN code approval status changes at the exchange.

Event Structure - Approval Success

When the exchange approves the BCAN code, the corresponding category trading permission is granted for the VA account.

{
"id": "event_c4b2c210-ce32-41d4-a9a1-cfad4fdf191c",
"event_type": "ACCOUNT",
"position": "CJO1fxACGAAgADAB",
"timestamp": "2025-03-29T07:02:33.200Z",
"payload": {
"account_id": "O3I8NNB882S2BK7MF1ACJ5UTK9",
"account_number": "VA0000001",
"account_type": "MARGIN",
"type": "CN",
"status": "SUCCESS",
"update_time": "2025-03-29T07:02:33.200Z",
"biz_type": "VIRTUAL_ACCOUNT_BCAN_UPDATE"
}
}

Response Fields

FieldTypeDescription
idstringUnique event identifier
positionstringCursor for event replay; re-pushes subsequent events within the current business type.
event_typestringEvent type, fixed as ACCOUNT
timestampstringEvent timestamp in ISO 8601 format
payloadobjectEvent payload data

Payload Fields

FieldTypeDescription
account_idstringVirtual Account id
account_numberstringVirtual Account number
account_typestringAccount type: CASH / MARGIN
typestringBCAN type, currently only CN (China A-share) is supported
statusstringBCAN status: SUCCESS / FAILED
update_timestringUpdate timestamp in ISO 8601 format
biz_typestringBusiness type, fixed as VIRTUAL_ACCOUNT_BCAN_UPDATE

BCAN Status Values

StatusDescription
SUCCESSBCAN code approved by exchange - Trading permission granted
FAILEDBCAN code rejected by exchange - Trading permission denied

Use Cases

Listening to these events can be used for:

  1. Account Status Monitoring: Track real-time account restriction changes and update UI/access controls accordingly
  2. Trading Permission Management: Automatically enable or disable trading features based on account restrictions
  3. BCAN Status Tracking: Monitor Virtual Account BCAN approval status for China A-share trading
  4. Risk Management: Adjust risk controls and position management when liquidate-only restrictions are applied
  5. Client Notification: Alert clients about account status changes requiring attention or action
  6. Compliance Monitoring: Track account restrictions for regulatory and compliance purposes