Author

Topic: Check address balance api (Read 150 times)

newbie
Activity: 26
Merit: 30
October 14, 2021, 04: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

legendary
Activity: 952
Merit: 1385
October 14, 2021, 03: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
newbie
Activity: 26
Merit: 30
October 14, 2021, 03: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
legendary
Activity: 952
Merit: 1385
October 14, 2021, 02: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.
newbie
Activity: 26
Merit: 30
October 14, 2021, 01: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
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
October 14, 2021, 03:08:39 AM
#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).
HCP
legendary
Activity: 2086
Merit: 4361
October 13, 2021, 08:35:09 PM
#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
copper member
Activity: 1652
Merit: 1901
Amazon Prime Member #7
October 13, 2021, 03: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.
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
October 13, 2021, 10:01:22 AM
#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
newbie
Activity: 26
Merit: 30
October 13, 2021, 09:32:32 AM
#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.
Jump to: