accountSubscribe RPC Method
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
Loading...
object
object
Loading...
commitment
string
Loading...
finalized
string
Loading...
confirmed
string
Loading...
processed
string
Loading...
encoding
string
Loading...
Returns
result
integer
Loading...
Notification Format:
Loading...
Request
1import { address, createSolanaRpcSubscriptions } from '@solana/kit';23const rpcSubscriptions = createSolanaRpcSubscriptions('');45async function main() {6const abortController = new AbortController();7const accountNotifications = await rpcSubscriptions8.accountNotifications(address('9kwU8PYhsmRfgS3nwnzT3TvnDeuvdbMAXqWsri2X8rAU'), { commitment: 'confirmed' })9.subscribe({ abortSignal: abortController.signal });1011try {12for await (const notification of accountNotifications) {13console.log('New balance', notification.value.lamports);14}15} catch (e) {16console.error(e);17}1819}2021main();
1import { address, createSolanaRpcSubscriptions } from '@solana/kit';23const rpcSubscriptions = createSolanaRpcSubscriptions('');45async function main() {6const abortController = new AbortController();7const accountNotifications = await rpcSubscriptions8.accountNotifications(address('9kwU8PYhsmRfgS3nwnzT3TvnDeuvdbMAXqWsri2X8rAU'), { commitment: 'confirmed' })9.subscribe({ abortSignal: abortController.signal });1011try {12for await (const notification of accountNotifications) {13console.log('New balance', notification.value.lamports);14}15} catch (e) {16console.error(e);17}1819}2021main();
Response
1{2"jsonrpc": "2.0",3"result": 23784,4"id": 15}
1{2"jsonrpc": "2.0",3"result": 23784,4"id": 15}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free