getmininginfo - Bitcoin
Example code for the getmininginfo JSON-RPC method. Complete guide on how to use getmininginfo JSON-RPC in GetBlock Web3 documentation.
Parameters
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "getmininginfo",
"params": [],
"id": "getblock.io"
}'import axios from 'axios';
const data = JSON.stringify({
"jsonrpc": "2.0",
"method": "getmininginfo",
"params": [],
"id": "getblock.io"
});
const config = {
method: 'post',
url: 'https://go.getblock.io/<ACCESS-TOKEN>/',
headers: {
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(response => console.log(JSON.stringify(response.data)))
.catch(error => console.log(error));Response
{
"result": {
"blocks": 928672,
"currentblockweight": 3995956,
"currentblocktx": 3955,
"difficulty": 148195306640204.7,
"networkhashps": 1.123192284545419e+21,
"pooledtx": 20906,
"chain": "main",
"warnings": ""
},
"error": null
}Response Parameters
Field
Type
Description
Use Case
Error Handling
Status Code
Error Message
Cause
Integration with Web3
Last updated
Was this helpful?