Bitcoin Forum
May 13, 2024, 06:26:08 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: help me please - Notification about receiving coins  (Read 444 times)
vit05
Hero Member
*****
Offline Offline

Activity: 672
Merit: 526



View Profile
May 10, 2018, 05:48:22 AM
 #21

I use a Google Sheet for this.

Code:
function getBitcoinBalance(bitcoinAddress) {
  var response = UrlFetchApp.fetch('http://blockchain.info/address/' + bitcoinAddress + '?format=json');
  var json = response.getContentText();
  var data = JSON.parse(json);
  return data.final_balance * Math.pow(10,-8);
}

function getBitcoinCashBalance(bitcoinCashAddress) {
  var response = UrlFetchApp.fetch('https://blockdozer.com/insight-api/addr/' + bitcoinCashAddress + '/balance');
  var json = response.getContentText();
  var data = JSON.parse(json);
  return data * Math.pow(10,-8);
}

function getCoinfloorPrice(cur1, cur2) {
  var response = UrlFetchApp.fetch('https://webapi.coinfloor.co.uk:8090/bist/' + cur1 + '/' + cur2 + '/ticker/');
  var json = response.getContentText();
  var data = JSON.parse(json);
  return Number(data.last);
}

function getCryptowatchPrice(exchange, pair) {
  var response = UrlFetchApp.fetch('https://api.cryptowat.ch/markets/' + exchange + '/' + pair + '/price');
  var json = response.getContentText();
  var data = JSON.parse(json);
  return data.result.price;
}

Code:
=getBTCBalance($A$1,CONCATENATE("https://blockchain.info/q/addressbalance/",C7))/100000000

$A$1 = your address
1715624768
Hero Member
*
Offline Offline

Posts: 1715624768

View Profile Personal Message (Offline)

Ignore
1715624768
Reply with quote  #2

1715624768
Report to moderator
1715624768
Hero Member
*
Offline Offline

Posts: 1715624768

View Profile Personal Message (Offline)

Ignore
1715624768
Reply with quote  #2

1715624768
Report to moderator
1715624768
Hero Member
*
Offline Offline

Posts: 1715624768

View Profile Personal Message (Offline)

Ignore
1715624768
Reply with quote  #2

1715624768
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715624768
Hero Member
*
Offline Offline

Posts: 1715624768

View Profile Personal Message (Offline)

Ignore
1715624768
Reply with quote  #2

1715624768
Report to moderator
CrypticBabe
Jr. Member
*
Offline Offline

Activity: 420
Merit: 2


View Profile WWW
May 11, 2018, 07:45:29 AM
 #22

i was looking for that too!
please let me know if you find one!
CrypticBabe
Jr. Member
*
Offline Offline

Activity: 420
Merit: 2


View Profile WWW
May 11, 2018, 07:47:43 AM
 #23

I use a Google Sheet for this.

Code:
function getBitcoinBalance(bitcoinAddress) {
  var response = UrlFetchApp.fetch('http://blockchain.info/address/' + bitcoinAddress + '?format=json');
  var json = response.getContentText();
  var data = JSON.parse(json);
  return data.final_balance * Math.pow(10,-8);
}

function getBitcoinCashBalance(bitcoinCashAddress) {
  var response = UrlFetchApp.fetch('https://blockdozer.com/insight-api/addr/' + bitcoinCashAddress + '/balance');
  var json = response.getContentText();
  var data = JSON.parse(json);
  return data * Math.pow(10,-8);
}

function getCoinfloorPrice(cur1, cur2) {
  var response = UrlFetchApp.fetch('https://webapi.coinfloor.co.uk:8090/bist/' + cur1 + '/' + cur2 + '/ticker/');
  var json = response.getContentText();
  var data = JSON.parse(json);
  return Number(data.last);
}

function getCryptowatchPrice(exchange, pair) {
  var response = UrlFetchApp.fetch('https://api.cryptowat.ch/markets/' + exchange + '/' + pair + '/price');
  var json = response.getContentText();
  var data = JSON.parse(json);
  return data.result.price;
}

