to get all fees , you need to get list of all trasnactins in mempool
getrawmempool will give you all transactions "txid" in mempool.
then you need to run
getrawtransaction "txid" 1
it will give you detailed transaction in json.
from that you can get
"vin"
"vout"
fees = vin - vout
do this for all transactions and you will get fees of all transactions in mempool.
hope this helps.
This would only work if OP has txindex enabled on his node.
no, txindex is required only if op wants to query old tx which are in block, but he only wants to query which are in mempool.,
so imho txindex is not required just to query tx in mempool.
By default -txindex=0 Bitcoin Core doesn't maintain any transaction-level data except for those
in the mempool or relay set
pertinent to addresses in your wallet
pertinent to your "watch-only" addresses
ref:
https://bitcoin.stackexchange.com/a/37979/10603or maybe i am missing something.,
sorry for my bad english.