curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"method": "getnetworkhashps",
"params": [
120,
-1
],
"id": 1
}'
{
"result": 123,
"error": {},
"id": 123
}
curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"method": "getnetworkhashps",
"params": [
120,
-1
],
"id": 1
}'
{
"result": 123,
"error": {},
"id": 123
}
getnetworkhashps
method estimates the total hashing power of the network based on the last n blocks. It can provide insights into the current or historical network difficulty and security.
n
(optional): The number of blocks to calculate the average hash rate over. The default is 120 blocks.height
(optional): The block height at which to calculate the hash rate. The default is -1, which calculates the hash rate at the current height.result
— a number representing the estimated hashes per second for the network based on the specified number of blocks.error
— an object containing an error message if an error occurred, otherwise null
.id
— an integer representing the ID of the request.getnetworkhashps
method is useful for understanding the overall security and difficulty of the blockchain network. It helps users and analysts gauge the amount of computational power dedicated to mining and maintaining the network.The estimated network hashes per second.
The response is of type object
.
Was this page helpful?