How to display a list of incoming bitcoin Transaction history in my own wallet?

1

I have gone through various references including

How to get a history of incoming and outgoing transactions for a certain address?

Fetch list of transaction where i have received the bitcoin?

I am creating a Bitcoin Wallet,

And I want to display transaction list as a part of my Wallet.

To achieve this goal I can make a local database entry of all the send transactions which are within the Wallet.

But How can I get the incoming Bitcoin Transaction Details which are perform out side my wallet?

Maroon5

Posted 2018-09-13T09:06:01.437

Reputation: 45

Did this answer not help you? https://bitcoin.stackexchange.com/a/19516/60443

– JBaczuk – 2018-09-13T14:00:40.643

No It didn't exactly. From the link I believe We can have the Tx list from addresses. But imagine if 100 addresses will be there in a wallet and to fetch all the Txs of all the 100 addresses will have to query 100 times and to get details again for that much iterations. :D – Maroon5 – 2018-09-13T14:28:44.793

Answers

1

But How can I get the incoming Bitcoin Transaction Details which are perform out side my wallet?

Unless you are using bitcoin-core wallet (e.g. listreceivedbyaddress), there isn't a way to query bitcoin-core for transactions by address. To do this, you will need to parse the blockchain and create your own database indexed by address.

An example implementation that can be used for reference is Bitpay Insight: https://github.com/bitpay/insight

JBaczuk

Posted 2018-09-13T09:06:01.437

Reputation: 6 602

Oh man! really! I am using a blockcypher apis for my wallet. Is there any other way to achieve this? Or Other way is I will display Tx list which performed only within Wallet. If it's acceptable!! Don't know. – Maroon5 – 2018-09-14T04:34:14.840

Yes, if you want to use a 3rd party api. I'd recommend looking into this endpoint, it returns a list of tx related to an address: https://www.blockcypher.com/dev/bitcoin/#address-full-endpoint

– JBaczuk – 2018-09-14T04:38:57.530

But imagine if 100 addresses will be there in a wallet and to fetch all the Txs of all the 100 addresses will have to query 100 times and to get details again for that much iterations? – Maroon5 – 2018-09-14T04:40:48.793

Yep. That's a good reason to parse the blockchain into your own database to reduce the latency – JBaczuk – 2018-09-14T04:46:32.167

1

The way I go now is to record the address in the wallet in mongodb, and then parse the address in the block and the database for comparison. If it is the address in the wallet, record it

老板鱼丸粗面

Posted 2018-09-13T09:06:01.437

Reputation: 31