Is it possible to view unconfirmed transactions with the bitcoin client?

8

5

This site shows you unconfirmed bitcoin transactions: https://blockchain.info/unconfirmed-transactions

As I understand it, these unconfirmed transactions are received and rebroadcast by every bitcoin client. Given that they are on my computer, how would I go about extracting this information (i.e. a list of all unconfirmed bitcoin transactions) from the bitcoin client?

schulwitz

Posted 2014-01-17T08:55:53.227

Reputation: 285

Answers

14

The RPC interface includes the getrawmempool command which returns transactions in your memory pool. Transactions stay in your memory pool until they're confirmed, so this is effetively a list your known unconfirmed transacions.

Since getrawmempool returns only a list of transaction ids, you'll have to getrawtransaction <txid> for each transaction id in your memory pool. Remember you can get JSON-formmated output via getrawtransaction <txid> 1.

kaoD

Posted 2014-01-17T08:55:53.227

Reputation: 958

It may be out of date, see https://bitcoin.org/en/developer-reference#getrawmempool it appears getrawmempool already has extra argument for tx details

jangorecki 2015-08-28T18:11:25.187