Supported WebSocket Methods
The Blockdaemon RPC API supports the following methods:
- accountSubscribe
- accountUnsubscribe
- blockSubscribe
- blockUnsubscribe
- logsSubscribe
- logsUnsubscribe
- programSubscribe
- programUnsubscribe
- rootSubscribe
- rootUnsubscribe
- signatureSubscribe
- signatureUnsubscribe
- slotSubscribe
- slotUnsubscribe
- slotsUpdatesSubscribe
- slotsUpdatesUnsubscribe
- voteSubscribe
- voteUnsubscribe
Info:
You can find Solana WebSocket documentation here.
How To Access
Step 1: Authorize your request. Learn more: Authentication Guide
wsdump --headers 'Authorization: Bearer YOUR_API_KEY'
Step 2: Use the following WebSocket URL:
wss://svc.blockdaemon.com/:protocol/:network/native?service_name=:service
Step 3: Specify a method in the request body:
{
"jsonrpc": "2.0",
"id": 1,
"method": "slotSubscribe"
}
Example Request
Here is an example for using slotsubscribe to receive notification anytime a slot is processed by the validator
--headers 'Authorization: Bearer YOUR_API_KEY' \
wss://svc.blockdaemon.com/solana/mainnet/native?service_name=ws \
'{ "jsonrpc": "2.0", "id": 1, "method": "slotSubscribe" }'
The following is a typical response you will get:
{
"jsonrpc": "2.0",
"result": 0,
"id": 1
}
👋 Need Help?
Contact us through email or our support page for any issues, bugs, or assistance you may need.