Author Topic: Bitcoin RPC. Get sum of all fees in the mempool.  (Read 348 times)

Offline taera249

  • Jr. Member
  • **
  • Posts: 49
  • Karma: +0/-0
    • View Profile
Bitcoin RPC. Get sum of all fees in the mempool.
« on: January 26, 2018, 06:30:47 am »
I'm trying to get a number of total fees in the bitcoin mempool (live, in BTC) using python.

I was able to connect bitcoinrpc, but stil struggle with commands and a proper way of acquiring the number. One way of doing this would be to get information on all unconfirmed transactions in the bitcoin mempool and sum their fees, however running the code below returns me an empty list.


from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException

rpc_user = 'xxx'
rpc_password = 'xxx'
rpc_connection = AuthServiceProxy("http://%s:%s@127.0.0.1:8332"%(rpc_user, rpc_password))

transactions = rpc_connection.listtransactions("*")