Bitcoin Forum
May 21, 2024, 10:49:01 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Methods to monitor an address  (Read 1350 times)
Shiroslullaby (OP)
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250



View Profile
July 30, 2016, 05: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!

SmartIphone
Legendary
*
Offline Offline

Activity: 1204
Merit: 1000



View Profile
July 30, 2016, 05: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://bitcointalk.org/index.php?topic=1536953
cpfreeplz
Legendary
*
Offline Offline

Activity: 966
Merit: 1042


View Profile
July 30, 2016, 05: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
Shiroslullaby (OP)
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250



View Profile
July 30, 2016, 08: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.

PremiumCodeX
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 531


Metaverse 👾 Cyberweapons


View Profile
July 31, 2016, 02:03:08 PM
 #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.

[TUTORIAL] How to steal $350 000?
Best OS for recovering stolen BTCs.
Visit our FREE Bitcointalk thread.
coinableS
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
August 04, 2016, 04:58:26 AM
 #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 = "my@email.com";
         $subject = "New Activity";
         $body - "There was a transaction on ".$addy.". The transaction ID is ".$txid;
         mail($email, $subject, $body);
        }
    }

bitdumper
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250

One world One currency, Bitcoin.


View Profile
August 07, 2016, 04:10:41 PM
 #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

klaaas
Hero Member
*****
Offline Offline

Activity: 1568
Merit: 544



View Profile
August 08, 2016, 04:52:03 PM
 #8

A mix up from https://bitcointalk.org/index.php?topic=27669;all and http://bitnotify.com would be cool.

Some reference., https://en.bitcoin.it/wiki/BitcoinNotify

Shopping online and sats back as a discount! (satsback) + LightningNetwork
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!