<p>This would be nice but, no, there isn't a way to do this.  The simplest way to accumulate this information is to call <code>listtransactions</code> or <code>listunspent</code> for a list of transactions in your account.</p>

<p>After receiving the list, filter for the needed information.  It is worth mentioning the <code>listunspent</code> RPC call.  This can cut down on a lot of returned data if you are only interested in the incoming transactions that make up your current balance.</p>

CC BY-SA 3.0
2013-10-30T12:31:30.840Z
I know this is essentially pyramids answer, however, I wanted to explicitly mention that this isn't possible with the current client.  Furthermore, if you plan on filtering this yourself, and you only need tx's associated with your current wallet value, `listunspent` will save you a lot of data to parse.
RLH
CC BY-SA 3.0
2013-10-30T12:29:56.397Z
2013-10-30T12:39:12.247Z
2013-10-30T12:39:12.247Z
RLH
<p>You can't do this with bitcoind through RPC command, but there are tools available on the internet that will do this for you. For example, <a href="http://blockexplorer.com/q/mytransactions" rel="nofollow">blockexplorer</a> has a query specifically for this purpose. If you want to see how it's done, check out line 724 of <a href="https://github.com/lirazsiri/blockexplorer/blob/master/htdocs/includes/app_stats.inc" rel="nofollow">app_stats.inc</a>:</p>

<pre><code>// This RELIES on the fact that only address transactions will be sent/received
$result = SQL("SELECT encode(blocks.hash, 'hex') AS block, 
                      encode(transactions.hash, 'hex') AS tx, 
                      blocks.number AS blocknum, 
                      blocks.time AT TIME ZONE 'UTC' AS time, 
                      transactions.id AS tid, 
                      transactions.raw AS rawtx

               FROM inputs JOIN transactions ON (inputs.tx = transactions.hash) 
                           JOIN blocks ON (inputs.block = blocks.hash)

               WHERE inputs.type = 'Address' AND 
                     blocks.number&gt;$1 AND inputs.hash160 IN ($addresses)

               UNION 

               SELECT encode(blocks.hash, 'hex') AS block, 
                      encode(transactions.hash, 'hex') AS tx, 
                      blocks.number AS blocknum, 
                      blocks.time AT TIME ZONE 'UTC' AS time, 
                      transactions.id AS tid, 
                      transactions.raw AS rawtx

               FROM outputs JOIN transactions ON (outputs.tx = transactions.hash) 
                            JOIN blocks ON (outputs.block = blocks.hash)

               WHERE outputs.type = 'Address' AND 
                     blocks.number&gt;$1 AND 
                     outputs.hash160 IN ($addresses) 

               ORDER BY tid;", $blocklimit);
</code></pre>

CC BY-SA 3.0
2013-10-30T21:51:51.760Z
2013-10-30T21:51:51.760Z
bvpx
<p>I mean something like listtransactions method but with parameter .</p>

<transactions><transaction-fees><json-rpc>
Is there a JSON-RPC method for retrieving all transactions for a given address?
ikirachen
# Is there a JSON-RPC method for retrieving all transactions for a given address?

(Asked by: username_0 on 2013-10-30)

I mean something like listtransactions method but with parameter .

**Tags:** transactions, transaction-fees, json-rpc


---

## 2 answers

### Answer by username_1 on 2013-10-30. Score: 2 | Accepted answer

This would be nice but, no, there isn't a way to do this. The simplest way to accumulate this information is to call `listtransactions` or `listunspent` for a list of transactions in your account.

After receiving the list, filter for the needed information. It is worth mentioning the `listunspent` RPC call. This can cut down on a lot of returned data if you are only interested in the incoming transactions that make up your current balance.

> **Comments:**
> **username_1**: I know this is essentially pyramids answer, however, I wanted to explicitly mention that this isn't possible with the current client.  Furthermore, if you plan on filtering this yourself, and you only need tx's associated with your current wallet value, `listunspent` will save you a lot of data to parse.  

---

### Answer by username_2 on 2013-10-30. Score: 1

You can't do this with bitcoind through RPC command, but there are tools available on the internet that will do this for you. For example, [blockexplorer](http://blockexplorer.com/q/mytransactions) has a query specifically for this purpose. If you want to see how it's done, check out line 724 of [app\_stats.inc](https://github.com/lirazsiri/blockexplorer/blob/master/htdocs/includes/app_stats.inc):

```
// This RELIES on the fact that only address transactions will be sent/received
$result = SQL("SELECT encode(blocks.hash, 'hex') AS block, 
                      encode(transactions.hash, 'hex') AS tx, 
                      blocks.number AS blocknum, 
                      blocks.time AT TIME ZONE 'UTC' AS time, 
                      transactions.id AS tid, 
                      transactions.raw AS rawtx

               FROM inputs JOIN transactions ON (inputs.tx = transactions.hash) 
                           JOIN blocks ON (inputs.block = blocks.hash)

               WHERE inputs.type = 'Address' AND 
                     blocks.number>$1 AND inputs.hash160 IN ($addresses)

               UNION 

               SELECT encode(blocks.hash, 'hex') AS block, 
                      encode(transactions.hash, 'hex') AS tx, 
                      blocks.number AS blocknum, 
                      blocks.time AT TIME ZONE 'UTC' AS time, 
                      transactions.id AS tid, 
                      transactions.raw AS rawtx

               FROM outputs JOIN transactions ON (outputs.tx = transactions.hash) 
                            JOIN blocks ON (outputs.block = blocks.hash)

               WHERE outputs.type = 'Address' AND 
                     blocks.number>$1 AND 
                     outputs.hash160 IN ($addresses) 

               ORDER BY tid;", $blocklimit);

```


---

