getrawmempool - Zcash
Example code for the getrawmempool JSON-RPC method. Complete guide on how to use the getrawmempool JSON-RPC method in GetBlock.io Web3 documentation.
This method returns all transaction IDs currently in the node's mempool. Verbose mode returns full transaction metadata (fees, size, times) instead of just IDs.
Parameters
verbose
boolean
No
If true, return full metadata per transaction; if false, return only IDs. Default false
Request
curl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "getrawmempool",
"params": [
false
],
"id": "getblock.io"
}'const axios = require('axios');
const response = await axios.post('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', {
jsonrpc: '2.0',
method: 'getrawmempool',
params: [
false
],
id: 'getblock.io'
}, {
headers: { 'Content-Type': 'application/json' }
});
console.log(response.data.result);Response
{
"jsonrpc": "2.0",
"result": [
"0f8412adbf56a100861085e5d3f9080aa36f27d8c434f7972ed1b564d88bdb6d",
"293859588c97d1d3dede464f48656a45ae6b226a07b37925d8b5625a7c667099"
],
"id": "getblock.io"
}Response Parameters
result
array of string or object
Transaction IDs (verbose=false) or transaction detail objects (verbose=true) currently in the mempool
Use Cases
Mempool Monitoring: Track transactions waiting for inclusion — feed data into MEV or activity dashboards
Post-Submit Tracking: After
sendrawtransaction, poll the mempool to confirm the transaction is queuedCongestion Detection: Mempool size and composition indicate network congestion levels
Fee Estimation Input: Analyze mempool fee distribution to estimate appropriate fees for new transactions
Error Handling
-32603
Internal error
Node failed to read mempool state
Last updated
Was this helpful?