what is bitcoin-cli command for checking how many transaction per block ?
Thanks you
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.
Sign up to join this community"txs" : n, (numeric) The number of transactions (including coinbase)
Example
C:\Program Files\Bitcoin\daemon> bitcoin-cli getblockcount
627251
C:\Program Files\Bitcoin\daemon> bitcoin-cli getblockstats 627251 | findstr /C:"\"txs\":"
"txs": 2103,
The full output contains lots of other information
C:\Program Files\Bitcoin\daemon> bitcoin-cli getblockstats 627251
{
"avgfee": 8359,
"avgfeerate": 17,
"avgtxsize": 571,
"blockhash": "000000000000000000070ab39c953fd599b27da2c171476d2b2e8533484130bd",
"feerate_percentiles": [
7,
7,
8,
25,
30
],
"height": 627251,
"ins": 6108,
"maxfee": 1598037,
"maxfeerate": 387,
"maxtxsize": 99011,
"medianfee": 4007,
"mediantime": 1587620811,
"mediantxsize": 249,
"minfee": 162,
"minfeerate": 1,
"mintxsize": 188,
"outs": 4844,
"subsidy": 1250000000,
"swtotal_size": 550012,
"swtotal_weight": 1383607,
"swtxs": 893,
"time": 1587623122,
"total_out": 403374241843,
"total_size": 1202103,
"total_weight": 3991971,
"totalfee": 17572435,
"txs": 2103,
"utxo_increase": -1264,
"utxo_size_inc": -94315
}