4
Is there a way to get a list of the latest transactions IDs? I know I can watch incoming transaction almost live on http://blockchain.info, but is there a way to download the last 10.000 transaction IDs?
Thanks for any hints!
4
Is there a way to get a list of the latest transactions IDs? I know I can watch incoming transaction almost live on http://blockchain.info, but is there a way to download the last 10.000 transaction IDs?
Thanks for any hints!
2
Transactions have no intrinsic total order, which would be needed to have a chronological order. Two nodes might independently create transactions a and b and send them to a common nodes N and M. N receives first a and then b, while M receives first b and then a, which would you say is the correct order?
If there were a total order it would be possible to completely avoid the double spending problem as it would immediately be clear which is the winning transaction between two conflicting ones: just pick the first.
Going back to your original question: there are two separate sets of transactions you have to consider.
bitcoind provides access to both these sets:
getmemorypool to get the transactions in the memory poolgetinfo to get the height of the latest block, and then use getblockhash + getblock to iterate through the blocks in descending order and extract the transaction hashes. Stop when you have 10'000 transactions in total.2
Transactions don't have an accurate timestamp so their chronological ordering comes at the granularity of which block the transaction was included in.
Access to the "raw transactions" is available using the Bitcoin.org client's API, however it is not necessarily trivial to do so.
Armory provides some methods to pull transactions -- see the code in the extras directory.
1Thanks for pointing out that there can't be a real chronological order. I went with your suggestion and used bitcoind to fetch info and transactions from the latest blocks – worked great. – Max Min – 2013-01-19T17:49:01.763