getchaintxstats
POST
Computes statistics about the total number and rate of transactions in the chain.You can specify the size of the window in number of blocks and the block that ends the window.
param[0]
nblocksintegerrequired
The size of the window in number of blocks. Roughly one month of blocks is used when omitted.param[1]
blockHashstringrequired
The hash of the block that ends the window. The chain tip is used when omitted.Responses
timeinteger
The timestamp of the final block in the window, expressed in UNIX epoch time.txcountinteger
The total number of transactions in the chain up to that point.It may not be returned when the value is unknown, such as when using assumeutxo.window_final_block_hashstring
The hash of the final block in the window.window_final_block_heightinteger
The height of the final block in the window.window_block_countinteger
The size of the window in number of blocks.window_tx_countinteger
The number of transactions in the window.Returned only when window_block_count is greater than 0 and txcount exists for both the start and the end of the window.window_intervalinteger
The elapsed time in the window, in seconds. Returned only when window_block_count is greater than 0.txratenumber
The average rate of transactions per second in the window.Returned only when window_interval is greater than 0 and window_tx_count exists.codestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "ERROR_CODE","message": "Unauthorized"}
cURL
curl -X POST 'https://bitcoin-mainnet.nodit.io' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"jsonrpc": "2.0","id": 1,"method": "getchaintxstats","params": [2016,"000000000000000000024bead8df69990852c202db0e0097c1a12ea637d7e96d"]}'