← home

API Documentation

WebSocket API

EndpointAuth
wss://puddle.network/mempoolHeader X-Puddle-Key: <your-api-key>

Query Parameters

ParameterDescription
to=0x...Filter by a single recipient address
to=[0x...,0x...]Filter by up to 50 recipient addresses
format=gethNormalize output to geth-style JSON (hash, from, to, input with 0x prefix)

Code Examples

Python

import asyncio, json, websockets

async def main():
    url = "wss://puddle.network/mempool"
    headers = {"X-Puddle-Key": "<your-api-key>"}
    async with websockets.connect(url, extra_headers=headers) as ws:
        async for message in ws:
            tx = json.loads(message)
            print(tx)

asyncio.run(main())

JavaScript

const WebSocket = require("ws");

const ws = new WebSocket("wss://puddle.network/mempool", {
    headers: { "X-Puddle-Key": "<your-api-key>" }
});

ws.on("message", (data) => {
    const tx = JSON.parse(data);
    console.log(tx);
});