<p>The most efficient way to get a list of transactions from multiple addresses is to store every wallet transaction in a database locally, something like MySQL or MongoDB, and then run your queries on that database.</p>

<p>You can sync your local database with the Bitcoin wallet via RPC by periodically calling listsinceblock() and keeping track of the last block or by running the client with the optional -walletnotify parameter to run a script to notify your database of new transactions.</p>

<p>Be careful with -walletnotify however. It will be called twice for every transaction and if you have a lot of transactions, it can happen a lot. So make sure the command -walletnotify calls doesn't use a lot of CPU/RAM.</p>

CC BY-SA 4.0
2021-08-03T00:43:18.683Z
Hey, this is exactly what I am trying to do, store deposit transactions for each unique user address from the output received from `listsinceblock`. I would like to ask, when computing the sum of deposits for each unique user address, does one consider transactions only of category `receive` and `generate` and ignore all other transactions categories?
philosopher
CC BY-SA 3.0
2013-11-28T15:14:05.210Z
2013-11-28T15:14:05.210Z
Bitlab.co
<p>In the API CallList: 
<a href="https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list" rel="nofollow">https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list</a></p>

<p>You can pass an address as a parameter to "listtransactions" to get the latest list of transactions from an address. What if I would like to get the most recent 25 transactions from a list of 20 addresses. Does this mean I have to make the "listtransactions" call 20 times and then sort the end results?</p>

<p>Calling the API endpoint 20 times is fine, my problem is that if we needed to do pagination that will become very unmanageable very quickly, because it is really hard to determine what is transactions 26-50 from 20 different addresses</p>

<p>Thank you</p>

<p>EDIT:
I found that BlockchainInfo offers a very convenient endpoint for this:</p>

<p><a href="https://blockchain.info/api/blockchain_api" rel="nofollow">https://blockchain.info/api/blockchain_api</a></p>

<p>Endpoint: <a href="http://blockchain.info/multiaddr?active=" rel="nofollow">http://blockchain.info/multiaddr?active=</a>$address|$address (Multiple addresses divided by |)
However, this only returns "txs":[--Latest 50 Transactions--]
and, this does not allow you to do an offset (for example, to get transaction 51-100)</p>

CC BY-SA 3.0
2013-11-28T11:50:39.237Z
If you found an answer to your question please post it as an answer. Only use edits to clarify your question.
Stéphane Gimenez
CC BY-SA 3.0
2013-11-28T20:17:33.160Z
@StéphaneGimenez, thanks for the notice. Although, I didn't find an answer to my question. I found a partial solution that does not address my needs.
samol
<api><json-rpc>
Bitcoin Client API-RPC: Efficient way to list transactions from a list of addresses
samol
# Bitcoin Client API-RPC: Efficient way to list transactions from a list of addresses

(Asked by: username_0 on 2013-11-28)

In the API CallList:
<https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list>

You can pass an address as a parameter to "listtransactions" to get the latest list of transactions from an address. What if I would like to get the most recent 25 transactions from a list of 20 addresses. Does this mean I have to make the "listtransactions" call 20 times and then sort the end results?

Calling the API endpoint 20 times is fine, my problem is that if we needed to do pagination that will become very unmanageable very quickly, because it is really hard to determine what is transactions 26-50 from 20 different addresses

Thank you

EDIT:
I found that BlockchainInfo offers a very convenient endpoint for this:

<https://blockchain.info/api/blockchain_api>

Endpoint: <http://blockchain.info/multiaddr?active=>$address|$address (Multiple addresses divided by |)
However, this only returns "txs":[--Latest 50 Transactions--]
and, this does not allow you to do an offset (for example, to get transaction 51-100)

**Tags:** api, json-rpc

> **Comments:**
> **username_1**: If you found an answer to your question please post it as an answer. Only use edits to clarify your question.  
> **username_0**: @username_1, thanks for the notice. Although, I didn't find an answer to my question. I found a partial solution that does not address my needs.  

---

## 1 answers

### Answer by username_2 on 2013-11-28. Score: 3 | Accepted answer

The most efficient way to get a list of transactions from multiple addresses is to store every wallet transaction in a database locally, something like MySQL or MongoDB, and then run your queries on that database.

You can sync your local database with the Bitcoin wallet via RPC by periodically calling listsinceblock() and keeping track of the last block or by running the client with the optional -walletnotify parameter to run a script to notify your database of new transactions.

Be careful with -walletnotify however. It will be called twice for every transaction and if you have a lot of transactions, it can happen a lot. So make sure the command -walletnotify calls doesn't use a lot of CPU/RAM.

> **Comments:**
> **username_3**: Hey, this is exactly what I am trying to do, store deposit transactions for each unique user address from the output received from `listsinceblock`. I would like to ask, when computing the sum of deposits for each unique user address, does one consider transactions only of category `receive` and `generate` and ignore all other transactions categories?  

---

