<p>You can see the number of transactions for a Bitcoin address. That's easy. Either through a desktop wallet(Like Bitcoin QT) or using services like blockchain.info. Just search for an address there.</p>

<p>You can't do this for your site thought because you're using Bitpay and they provide a unique address for each payment to your site.</p>

<p>Even if you weren't using Bitpay, you would need to generate a unique address for each purchase on your site to be able to figure out which customer paid how much and when.</p>

<p>You could take an aggregate of the transactions and display them along with each unique address you used but I would <strong>strongly</strong> advise against it. Because then people could <em>easily</em> trace where you spend the Bitcoins that your customers paid you.</p>

<p>Try getting the number from your accounting records instead of trying to get it from Bitcoin payments ;)</p>

CC BY-SA 3.0
2013-07-26T18:46:31.560Z
Thanks, this was informative. The thing I'm looking to do though, is create a dynamically generated sales counter.

Short of installing a 3rd party shopping cart, do you have any suggestions for that?
mardlin
CC BY-SA 3.0
2013-07-27T21:54:20.463Z
You must be keeping records of sales somewhere. Just need to get it from there and display it on your site. Perhaps talk to the person managing your site? But definitely don't use Bitcoin transactions for this. Don't forget to upvote and/or mark as accepted answer if you are satisfied with the answer ;)
Emre K.
CC BY-SA 3.0
2013-07-27T21:57:06.867Z
Other methods are not within the scope of this stack exchange.
Emre K.
CC BY-SA 3.0
2013-07-25T19:27:01.467Z
2013-07-25T19:27:01.467Z
Emre K.
<p>Assuming you have Bitcoin-Qt in use:</p>

<ul>
<li>open the debug window and go to its 'console' view</li>
<li>issue the command <em>listaccounts</em> and from the output select an account name </li>
<li>use that name to issue a <i>listtransactions your_account_name</i> command</li>
<li>in the output count the occurances of <i>"category" : "receive"</i></li>
</ul>

<p>These same commands are available through the RPC interface of Bitcoin-Qt, so that is how you can script the above.</p>

CC BY-SA 3.0
2013-07-25T19:20:35.093Z
Nope, he said he's using bitpay.
Emre K.
CC BY-SA 3.0
2013-07-25T18:38:08.050Z
2013-07-25T18:38:08.050Z
Anonymous
<p>I want to create a counter in my store displaying the number of units sold.</p>

<p>I'm not using a shopping cart, but simply placing a bitpay button.  I'm wondering if there is a way to query the blockchain, that will return the number of transactions sent to an address, over a given time period.</p>

<blockchain><bitpay>
Is there a simple method of tracking number of transactions sent to an address?
mardlin
# Is there a simple method of tracking number of transactions sent to an address?

(Asked by: username_0 on 2013-07-25)

I want to create a counter in my store displaying the number of units sold.

I'm not using a shopping cart, but simply placing a bitpay button. I'm wondering if there is a way to query the blockchain, that will return the number of transactions sent to an address, over a given time period.

**Tags:** blockchain, bitpay


---

## 2 answers

### Answer by username_1 on 2013-07-25. Score: 3

You can see the number of transactions for a Bitcoin address. That's easy. Either through a desktop wallet(Like Bitcoin QT) or using services like blockchain.info. Just search for an address there.

You can't do this for your site thought because you're using Bitpay and they provide a unique address for each payment to your site.

Even if you weren't using Bitpay, you would need to generate a unique address for each purchase on your site to be able to figure out which customer paid how much and when.

You could take an aggregate of the transactions and display them along with each unique address you used but I would **strongly** advise against it. Because then people could *easily* trace where you spend the Bitcoins that your customers paid you.

Try getting the number from your accounting records instead of trying to get it from Bitcoin payments ;)

> **Comments:**
> **username_0**: Thanks, this was informative. The thing I'm looking to do though, is create a dynamically generated sales counter.  Short of installing a 3rd party shopping cart, do you have any suggestions for that?  
> **username_1**: You must be keeping records of sales somewhere. Just need to get it from there and display it on your site. Perhaps talk to the person managing your site? But definitely don't use Bitcoin transactions for this. Don't forget to upvote and/or mark as accepted answer if you are satisfied with the answer ;)  
> **username_1**: Other methods are not within the scope of this stack exchange.  

---

### Answer by username_2 on 2013-07-25. Score: 2

Assuming you have Bitcoin-Qt in use:

* open the debug window and go to its 'console' view
* issue the command *listaccounts* and from the output select an account name
* use that name to issue a *listtransactions your\_account\_name* command
* in the output count the occurances of *"category" : "receive"*

These same commands are available through the RPC interface of Bitcoin-Qt, so that is how you can script the above.

> **Comments:**
> **username_1**: Nope, he said he's using bitpay.  

---

