Bitcoin Forum

Other => Beginners & Help => Topic started by: popman on October 18, 2011, 02:01:48 PM



Title: How do I know there is a new transaction?
Post by: popman on October 18, 2011, 02:01:48 PM
I am developing a program that monitors the transaction.
The first question is that how I know there is a new transcation? I can consider the command ListTranscation. However, there is a bit issue about this command I post in another thread. In short, I can't list transaction from all account by NOT provide account.
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] not provided will return recent transaction from all accounts. 


 It returns up to [count] most recent transaction. How do I know how many transaction is new after I read last time? If I set count as 10, but there is 11 new transactions if I get busy, then I miss one. So I have to set count parameter an unreachable number, say 10000, and check it every second to make sure I never miss one transaction?


Or is there an alternative way to check new transaction?


Title: Re: How do I know there is a new transaction?
Post by: kokjo on October 18, 2011, 02:04:24 PM
don't use accounts. use "" as account.


Title: Re: How do I know there is a new transaction?
Post by: popman on October 19, 2011, 04:06:12 AM
You mean just use one single account?


Title: Re: How do I know there is a new transaction?
Post by: nmat on October 20, 2011, 07:30:44 AM
I am developing a program that monitors the transaction.
The first question is that how I know there is a new transcation? I can consider the command ListTranscation. However, there is a bit issue about this command I post in another thread. In short, I can't list transaction from all account by NOT provide account.
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] not provided will return recent transaction from all accounts. 


 It returns up to [count] most recent transaction. How do I know how many transaction is new after I read last time? If I set count as 10, but there is 11 new transactions if I get busy, then I miss one. So I have to set count parameter an unreachable number, say 10000, and check it every second to make sure I never miss one transaction?


Or is there an alternative way to check new transaction?

In this forum section these sort of questions sometimes don't reach the right audience. If you don't get a good answer (or if you don't get out of the newbie status), you can always try to ask it at the Bitcoin Q&A (http://Bitcoin.stackexchange.com)


Title: Re: How do I know there is a new transaction?
Post by: btcfan on October 25, 2011, 04:02:13 AM
I used ListTransaction with Count = 10 and From = 3.But I still get the first 3 transactions.  How does it work?

I think this is a very common questions. Does anyone know how to list the transactions that have not checked?