Code:
=getBTCBalance($A$1,CONCATENATE("https://blockchain.info/q/addressbalance/",C7))/100000000

$A$1 = your address
sorry i'm noob about it!
but do i have to use this code for different coins?
and do i need to run this on private server?
freesia_pnp888
Newbie
*
Offline Offline

Activity: 112
Merit: 0


View Profile
May 12, 2018, 10:56:55 AM
 #24

should it belong to setting section of choosing which to notify you?
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
May 13, 2018, 12:40:18 PM
 #25

I use a Google Sheet for this.

~snip~

sorry i'm noob about it!
but do i have to use this code for different coins?
and do i need to run this on private server?


You can edit the coin you want to watch here: 

Code:
function getCryptowatchPrice(exchange, pair) {
  var response = UrlFetchApp.fetch('https://api.cryptowat.ch/markets/' + exchange + '/' + pair + '/price');
  var json = response.getContentText();
  var data = JSON.parse(json);
  return data.result.price;
}

When you call getCryptowatchPrice(exchange, pair) you are the function 2 parameters (exchange and pair).

In your Sheet you simply just call the function with the pair you want to check.
E.g. getCryptowatchPrice('binance', 'xmrbtc') to see the XMR/BTC pair on binance.


You can read more about the cryptowat.ch API here: https://cryptowat.ch/docs/api.
And more about how to create own functions in a google sheet here: https://www.makeuseof.com/tag/create-custom-functions-google-sheets/.

Safebit.io
Jr. Member
*
Offline Offline

Activity: 50
Merit: 9


View Profile
May 23, 2018, 02:37:38 PM
 #26

I think he is talking about ERC20 tokens - if that's the case, there's no wallet today that can detect any token.
Forsyth Jones
Hero Member
*****
Offline Offline

Activity: 1162
Merit: 626


Press F for Leo


View Profile WWW
May 26, 2018, 05:30:06 PM
 #27

If your wallet does not notify you when you receive a bitcoin payment you can can use this service: https://www.blockonomics.co/views/wallet-watcher.html?next=%2Fblockonomics#/

You basically create an account and register your bitcoin address that you want to receive as soon as you receive the 1st confirmation of the network, you will receive an email that your address received X amount of coins. Accepts even the new segwit address formats (p2wpkh-bech32). It is a free service and you can register up to 100 addresses, if you want more you will have to pay.

You also have this app Bitcoin Address Watcher you receive notifications on your phone if you receive coins at the address you reported.

▄▄███████████████████▄▄
▄█████████▀█████████████▄
███████████▄▐▀▄██████████
███████▀▀███████▀▀███████
██████▀███▄▄████████████
█████████▐█████████▐█████
█████████▐█████████▐█████
██████████▀███▀███▄██████
████████████████▄▄███████
███████████▄▄▄███████████
█████████████████████████
▀█████▄▄████████████████▀
▀▀███████████████████▀▀
Peach
BTC bitcoin
Buy and Sell
Bitcoin P2P
.
.
▄▄███████▄▄
▄████████
██████▄
▄██
█████████████████▄
▄███████
██████████████▄
███████████████████████
█████████████████████████
████████████████████████
█████████████████████████
▀███████████████████████▀
▀█████████████████████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀

▀▀▀▀███▀▀▀▀
EUROPE | AFRICA
LATIN AMERICA
▄▀▀▀











▀▄▄▄


███████▄█
███████▀
██▄▄▄▄▄░▄▄▄▄▄
████████████▀
▐███████████▌
▐███████████▌
████████████▄
██████████████
███▀███▀▀███▀
.
Download on the
App Store
▀▀▀▄











▄▄▄▀
▄▀▀▀











▀▄▄▄


▄██▄
██████▄
█████████▄
████████████▄
███████████████
████████████▀
█████████▀
██████▀
▀██▀
.
GET IT ON
Google Play
▀▀▀▄











▄▄▄▀
Pages: « 1 [2]  All
  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!