getrawmempool - Zcash
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
| Parameter | Type | Required | Description |
|---|---|---|---|
verbose | boolean | No | If true, return full metadata per transaction; if false, return only IDs. Default false |
Request
bashcurl --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"
}'example.js
javascriptconst 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);example.py
pythonimport requests
response = requests.post(
'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
headers={'Content-Type': 'application/json'},
json={
'jsonrpc': '2.0',
'method': 'getrawmempool',
'params': [
false
],
'id': 'getblock.io'
}
)
print(response.json())example.rs
rustuse reqwest::Client;
use serde_json::{json, Value};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let response = client
.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
.header("Content-Type", "application/json")
.json(&json!({
"jsonrpc": "2.0",
"method": "getrawmempool",
"params": [
false
],
"id": "getblock.io"
}))
.send()
.await?
.json::<Value>()
.await?;
println!("Result: {}", response["result"]);
Ok(())
}Response
json{
"jsonrpc": "2.0",
"result": [
"0f8412adbf56a100861085e5d3f9080aa36f27d8c434f7972ed1b564d88bdb6d",
"293859588c97d1d3dede464f48656a45ae6b226a07b37925d8b5625a7c667099"
],
"id": "getblock.io"
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
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 queued - Congestion 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
| Error Code | Message | Description |
|---|---|---|
| -32603 | Internal error | Node failed to read mempool state |