0

How to get both confirmed and unconfirmed transaction details of foreign(non-wallet) addresses from bitcoin-node server? Actually i have generated the addresses using third party library and sent some btc on it. Now i want to know confirmed and unconfirmed transaction details using my own local bitcoin-core node server. Can Somebody help me? Thanks in advance.

  • Which bitcoin client are you running? – foba Dec 27 '19 at 21:29
  • bitcoin-core 0.17 – Jvd Dec 28 '19 at 4:19
0

If I understand correctly you can use this command getrawtransaction to get a transaction that is in your node's mempool i.e. an unconfirmed transaction.

However, if you are looking for a transaction that has been confirmed, you'll need to know the blockhash of the block in which that transaction resides.

Example:

> bitcoin-cli getrawtransaction "mytxid" false "myblockhash"

Or if you have enabled -txindex option on your client then you can use getrawtransaction and you don't need to supply the blockhash. Check out this question for details on this option.

Refer to this site for a more detailed explanation of the getrawtransaction command.

|improve this answer|||||
  • Actually i want to know the transaction that is send by others into my address and that transaction is not yet confirmed(unconfirmed).Here addresses are created outside the node. Then how we can check status of unconfirmed transactions? Note: We don't have transaction id for unconfirmed receive transaction. We only have address. – Jvd Dec 28 '19 at 5:52
  • By unconfirmed do you mean "pending" transactions or transactions in the mempool? – foba Dec 28 '19 at 21:14
  • Yes, pending transaction of addresses which doesn't belong to my local bitcoin-core node . – Jvd Dec 30 '19 at 5:20
  • The only way you can see that pending transaction is if it gets broadcasted and your local node receives it into it's mempool (AFAIK). Are you not able to see the pending transaction in your nodes mempool? – foba Dec 30 '19 at 5:33
  • you mean to say we can get pending transaction of address into our local node mempool (private keys & address belongs to other node)? – Jvd Dec 30 '19 at 5:46
0

You can use scantxoutset command which was introduced in Bitcoin Core 0.17. It scans the UTXO set for any UTXOs for the address (or output script) provided. It is faster than the rescan when you import a private key.

Type help scantxoutset to see the help. https://bitcoin.org/en/developer-reference#scantxoutset

|improve this answer|||||
  • Thanks m1xolyd1an, scantxoutset gives details of confirmed transactions. I am looking for unconfirmed transactions also. – Jvd Dec 28 '19 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.