WebSocket
Connection URL
wss://api.main.atgraphite.com/wsOnce the socket is open, you can subscribe or unsubscribe from a topic by sending requests.
Subscribing to new block headers
Sends an update each time a new block is appended to the chain.
Sample request
{
"method": "subscribe",
"params": {
"topic": "blocks"
}
}'{"method":"subscribe","params":{"topic":"blocks"}}'Request query parameters
Parameter
Description
method*
subscribe or unsubscribe
Sample response
{
"method": "subscribe",
"result": {
"topic": "blocks"
},
"success": true
}Sample update response
Subscribing to new pending transactions
Sends an update each time a new transaction is appended to the mempool.
Sample request
Request query parameters
Parameter
Description
method*
subscribe or unsubscribe
Sample response
Sample update response
Subscribing to new confirmed transactions
Sends update with transactions from each new block as soon as it is appended to the chain.
Sample request
Request query parameters
Parameter
Description
method*
subscribe or unsubscribe
from
string with the transaction sender address
to
string with the transaction receiver address
Note: The from and to parameters are optional. They can be used together, separately, or not provided at all.
Sample response
Sample update response
Last updated