Definition and scope
Using WebSocket Subscriptions for Live XRPL Data addresses a distinct part of developer guides. Receive ledger, transaction, account, book, and server events over a persistent connection.
Reliable XRPL applications do more than submit JSON. They choose appropriate server connections, manage pagination and subscriptions, construct and sign transactions safely, interpret tentative and validated results, and recover cleanly from interruption. Applications must preserve exact amounts, protect signing material, handle retries idempotently, and reconcile against validated ledgers.
How it works
The subscribe method can stream ledger closures, transactions, account activity, order-book changes, validations, and server events. Clients must maintain the socket, route event types, and recover missed state after disconnects.
- subscribe: verify this field, object, or component against the cited protocol documentation.
- streams: verify this field, object, or component against the cited protocol documentation.
- accounts: verify this field, object, or component against the cited protocol documentation.
- books: verify this field, object, or component against the cited protocol documentation.
- ledgerClosed: verify this field, object, or component against the cited protocol documentation.
Practical example and checks
Subscribe to validated ledger and account streams, persist the last processed ledger index, reconnect with bounded backoff, and query the gap before resuming live processing.
For production use, preserve the exact signed or queried data, record the network and validated ledger reference, and compare the result with the current primary documentation before changing off-ledger state.
Open the related live demo or evidence lab →Limits, risks, and common confusion
A stream event can be proposed rather than validated depending on subscription type. Subscriptions can drop, duplicate, or arrive during reorganization of local state, so consumers need idempotency.
Applications must preserve exact amounts, protect signing material, handle retries idempotently, and reconcile against validated ledgers.
Current network status
Network-independent guidance. This guide explains an operational or representational concept. Confirm live server values and service-specific behavior before relying on it in production.
Status reviewed 2026-08-23. Amendment-dependent behavior must be rechecked against the network's live feature state before operational use.