Bitcoin Forum
June 04, 2024, 04:28:42 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Check address balance api  (Read 127 times)
glascake (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 30


View Profile
October 13, 2021, 02:32:32 PM
 #1

Hello community,
I am looking for a api exactly like this one:
https://blockchain.info/rawaddr/1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD
All I need is the "total_received" :/
sadly my server ip gets banned after a few requests.
Any alternative?
If you suggest a selfhosted solution it has to run on win and linux.

PS: I cannot run electrum or download the whole blockchain.
NeuroticFish
Legendary
*
Offline Offline

Activity: 3696
Merit: 6416


Looking for campaign manager? Contact icopress!


View Profile
October 13, 2021, 03:01:22 PM
Merited by glascake (5), hugeblack (4), ABCbits (2), MrFreeDragon (1)
 #2

Hello community,
I am looking for a api exactly like this one:
https://blockchain.info/rawaddr/1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD
All I need is the "total_received" :/
sadly my server ip gets banned after a few requests.
Any alternative?
If you suggest a selfhosted solution it has to run on win and linux.

PS: I cannot run electrum or download the whole blockchain.

Since you asked for received, here you are: https://chain.so/api/v2/get_address_received/BTC/1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD
The result is in bitcoin, not satoshi, but I hope that's not a problem.

For actual balance you may need get_address_balance instead of get_address_received.
I'll add:
* docu is https://chain.so/api/
* 300 requests/minute are free-of-charge for now; try to not get over that value, else they may ban you too  Cheesy

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
October 13, 2021, 08:45:05 PM
 #3

PS: I cannot run electrum or download the whole blockchain.
If this is true, you will ultimately need to pay to receive access to this information. When you use an API, you are ultimately using someone else's resources and data. Many APIs have a "free" tier in which devs can test the API and use it in low volumes.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
October 14, 2021, 01:35:09 AM
 #4

If you suggest a selfhosted solution it has to run on win and linux.

PS: I cannot run electrum or download the whole blockchain.
Any self-hosted solution will likely involve Bitcoin Core and downloading the whole blockchain. There isn't really any other way to be able to check "random" address balances without having the entire blockchain data to be able to scan/parse.

If you are unable to host this data locally, then you'll either need:

1. to rely on API's hosted elsewhere
or
2. host the data remotely (ie. on a rented server etc)


Given it appears that you're looking for a "free" solution, then option #1 is probably your best bet... unfortunately, as mentioned above, "free" API's are going to come with limitations. Usually on the number of requests able to be made in a specific time period. The only way around those limits will generally require having a paid account/subscription.


What sort of volume of requests are you looking at making? Huh

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
NotATether
Legendary
*
Offline Offline

Activity: 1624
Merit: 6873


bitcoincleanup.com / bitmixlist.org


View Profile WWW
October 14, 2021, 08:08:39 AM
Merited by ABCbits (1)
 #5

I spoke with Getblock.io admins and they said it's possible to do with their API (their free tier, definitely).

Their BTC endpoint is https://btc.getblock.io/mainnet/ but you need an API key to access it which you get from creating an account. They do give you 40k free requests per month however. You can apparently give it bitcoind JSON-RPC requests - the same ones as Bitcoin Core, even! (It just passes them on to their node).

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
glascake (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 30


View Profile
October 14, 2021, 06:52:52 PM
 #6

@NotATether that is awesome

@HCP you are right this is limiting, but relying on an api to check balance isnt that bad.
for the beginning i am ofcourse looking for a free solution. but i have no problem paying once my shop gets profitable. Im justing trying to reduce the upfront cost.

I think @NeuroticFish 's solution might be the best, I think 5 requests per second might be enought. I am not too optimistic Cheesy
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
October 14, 2021, 07:06:07 PM
 #7

Hello community,
I am looking for a api exactly like this one:
https://blockchain.info/rawaddr/1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD
All I need is the "total_received" :/
sadly my server ip gets banned after a few requests.

There is simpler one:
Code:
https://blockchain.info/balance?active=1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD
which produces
Code:
{"1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD":{"final_balance":4654010,"n_tx":16,"total_received":4654010}}

BUT! You may ask for several addresses at the same time:
Code:
https://blockchain.info/balance?active=1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD,12g7ex6Grdt4FUAmXoZxwN4a4Pbt8SkKT2

I do not know how many requests you need to launch, but in my program I check 10 addresses every 2 seconds and it works - I have never been blacklisted.
glascake (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 30


View Profile
October 14, 2021, 08:06:26 PM
 #8

@PawGo do you request 10 address every 2 seconds so:
A) 1 request with multiple addresses
or B) 10 requests with one address each
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
October 14, 2021, 08:13:35 PM
 #9

@PawGo do you request 10 address every 2 seconds so:
A) 1 request with multiple addresses
or B) 10 requests with one address each

A
glascake (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 30


View Profile
October 14, 2021, 09:06:11 PM
 #10

@PawGo
Hm, their site states 1request/10sec
https://www.blockchain.com/api/q


im going to use the other suggested api

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!