txpool_status

Returns the number of transactions in pending and queued state.

📘

Supported on BSC mainnet, BSC testnet, opBNB testnet, ETH mainnet, ETH Goerli and Polygon mainnet only.

Parameters

  • None

Returns

  • object - with following fields:
    • pending - Total number of pending transactions in the pool, represented in hexadecimal format.
    • queued - Total number of queued transactions in the pool, represented in hexadecimal format.

API Endpoint

The format of a MegaNode API endpoint is https://{chain}-{network}.nodereal.io/v1/{API-key}
Here is an example:

https://bsc-mainnet.nodereal.io/v1/4c0a1c23661a4e26bcbcwed461e34ea9

For other chains or networks, you could refer to this guidance Find API key & endpoint.

Example

Request

curl https://bsc-mainnet.nodereal.io/v1/your-api-key \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"txpool_status","params":[],"id":1}'

Result

{
    "jsonrpc": "2.0",
    "id": 1,
    "result":
    {
        "pending": "0xf8",
        "queued": "0x0"
    }
}