releaseMempool - Cardano
Example code for the releaseMempool WebSocket method. Complete guide on how to use releaseMempool WebSocket in GetBlock Web3 documentation.
Parameters
Request
import WebSocket from 'ws';
const client = new WebSocket('wss://go.getblock.io/<ACCESS-TOKEN>/');
client.once('open', () => {
client.send(JSON.stringify({"jsonrpc": "2.0", "method": "releaseMempool", "id": "getblock.io"}));
});
client.on('message', (msg) => {
console.log(JSON.parse(msg.toString()));
client.close();
});import asyncio
import json
import websockets
async def main():
async with websockets.connect('wss://go.getblock.io/<ACCESS-TOKEN>/') as ws:
await ws.send(json.dumps({"jsonrpc": "2.0", "method": "releaseMempool", "id": "getblock.io"}))
print(json.loads(await ws.recv()))
asyncio.run(main())Response
Response Parameters
Field
Type
Description
Use Cases
Error Handling
Error Code
Message
Description
Last updated
Was this helpful?