Skip to main content

accountSubscribe RPC Method

(Subscription Websocket) Subscribe to an account to receive notifications when the lamports or data for a given account public key changes.

Updated on
Oct 19, 2026
As of May 1, 2026, this WebSocket method is billed based on metered data usage: 0.1 MB = 15 API credits. Learn more about WebSocket billing.

Parameters

Pubkey
string

The public key of account to query encoded as base-58 string

object
object

The configuration object with the following fields:

commitment
string

The level of commitment required for the query. The options include:

finalized
string

The node will query the most recent block the cluster has recognized as finalized

confirmed
string

The node will query the most recent block that has been voted on by the supermajority of the cluster

processed
string

The node will query its most recent block. Note that the block may not be complete

encoding
string

The encoding format for account data. It can be one of base58 (slow), base64, base64+zstd or jsonParsed

Returns

result
integer

The result will be an RpcResponse JSON object with id equal to the subscription id (needed to unsubscribe)

Notification Format:

The notification format is the same as seen in the getAccountInfo RPC HTTP method

Request
Response
1
{
2
"jsonrpc": "2.0",
3
"result": 23784,
4
"id": 1
5
}
1
{
2
"jsonrpc": "2.0",
3
"result": 23784,
4
"id": 1
5
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free