Bitcoin Forum
March 29, 2024, 12:57:06 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Get All Transactions Sent to a Specific Address?  (Read 243 times)
x86txt (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 1


View Profile
August 05, 2019, 08:47:06 PM
Merited by ABCbits (1)
 #1

I run a full bitcoind node with txindex=1 enabled. Is there a way for me to pull all transactions sent to a specific address? I'm trying to automate a script to count the number (not amount, just number) of donations to this address.
1711717026
Hero Member
*
Offline Offline

Posts: 1711717026

View Profile Personal Message (Offline)

Ignore
1711717026
Reply with quote  #2

1711717026
Report to moderator
1711717026
Hero Member
*
Offline Offline

Posts: 1711717026

View Profile Personal Message (Offline)

Ignore
1711717026
Reply with quote  #2

1711717026
Report to moderator
1711717026
Hero Member
*
Offline Offline

Posts: 1711717026

View Profile Personal Message (Offline)

Ignore
1711717026
Reply with quote  #2

1711717026
Report to moderator
Remember that Bitcoin is still beta software. Don't put all of your money into BTC!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1711717026
Hero Member
*
Offline Offline

Posts: 1711717026

View Profile Personal Message (Offline)

Ignore
1711717026
Reply with quote  #2

1711717026
Report to moderator
1711717026
Hero Member
*
Offline Offline

Posts: 1711717026

View Profile Personal Message (Offline)

Ignore
1711717026
Reply with quote  #2

1711717026
Report to moderator
1711717026
Hero Member
*
Offline Offline

Posts: 1711717026

View Profile Personal Message (Offline)

Ignore
1711717026
Reply with quote  #2

1711717026
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3346
Merit: 6473


Just writing some code


View Profile WWW
August 05, 2019, 09:35:19 PM
Merited by bones261 (2), ABCbits (1)
 #2

No. What you want is an address index. Bitcoin Core does not have an address index. The transaction index is not an address index.

darosior
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
August 06, 2019, 09:13:07 AM
Merited by ABCbits (1)
 #3

I run a full bitcoind node with txindex=1 enabled. Is there a way for me to pull all transactions sent to a specific address? I'm trying to automate a script to count the number (not amount, just number) of donations to this address.
You can using libbitcoin : https://github.com/libbitcoin/libbitcoin-explorer/wiki/bx-fetch-history. IBD is suboptimal though.
legendster
Hero Member
*****
Offline Offline

Activity: 1778
Merit: 764


www.V.systems


View Profile
August 06, 2019, 06:32:34 PM
 #4

Now I am not a dev but isn' there a btcd to look up local arbitrary addresses? And doesn't it also have an address index unlike bitcoind? Just enable it in the config by adding addrindex to a line and do an API lookup in the searchrawtransactions should enable OP to get all txs sent to a particular address.


Also there are external things like:
https://github.com/runeksvendsen/blockchain-restful-address-index
https://github.com/bitcoinjs/indexd


Correct me if I am wrong guys.. I only have masternode hosting experience of shitty btc forks


   ██████████        ████████████
     ██████████        ██████████
       ██████████        ████████
         ██████████        ██████
           ██████████        ████
             ██████████        ██
               ██████████
                 ██████████
                   ████████
                     ██████
                       ████
                        ██
|
     ▄▀▀▀▀▀▀▀▀▀█                 ▄▀▀▀▀▀▀▀▀▀█
 ▄▀                ▄▀█             ▄▀                ▄▀█
 ██████████    █             ██████████    █
 █                █                   █                █    █
 █                █     ▀▀▀▀▀▀▀█                █    █
 █                █  ▄▀             █                █  ▄▀
 ██████████▀                 ██████████▀
          █                                    █
          █                                    █
     ▄▀ █  ▀▀▀▀█                   ▄▀ █ ▀▀▀▀▀▀█
 ▄▀             ▄▀█               ▄▀               ▄▀ █
 █████████   █               ██████████    █
 █              █   █               █                █    █
 █              █   █               █                █    █
 █              █  ▄▀▀▀▀▀▀▀  █                █  ▄▀
 █████████▀                  ██████████▀

Blockchain
Database
                             ▄▄▄
                         ▄▄▀  ▀▄▄
        ▄           ▄▄▀  ▄▀▄  ▀▄▄
      █▄█   █████████████████    █
        █     █                              █ ▄▀ ▌
        █     █        ▄    █   ▄         █▀ ▄▌
       ██    █      ▀▄   █    ▄▀       █▀█
       ▌ ▌   █            █                █  █
       ▌ ▌   █                              █  █
       ██    ███████████████████
                     ▀▀▄  ▀▄▀  ▄▀▀
                         ▀▀▄  ▄▀▀
                             ▀▀▀
Dev friendly
SDK Platform
                             ▄▄▄▄
                         ▄▄█    █▄▄
                     ▄▄█            █▄▄
                 ▄▄█       ▄▄▄       █▄▄
                 █       ▄▀      ▀▄       █
               █▀     █      █      █     ▀█
               ▀▀█  █   ▄█▀█▄   █  █▀▀
               █▀▀   █  ▀███▀  █   ▀▀█
               ▀▀█     █    █    █     █▀▀
                   ▀▀█   █  █  █   █▀▀
                       ▀████████▀
                           █▄▄▄▄█
                 █        █▄▄▄▄█      █
             ▄▀ █▄                   ▄█  ▀▄
            █   █▀▄         ▀      ▄▀█    █
           █   █  █  ▌      ▀   ▐  █  █    █
           █   █▄▀▄▌      ▀   ▐▄▀▄█    █
           █       █          ▀        █       █
        █▀▀▀▀▀▀█                █▀▀▀▀▀▀█
        ▀▀▀▀▀▀▀▀                ▀▀▀▀▀▀▀▀
User-friendly
Token Creation
|
danda
Full Member
***
Offline Offline

Activity: 201
Merit: 157


View Profile WWW
August 11, 2019, 05:05:41 AM
Merited by ABCbits (2), hugeblack (1), A-Bolt (1)
 #5

Various answers to this question.

1. bitcoind does not currently have an address index, but may be getting one "soon".  See this pull request.

2. There are at least a couple patches to bitcoind that add an address index.  But then you've gotta build your own bitcoind and keep it maintained over time.  fun.

3. There are at least two 3rd party block explorer solutions that build off bitcoind's data without requiring a custom bitcoind.  I'm aware of esplora by Blockstream and bitcore-node by (cough) Bitpay, which apparently is replacing Insight.

4. btcd has an address index and an API called searchrawtransactions that is optimized with a filter to weed out unrelated vin/vout.  This is the best combination of privacy and efficiency that I've found, but with a lengthy setup.

5. Various online block explorers offer APIs to search by address.  Some even can search multiple addresses at the same time.  But of course you lose privacy calling them with your addresses.   I've been keeping a list of some of these.

6. my tool, bitprices can use btcd locally or any of the explorer APIs, and can also round-robin between them so no single service gets all your wallet addresses.  If/when bitcoind offers a suitable index+api I will support it also.  There is also a web frontend.




mybitprices.info - wallet auditing   |  hd-wallet-derive - derive keys locally |  hd-wallet-addrs - find used addrs
lightning-nodes - list of LN nodes  |  coinparams - params for 300+ alts  |  jsonrpc-cli - cli jsonrpc client
subaddress-derive-xmr - monero offline wallet tool
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!