getinfo - Zcash
Example code for the getinfo JSON-RPC method. Сomplete guide on how to use the getinfo JSON-RPC method in GetBlock.io 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": "getinfo",
"params": [],
"id": "getblock.io"
}'const axios = require('axios');
const response = await axios.post('https://go.getblock.io/<ACCESS-TOKEN>/', {
jsonrpc: '2.0',
method: 'getinfo',
params: [],
id: 'getblock.io'
}, {
headers: { 'Content-Type': 'application/json' }
});
console.log(response.data.result);import requests
response = requests.post(
'https://go.getblock.io/<ACCESS-TOKEN>/',
headers={'Content-Type': 'application/json'},
json={
'jsonrpc': '2.0',
'method': 'getinfo',
'params': [],
'id': 'getblock.io'
}
)
print(response.json())Response
{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": {
"version": 6000000,
"build": "v6.0.0",
"subversion": "/Zebra:6.0.0/",
"protocolversion": 170160,
"blocks": 3420502,
"connections": 41,
"difficulty": 229698549.25032642,
"testnet": false,
"paytxfee": 0.0,
"relayfee": 1e-6,
"errors": "chain updates have stalled, state height has not increased for 10 minutes. Hint: check your network connection, and your computer clock and time zone",
"errorstimestamp": 1784662715
}
}Response Parameters
Parameter
Type
Description
Use Cases
Error Handling
Error Code
Message
Description
Last updated
Was this helpful?