Author

Topic: Methods to monitor an address (Read 1365 times)

hero member
Activity: 1568
Merit: 544
sr. member
Activity: 266
Merit: 250
One world One currency, Bitcoin.
August 07, 2016, 11:10:41 AM
#7
you can use the blockchain api and json parcing so you will get the current balance from the bitcoin address and you can then store the result in database and then check for update with curl and then you can send it into email when new balance comes
legendary
Activity: 1442
Merit: 1186
August 03, 2016, 11:58:26 PM
#6
Hmm thanks for the replies.
These methods would definitely work, but I also want to see if its possible to do this without relying on someone elses website/ email service.

I guess at that point you are looking at running a node yourself and analyzing the blockchain as new transactions come in.
This would be a lot more work but its a project I'm interested in since I'm trying to improve my programming skills and learn more about Bitcoin.

I posted an answer to this a few months back on bitcoin.stackexchange http://bitcoin.stackexchange.com/questions/44373/how-would-one-monitor-an-address-for-a-transaction-and-1-confirmation-in-php

Start a new node at home that will be connected 24/7.
In your bitcoin.conf set a walletnotify

Make sure the address you are monitoring is imported into your bitcoind wallet.
Set wallet notify up in your bitcoin.conf

   
Code:
 walletnotify=curl https://yourwebsite.com/script.php?txid=%s

Now anytime there is activity on your bitcoind wallet your script will run, with the transaction id stored in a GET under `["txid"]` and then you can do a script like:

   
Code:
require("easybitcoin.php");
    $bitcoin = new Bitcoin("someusername", "somepassword");
   
    $txid = $_GET["tx"];
    $txinfo = $bitcoin->gettransaction($txid);
    $details = count($txinfo["details"]);

    for($i=0;$i<$details;$i++){
    $check = $txinfo["details"][$i]["address"];
    $addy = "1SomeAddressToMonitor";
        if($check == $addy){
        //activity on your address, do something like send an email
         $email = "[email protected]";
         $subject = "New Activity";
         $body - "There was a transaction on ".$addy.". The transaction ID is ".$txid;
         mail($email, $subject, $body);
        }
    }
hero member
Activity: 1204
Merit: 531
Metaverse 👾 Cyberweapons
July 31, 2016, 09:03:08 AM
#5
I guess at that point you are looking at running a node yourself and analyzing the blockchain as new transactions come in.
This would be a lot more work but its a project I'm interested in since I'm trying to improve my programming skills and learn more about Bitcoin.

As you wrote, you could look at running a node yourself and analyze the blockchain with a kind of explorer. I advise you to check out some open-source BTC block explorers to get some view about the topic, but probably you will have to find the code for the method in addition.
sr. member
Activity: 434
Merit: 250
July 30, 2016, 03:40:03 PM
#4
Hmm thanks for the replies.
These methods would definitely work, but I also want to see if its possible to do this without relying on someone elses website/ email service.

I guess at that point you are looking at running a node yourself and analyzing the blockchain as new transactions come in.
This would be a lot more work but its a project I'm interested in since I'm trying to improve my programming skills and learn more about Bitcoin.
legendary
Activity: 966
Merit: 1042
July 30, 2016, 12:54:21 PM
#3
If I have a known bitcoin address, and wanted to automatically monitor the balance, and possibly even be notified if there is a change in balance,
what are my options to accomplish this?
Are there functions for this built into core, do I need to be running a node, is there a website API for one of the blockchain sites that can accomplish this?

I've done some googling and found a little info, but figured I would ask here since there is probably more than one way to accomplish this,
I'd like to see the advantages/ disadvantages of some different methods.

(I think I should have posted this in Development & Technical Discussion if a mod wants to move it.)
Thanks in advance for any information I can get!

An easy method for just watching anytime you open your wallet would be to import a watch-only address. In terms of getting a notification though hmm.. I know blockchain.info has this feature and I'm sure other wallets must too. Depending on what wallet you use you should be able to have a notification. Anyways here it is for blockchain.info : https://blockchain.info/wallet/payment-notifications
legendary
Activity: 1204
Merit: 1000
July 30, 2016, 12:47:06 PM
#2
If I have a known bitcoin address, and wanted to automatically monitor the balance, and possibly even be notified if there is a change in balance,
what are my options to accomplish this?
Are there functions for this built into core, do I need to be running a node, is there a website API for one of the blockchain sites that can accomplish this?

I've done some googling and found a little info, but figured I would ask here since there is probably more than one way to accomplish this,
I'd like to see the advantages/ disadvantages of some different methods.

(I think I should have posted this in Development & Technical Discussion if a mod wants to move it.)
Thanks in advance for any information I can get!

Please check a discusion here that was made by SebastianJu few weeks ago about any website/service that monitors a bitcoin address and sends out an email: https://bitcointalksearch.org/topic/website-that-monitors-a-random-bitcoinaddress-and-sends-out-an-email-1536953
sr. member
Activity: 434
Merit: 250
July 30, 2016, 12:29:08 PM
#1
If I have a known bitcoin address, and wanted to automatically monitor the balance, and possibly even be notified if there is a change in balance,
what are my options to accomplish this?
Are there functions for this built into core, do I need to be running a node, is there a website API for one of the blockchain sites that can accomplish this?

I've done some googling and found a little info, but figured I would ask here since there is probably more than one way to accomplish this,
I'd like to see the advantages/ disadvantages of some different methods.

(I think I should have posted this in Development & Technical Discussion if a mod wants to move it.)
Thanks in advance for any information I can get!
Jump to: