Get transaction fees per transaction via gettransaction
If you want to get the gettransaction command running, you would need to enable the txindex via bitcoind -reindex -txindex. Note this takes a few hours.

Alternatively, you can do the following:


run bitcoin-cli getblockhash &lt;block number&gt;
run bitcoin-cli getblock &lt;result from 1&gt;


This will give you the block time and all the transactions within the block in a nice JSON format. Iterate through all the txid's via:

bitcoin-cli getrawtransaction

Unfortunately, you'll have to look up all the inputs and see how much is in them in order to calculate the transaction fee using this method.