wss://api.main.atgraphite.com/ws
Once the socket is open, you can subscribe or unsubscribe from a topic by sending requests.
Sends an update each time a new block is appended to the chain.
{
"method": "subscribe",
"params": {
"topic": "blocks"
}
}
{
"method": "subscribe",
"result": {
"topic": "blocks"
},
"success": true
}
{
"topic": "blocks",
"data": {
"confirmations": "0",
"decodedExtraData": {
"awn": 3899,
"signature": "0xfa29ec77110e0cc3733326b0d195b96f186854a8f4e16b10f54aef1645aaec0e07410caef3fea4464c968707508c3138772d5bea3753d6b92d2886cc675d2df800",
"vanity": "0x6d61696e6e65742d76616c696461746f722d362d657500000000000000000000"
},
"difficulty": "0x01",
"epoch": false,
"extraData": "0x6d61696e6e65742d76616c696461746f722d362d65750000000000000000000000000000000000000f3bfa29ec77110e0cc3733326b0d195b96f186854a8f4e16b10f54aef1645aaec0e07410caef3fea4464c968707508c3138772d5bea3753d6b92d2886cc675d2df800",
"gasLimit": "0xbebc200",
"gasUsed": "0x5208",
"gasUsedPercentage": "0.010500",
"hash": "0x4b3eef2671c3395d3b2958330af6b9bad57907e196d874147b06bd8b88f449a1",
"internalTransactionCount": "0",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0xddca5562cf3914e6815c87746109f478a46a6373",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0100000000000000",
"number": "0x22d",
"parentHash": "0x967e2f106a034bf5df2e1ed85c2a78e359fd4b041be1e749e5f4d0bc8cfa0858",
"receiptsRoot": "0x962005faf1c6a68f940ece9b33cdb5baf7875b5fa60ba34f1b110adfb2872bc5",
"reward": "4200000000000000",
"size": "0x2e4",
"slashingVote": null,
"stateRoot": "0x714531b9b07d229abcd934f858c16348773156e364c9f4526192d17f3c209d38",
"timestamp": "0x6790c7e5",
"totalDifficulty": "0x022e",
"transactionCount": "1",
"transactionFees": "4200000000000000",
"transactionsRoot": "0x8104e51285600c04a1ea494209851e1fa61578e4d756372499eaf760be8740a2"
}
}
Subscribing to new pending transactions
Sends an update each time a new transaction is appended to the mempool.
{
"method": "subscribe",
"params": {
"topic": "mempool"
}
}
{
"method": "subscribe",
"result": {
"topic": "mempool"
},
"success": true
}
{
"topic": "mempool",
"data": {
"from": "0x58af7455c7b23d246b62ccc0b9640ac1d4911761",
"functionName": null,
"gasPrice": "0",
"hash": "0xf8f8ef28a7972aa7bd87d6203decc7c573da5787ccd71a31e52b3a3c47410692",
"methodId": null,
"timeStamp": "1737542831",
"to": "0x12652c6d93fdb6f4f37d48a8687783c782bb0d10",
"value": "0"
}
}