WebSocket Reference
WebSocket Methods
WebSocket Endpoint
wss://ws.eu.fluxrpc.comTry It — Live Subscription
Subscribe to real-time events right from your browser.
How Subscriptions Work
WebSocket subscriptions follow a subscribe/unsubscribe pattern. When you subscribe to an event, the node returns a subscription id used for incoming notifications and to unsubscribe.
Subscribe Request
"jsonrpc" : "2.0" , "id" : 1 , "method" : "accountSubscribe" , "params" :[ "pubkey..." ] Subscribe Response
{ "jsonrpc" : "2.0" , "result" : 0 , "id" : 1 } Returns a subscription ID ( 0 ) to identify this subscription
Notification
{ "jsonrpc" : "2.0" , "method" : "accountNotification" , "params" :{ "subscription" : 0 , "result" :{...}}} Real-time notifications reference the subscription ID
Available Subscriptions
18Subscribe to an account to receive notifications when the lamports or data for a given account public key changes.
pubkeystring required Account Pubkey, as base-58 encoded string.
configobjectConfiguration object.
commitmentstringCommitment level: "processed", "confirmed", or "finalized".
encodingstringEncoding for account data: "base58", "base64", "base64+zstd", "binary", or "jsonParsed". Default: "binary".
dataSliceobjectLimit the returned account data. Only available for "base58", "base64", "base64+zstd" or "binary" encodings.
Unsubscribe from account change notifications.
subscriptionIdnumber required ID of the subscription to cancel.
Subscribe to transaction logging.
filterstring | object required Filter criteria: "all", "allWithVotes", or { mentions: ["<pubkey>"] }.
configobjectConfiguration object.
commitmentstringCommitment level: "processed", "confirmed", or "finalized".
Unsubscribe from transaction logging.
subscriptionIdnumber required ID of the subscription to cancel.
Subscribe to a program to receive notifications when the lamports or data for an account owned by the given program changes.
pubkeystring required Program ID Pubkey, as base-58 encoded string.
configobjectConfiguration object.
commitmentstringCommitment level: "processed", "confirmed", or "finalized".
encodingstringEncoding for account data: "base58", "base64", "base64+zstd", "binary", or "jsonParsed". Default: "binary".
dataSliceobjectLimit the returned account data. Only available for "base58", "base64", "base64+zstd" or "binary" encodings.
filtersarrayFilter results using up to 4 memcmp and/or dataSize filters.
withContextboolAccepted for compatibility; notifications already include context.
Unsubscribe from program-owned account change notifications.
subscriptionIdnumber required ID of the subscription to cancel.
Subscribe to receive a notification when the transaction with the given signature reaches the specified commitment level.
signaturestring required Transaction signature, as base-58 encoded string.
configobjectConfiguration object.
commitmentstringCommitment level: "processed", "confirmed", or "finalized".
enableReceivedNotificationboolWhether to also send a receivedSignature notification as soon as the node receives the transaction, before it reaches the requested commitment.
Unsubscribe from signature confirmation notification.
subscriptionIdnumber required ID of the subscription to cancel.
Subscribe to receive notification anytime a slot is processed by the validator.
No parameters required
Unsubscribe from slot notifications.
subscriptionIdnumber required ID of the subscription to cancel.
Subscribe to receive notification anytime a new root is set by the validator.
No parameters required
Unsubscribe from root notifications.
subscriptionIdnumber required ID of the subscription to cancel.
Subscribe to receive notification anytime a new block is confirmed or finalized.
filterstring | object required Filter criteria: "all" or { mentionsAccountOrProgram: "<pubkey>" }.
configobjectConfiguration object.
commitmentstringCommitment level ("finalized" or "confirmed").
encodingstringEncoding for each returned transaction: "json", "jsonParsed", "base58", or "base64".
transactionDetailsstringLevel of transaction detail: "full", "accounts", "signatures", or "none".
maxSupportedTransactionVersionnumberHighest transaction version to return. Set to 1 to include v1 transactions.
showRewardsboolWhether to populate the rewards array.
Unsubscribe from block notifications.
subscriptionIdnumber required ID of the subscription to cancel.
Subscribe to receive a notification from the validator on a variety of updates on every slot.
No parameters required
Unsubscribe from slot-update notifications.
subscriptionIdnumber required ID of the subscription to cancel.
Subscribe to receive notification anytime a new vote is observed in gossip.
No parameters required