<p>First: to get transactions from all accounts, use the "*" wildcard.</p>

<p>Second: Bitcoin version 0.5 includes a new listsinceblock RPC command that makes polling for new transactions more efficient.</p>

<p>I wrote a monitorreceived patch that does an HTTP POST whenever a new block or transaction-to-or-from-your-wallet was received, but I haven't pulled it into mainline bitcoin because it would make it VERY easy for websites to do the wrong thing and treat 0-confirmation transactions as "paid" and because it isn't clear what (if anything) to do when block chain re-organizations happen or transactions are orphaned (double-spent).</p>

CC BY-SA 3.0
2011-12-13T02:30:21.963Z
Perhaps make it configurable how many confirmations are needed for it to trigger, having it default to 6. I think it's generally accepted that if you trigger on 6 confirmations, you can ignore the possibility of re-organizations.
David Schwartz
CC BY-SA 3.0
2011-12-07T15:54:01.813Z
2011-12-07T15:54:01.813Z
gavinandresen
<p>I am developing a program that monitors transactions. 
The first question is how can I know there is a new transaction? I can consider the command <code>listtransactions</code>. However, there is a bit of an issue about this command which I posted in another thread. In short, I can't list transactions from all accounts by NOT providing the account parameter.
Even if it works for me. The API says: 
listtransactions    [account] [count=10] [from=0]    Returns up to [count] most recent transactions skipping the first [from] transactions for account [account]. If [account] is not provided it will return recent transactions from all accounts.  </p>

<p>I ran this command with parameters: "", 1,3. I still got the first 3 transactions. </p>

<p>Does anybody have a better idea about how to get new transactions that have not been checked?</p>

CC BY-SA 3.0
2011-11-20T17:15:14.910Z
No answers yet? If you happen to find the answer somewhere else (e.g. Forums), please post it back here.
ripper234
<transactions>
How to know there is a new transaction?
popman
# How to know there is a new transaction?

(Asked by: username_0 on 2011-10-25)

I am developing a program that monitors transactions.
The first question is how can I know there is a new transaction? I can consider the command `listtransactions`. However, there is a bit of an issue about this command which I posted in another thread. In short, I can't list transactions from all accounts by NOT providing the account parameter.
Even if it works for me. The API says:
listtransactions [account] [count=10] [from=0] Returns up to [count] most recent transactions skipping the first [from] transactions for account [account]. If [account] is not provided it will return recent transactions from all accounts.

I ran this command with parameters: "", 1,3. I still got the first 3 transactions.

Does anybody have a better idea about how to get new transactions that have not been checked?

**Tags:** transactions

> **Comments:**
> **username_1**: No answers yet? If you happen to find the answer somewhere else (e.g. Forums), please post it back here.  

---

## 1 answers

### Answer by username_2 on 2011-12-07. Score: 6

First: to get transactions from all accounts, use the "\*" wildcard.

Second: Bitcoin version 0.5 includes a new listsinceblock RPC command that makes polling for new transactions more efficient.

I wrote a monitorreceived patch that does an HTTP POST whenever a new block or transaction-to-or-from-your-wallet was received, but I haven't pulled it into mainline bitcoin because it would make it VERY easy for websites to do the wrong thing and treat 0-confirmation transactions as "paid" and because it isn't clear what (if anything) to do when block chain re-organizations happen or transactions are orphaned (double-spent).

> **Comments:**
> **username_3**: Perhaps make it configurable how many confirmations are needed for it to trigger, having it default to 6. I think it's generally accepted that if you trigger on 6 confirmations, you can ignore the possibility of re-organizations.  

---

