slotSubscribe RPC Method
Subscribe to receive notification anytime a slot is processed by the validator
params
Noneresult
integer
Subscription id (needed to unsubscribe)
Request
{"jsonrpc": "2.0","id": 1,"method": "slotSubscribe"}
Response
{"jsonrpc": "2.0","result": 0,"id": 1}
Request
{"jsonrpc": "2.0","id": 1,"method": "slotSubscribe"}
params
Noneresult
Response
{"jsonrpc": "2.0","result": 0,"id": 1}
integer
Subscription id (needed to unsubscribe)
Notification Format:
The notification will be an object with the following fields:
parent: <u64>
- The parent slotroot: <u64>
- The current root slotslot: <u64>
- The newly set slot value
Example:
{"jsonrpc": "2.0","method": "slotNotification","params": {"result": {"parent": 75,"root": 44,"slot": 76},"subscription": 0}}
Is this page helpful?