user106994: How to use python rpc bitcoin to get the historical transaction record of a wallet address？My computer has synchronized all btc blocks, and txindex=1 has been configured. I want to try to get all the historical transaction records of a wallet address. Do I still need to create a mysql or redis cache? Below is my configuration
datadir=/opt/bitcoin/bitcoin-data
dbcache=10240
txindex=1
rpcuser=*****hi 
rpcpassword=****
daemon=1
server=1
rest=1
rpcbind=0.0.0.0:8332
rpcallowip=0.0.0.0/0
deprecatedrpc=accounts

I just want to input an address and connect to the local BITCOIN RPC to query all historical transaction records of a specific address
An empty message was returned
root@ubuntu:~# bitcoin-cli listtransactions  "3Fr1mGhnPAQ9YDf1dzg4B47PkX5TuvFtYv"
[
]


user106775: To communicate with your bitcoin core, you must change your bitcoin.conf and set
server=1
Then connect to your bitcoin core with "http://user:password@127.0.0.1:8332"

user102085: As @hamita pointed out you need to set server=1 in your bitcoin.conf file then you can use python-bitcoinrpc library to communicate with your bitcoin node.
Here's a short script to get all transactions of an address:
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from pprint import pprint

# rpc_user and rpc_password are set in the bitcoin.conf file
rpc_user = "<from bitcoin.conf>"
rpc_pass = "<from bitcoin.conf>"
rpc_host = "<ip address of your bitcoind>" # if running locally then 127.0.0.1
rpc_client = AuthServiceProxy(f"http://{rpc_user}:{rpc_pass}@{rpc_host}:8332", timeout=240)


track_address = "<your address>"
tx_list = rpc_client.listtransactions()

address_tx_list = []
for tx in tx_list:
    if tx['address'] == track_address:
        address_tx_list.append(tx)

pprint(address_tx_list)

I'm also writing the chapter Accessing Bitcoind with Python if you want to know more. NOTE: It is a work in progress.
EDIT: Added server=1 for completeness.

106994: <p>How to use python rpc bitcoin to get the historical transaction record of a wallet address？My computer has synchronized all btc blocks, and txindex=1 has been configured. I want to try to get all the historical transaction records of a wallet address. Do I still need to create a mysql or redis cache? Below is my configuration</p>
<pre><code>datadir=/opt/bitcoin/bitcoin-data
dbcache=10240
txindex=1
rpcuser=*****hi 
rpcpassword=****
daemon=1
server=1
rest=1
rpcbind=0.0.0.0:8332
rpcallowip=0.0.0.0/0
deprecatedrpc=accounts
</code></pre>
<p>I just want to input an address and connect to the local BITCOIN RPC to query all historical transaction records of a specific address</p>
<p>An empty message was returned</p>
<pre><code>root@ubuntu:~# bitcoin-cli listtransactions  &quot;3Fr1mGhnPAQ9YDf1dzg4B47PkX5TuvFtYv&quot;
[
]
</code></pre>
 106775: <p>To communicate with your bitcoin core, you must change your bitcoin.conf and set</p>
<p>server=1</p>
<p>Then connect to your bitcoin core with &quot;http://user:password@127.0.0.1:8332&quot;</p>
 102085: <p>As <a href="https://bitcoin.stackexchange.com/users/106775/hamita">@hamita</a> pointed out you need to set <code>server=1</code> in your <code>bitcoin.conf</code> file then you can use <a href="https://github.com/jgarzik/python-bitcoinrpc" rel="nofollow noreferrer">python-bitcoinrpc</a> library to communicate with your bitcoin node.</p>
<p>Here's a short script to get all transactions of an address:</p>
<pre><code>from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from pprint import pprint

# rpc_user and rpc_password are set in the bitcoin.conf file
rpc_user = &quot;&lt;from bitcoin.conf&gt;&quot;
rpc_pass = &quot;&lt;from bitcoin.conf&gt;&quot;
rpc_host = &quot;&lt;ip address of your bitcoind&gt;&quot; # if running locally then 127.0.0.1
rpc_client = AuthServiceProxy(f&quot;http://{rpc_user}:{rpc_pass}@{rpc_host}:8332&quot;, timeout=240)


track_address = &quot;&lt;your address&gt;&quot;
tx_list = rpc_client.listtransactions()

address_tx_list = []
for tx in tx_list:
    if tx['address'] == track_address:
        address_tx_list.append(tx)

pprint(address_tx_list)
</code></pre>
<p>I'm also writing the chapter <a href="https://github.com/jodobear/Learning-Bitcoin-from-the-Command-Line/blob/master/18_4_Accessing_Bitcoind_with_Python.md" rel="nofollow noreferrer">Accessing Bitcoind with Python</a> if you want to know more. NOTE: It is a work in progress.</p>
<p>EDIT: Added <code>server=1</code> for completeness.</p>
