Pubkey string. The public key of account to query encoded as base-58 string.
object optional. Configuration object containing 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 confirmed by the supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block 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.
// Result
{ "jsonrpc": "2.0", "result": 23784, "id": 1 }
Data on the Stellar ledger is organized according to resources. Each resource has several different endpoints.
Resource Types
logsSubscribe
(Subscription Websocket) Subscribe to transaction logging.
This method will use 20 .
Parameters
filters string. The filter criteria for the logs to receive results by account type. Only one of the following filter can be passed at a time. The following filters types are currently supported:
all string. Subscribe to all transactions except for simple vote transactions.
allWithVotes string. Subscribe to all transactions including simple vote transactions.
object object. An object with the following field:
mentions array. Subscribe to all transactions that mention the provided Pubkey (as base-58 encoded string). The mentions field currently only supports one Pubkey string per method call. Listing additional addresses will result in an error.
encoding string. The encoding format for account data. It can be one of base58 (slow), base64, base64+zstd or jsonParsed.
object optional. Configuration object containing 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 confirmed by the supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block 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.
Returns
result integer. The result will be an RpcResponse JSON object with id equal to the subscription id (needed to unsubscribe).
Notification Format: object. The notification will be an RpcResponse JSON object with value equal to:
signature string. The transaction signature base58 encoded.
err object. Error if transaction failed, null if transaction succeeded.
logs array. An array of log messages the transaction instructions output during execution, null if simulation failed before the transaction was able to execute (for example due to an invalid blockhash or signature verification failure).
// Result
{ "jsonrpc": "2.0", "result": 24040, "id": 1 }
(Subscription Websocket) Subscribe to a program to receive notifications when the lamports or data for a given account owned by the program changes.
This method will use 20 .
Parameters
program_id string. The Pubkey encoded base-58 string.
object optional. Configuration object containing 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 confirmed by the supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block 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.
filters string. The filter results using various filter objects; The account must meet all filter criteria to be included in results.
Returns
result 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 getProgramAccounts RPC HTTP method.
// Result
{ "jsonrpc": "2.0", "result": 24040, "id": 1 }
(Subscription Websocket) Subscribe to a transaction signature to receive notification when the transaction is confirmed. Note: On signatureNotification, the subscription is automatically cancelled.
This method will use 20 .
Parameters
tx_sig The transaction signature as base-58 encoded string.
object optional. Configuration object containing 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 confirmed by the supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block 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.
Returns
result The result will be an RpcResponse JSON object with id equal to the subscription id (needed to unsubscribe).
Notification Format:
result Error if the transaction failed and null if the transaction succeeded.
// Result
{ "jsonrpc": "2.0", "result": 0, "id": 1 }
wscat -c wss://mainnet.solana.validationcloud.io/v1/<YOUR_API_KEY_HERE>
# wait for connection
{"id":1,"jsonrpc":"2.0","method":"signatureSubscribe","params":["51y9Hf2cFzrUPDH24qvL6b6PtPMDGQSX3WwiHsSvkdfGiFTKdoJwGkvqS3gny6XNPLtUtRwGERAs45639EfR5XfT"]}
wscat -c wss://devnet.solana.validationcloud.io/v1/<YOUR_API_KEY_HERE>
# wait for connection
{"id":1,"jsonrpc":"2.0","method":"signatureSubscribe","params":["51y9Hf2cFzrUPDH24qvL6b6PtPMDGQSX3WwiHsSvkdfGiFTKdoJwGkvqS3gny6XNPLtUtRwGERAs45639EfR5XfT"]}