getmininginfo - Zcash

This method returns current mining-related state: block height, difficulty, transactions in the current block being built, and network hashes-per-second estimate. Useful for mining dashboards and pool operators tracking network conditions.

Parameters

This method takes no parameters.

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": "getmininginfo",
    "params": [],
    "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: 'getmininginfo',
    params: [],
    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': 'getmininginfo',
        'params': [],
        '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": "getmininginfo",
            "params": [],
            "id": "getblock.io"
        }))
        .send()
        .await?
        .json::<Value>()
        .await?;
    
    println!("Result: {}", response["result"]);
    Ok(())
}

Response

json{
    "jsonrpc": "2.0",
    "result": {
        "blocks": 3487829,
        "currentblocksize": 203589,
        "currentblocktx": 29,
        "networksolps": 31709653247,
        "networkhashps": 31709653247,
        "chain": "main",
        "testnet": false
    },
    "id": "getblock.io"
}

Response Parameters

ParameterTypeDescription
blocksintegerCurrent chain tip height
currentblocksizeintegerSize of the current block being built by the miner (bytes)
currentblocktxintegerTransaction count in the current block being built
networksolpsnumberEstimated network Equihash solutions per second
networkhashpsnumberSame as networksolps (for Bitcoin-family compatibility)
testnetbooleantrue if serving Testnet
chainstringChain name (main or test)

Use Cases

  • Mining Pool Dashboards: Display current network hashrate, difficulty, and mempool state
  • Miner Configuration Sanity Checks: Verify node reports correct chain and testnet state
  • Network Statistics: Feed hashrate estimates into chain-analytics dashboards

Error Handling

Error CodeMessageDescription
-32603Internal errorNode failed to compile mining state