Guides
WebSocket events
Use the WebSocket gateway to receive real-time updates about blockchain and wallet activity.
Events help your backend react quickly. Ledger queries remain the source of truth for final accounting state.
Connect
bash
wscat -c "wss://events.brosettlement.com/v1?organizationId=org_123"Authenticate the connection with the same signed request model used by the REST API.
Event types
| Event | Description |
|---|---|
deposit.detected | A deposit transaction was detected on-chain |
deposit.confirmed | A deposit reached the required confirmation threshold |
withdrawal.created | A withdrawal operation was created |
withdrawal.signed | A withdrawal transaction was signed |
withdrawal.broadcasted | A withdrawal transaction was broadcast to the network |
withdrawal.confirmed | A withdrawal reached the required confirmation threshold |
transaction.failed | A signing, broadcast, or network step failed |
Example event
json
{
"eventId": "evt_123",
"type": "deposit.confirmed",
"organizationId": "org_123",
"walletId": "wal_123",
"chain": "TRON",
"asset": "USDT",
"amount": "2500.00",
"transactionHash": "0x9f2c...",
"confirmations": 20,
"createdAt": "2026-06-25T09:10:00Z"
}Handling rules
- Verify the event
Check the event signature and organization ID before processing the payload.
- Deduplicate
Store eventId and ignore duplicate deliveries.
- Fetch current state
Query the related wallet, operation, or ledger entry before updating customer balances.
- Acknowledge processing
Record the event processing result in your own system for support and audit visibility.