← Optimism overview
Optimism · txpool
txpool_status
Returns the number of pending and queued transactions in the pool.
Returns an object containing the count of transactions currently pending for inclusion in the next block(s), as well as ones that are scheduled for future execution (transactions with nonce gaps).
Result
Transaction pool status
Schema
{
"type": "object",
"title": "Transaction pool status",
"description": "The number of pending and queued transactions in the pool.",
"properties": {
"pending": {
"type": "string",
"title": "pending count",
"description": "Number of transactions ready for inclusion in the next block(s)",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"queued": {
"type": "string",
"title": "queued count",
"description": "Number of transactions with nonce gaps awaiting preceding transactions before they can be executed",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
},
"required": [
"pending",
"queued"
]
}Example request
Endpoint: https://your-op-node.azxa.io
JSON-RPC
{
"jsonrpc": "2.0",
"id": 1,
"method": "txpool_status",
"params": []
}Example response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"pending": "0xa",
"queued": "0x7"
}
}Test fixture
Fixture: get-status
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "txpool_status"
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"pending": "0x6",
"queued": "0x0"
}
}cURL
curl -X POST https://your-op-node.azxa.io \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"txpool_status","params":[]}'