WebSocket events

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

EventDescription
deposit.detectedA deposit transaction was detected on-chain
deposit.confirmedA deposit reached the required confirmation threshold
withdrawal.createdA withdrawal operation was created
withdrawal.signedA withdrawal transaction was signed
withdrawal.broadcastedA withdrawal transaction was broadcast to the network
withdrawal.confirmedA withdrawal reached the required confirmation threshold
transaction.failedA 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

  1. Verify the event

Check the event signature and organization ID before processing the payload.

  1. Deduplicate

Store eventId and ignore duplicate deliveries.

  1. Fetch current state

Query the related wallet, operation, or ledger entry before updating customer balances.

  1. Acknowledge processing

Record the event processing result in your own system for support and audit visibility.

Transaction lifecycleSee how observed, signed, broadcasted, confirmed, and failed states fit together.ReconciliationUse events for responsiveness and ledger entries for balance state.