getchaintxstats - Bitcoin
Example code for the getchaintxstats JSON-RPC method. Complete guide on how to use getchaintxstats JSON-RPC in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "getchaintxstats",
"params": [144],
"id": "getblock.io"
}'import axios from 'axios';
const data = JSON.stringify({
"jsonrpc": "2.0",
"method": "getchaintxstats",
"params": [144],
"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
{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": {
"time": 1700000000,
"txcount": 950000000,
"window_final_block_hash": "000000000000000000046b9302e08c16ea186950f42a5498320ddd1bd7ab3428",
"window_final_block_height": 820000,
"window_block_count": 144,
"window_tx_count": 450000,
"window_interval": 86400,
"txrate": 5.208333333
}
}Response Parameters
Field
Type
Description
Use Case
Error Handling
Status Code
Error Message
Cause
Integration Notes
Last updated
Was this helpful?