Mining RPCs

getmininginfo

Returns a json object containing mining-related information.

Method: POST

https://bch.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getmininginfo",
    "params": []
}

Example response: 200

{
    "result": {
        "blocks": 840794,
        "currentblocksize": 0,
        "currentblocktx": 0,
        "difficulty": 351097755351.5054,
        "miningblocksizelimit": 16000000,
        "networkhashps": 2.020801851059362e+18,
        "pooledtx": 15,
        "chain": "main",
        "warnings": ""
    },
    "error": null,
    "id": "curltest"
}

getnetworkhashps

Returns the estimated network hashes per second based on the last n blocks.

Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change.

Pass in [height] to estimate the network speed at the time when a certain block was found.

Method: POST

https://bch.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getnetworkhashps",
    "params": []
}

Example response: 200

{
    "result": 2.020801851059362e+18,
    "error": null,
    "id": "curltest"
}

Last updated