Account Balance update

Account balance change notification provides information about the current account balance. A notification is emitted whenever the account balance changes for the following account types:

  • available
  • collateral

Note: The x-zh-hook-payload-type must be set to account_balance.changed.

The schema of the event payload will follow the existing private websocket balance updates feed.

The following examples illustrate different movements which cause balance updates.

deposit movement:

{
    "account_group": "PLAT01",
    "account_label": "general",
    "account_type": "available",
    "asset": "USD",
    "balance": "10",
    "movements": [
        {
            "account_id": "363d0c5f-1163-47c9-8de2-97cfbecdd1e6",
            "change": "10.00",
            "deposit_reference_id": "be2e16a9-32a7-4e25-b255-031a17c7615b",
            "movement_id": "bcc65fa1-1a1d-4a77-9f0b-cad3968b50db",
            "movement_timestamp": 1746112989822,
            "movement_type": "deposit"
        }
    ],
    "participant_code": "PART01",
    "run_id": "4149614",
    "run_type": "deposit",
    "timestamp": 1743593652
}

withdrawal movement:

{
    "account_group": "N2833C",
    "account_label": "general",
    "account_type": "collateral",
    "asset": "SOL",
    "balance": "0.01",
    "movements": [
        {
            "account_id": "a33bb05d-7e06-4069-921d-a83deebfc319",
            "change": "0.01",
            "movement_id": "c979b77b-80a0-49da-b287-0cc044731954",
            "movement_timestamp": 1746113199139,
            "movement_type": "withdrawal_pending",
            "withdrawal_request_id": "44b23087-8845-4667-9fa8-03b7055dba6b"
        }
    ],
    "participant_code": "PART01",
    "run_id": "4150535",
    "run_type": "withdrawal",
    "timestamp": 1746113199073
}

transfer movement:

{
    "account_group": "F12JE6",
    "account_label": "general",
    "account_type": "available",
    "asset": "USD",
    "balance": "5",
    "movements": [
        {
            "account_id": "efeb40fe-aaf1-4132-8fbc-036e7612f7db",
            "change": "5",
            "movement_id": "b96daa8d-960a-4c50-acc1-af9c1c9c178b",
            "movement_timestamp": 1746112183373,
            "movement_type": "transfer",
            "transfer_request_id": "339910",
            "transfer_type": "trade_allocation"
        }
    ],
    "participant_code": "45JM2Q",
    "run_id": "4150531",
    "run_type": "transfer",
    "timestamp": 1746112183373
}

trade movement:

{
    "account_group": "F12JE6",
    "account_label": "general",
    "account_type": "available",
    "asset": "BTC",
    "balance": "0.00015102",
    "movements": [
        {
            "account_id": "5c01c19f-507b-43cf-a370-a8e6de1a71ac",
            "change": "0.00005134",
            "movement_id": "f16e0fad-e573-46da-a3a1-465a5a348648",
            "movement_timestamp": 1746112200938,
            "movement_type": "final_settlement_outstanding",
            "trade_id": "829ddc5b-c299-4bd1-b4ca-f0b3f9875371"
        }
    ],
    "participant_code": "45JM2Q",
    "run_id": "4150532",
    "run_type": "settlement",
    "timestamp": 1746112200847
}