Skip to main content

kaia_subscribe RPC Method

Creates a new subscription to specific events by using either RPC Pub/Sub over WebSockets or filters over HTTP. It allows clients to wait for events instead of polling for them.

Updated on
Aug 7, 2024

kaia_subscribe RPC Method

Parameters

notificationTyper
string
REQUIRED
A notification type: 'newHeads' or 'logs'

Returns

result
boolean
Return a subscription id when a subscription is created
Request
1
curl https://docs-demo.kaia-kairos.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{
5
"method": "kaia_subscribe",
6
"id": 1,
7
"jsonrpc": "2.0",
8
"params": ["newHeads"]
9
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free