Bitcoin Forum
May 29, 2024, 12:07:35 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Request address balance from any Electrum server  (Read 123 times)
bnbstorm (OP)
Copper Member
Member
**
Offline Offline

Activity: 98
Merit: 34


View Profile
January 31, 2023, 08:41:33 PM
Last edit: January 31, 2023, 08:57:24 PM by bnbstorm
Merited by hugeblack (4), ABCbits (1)
 #1

Hello
Can we request an Electrum server to tell us balance of an address? As electrum software does this by querying these servers to get balances of addresses so can we do this manually in browser or through some short code? What will be the process?
Can Electrum servers be used to confirm payments for website invoices?
Thanks

Stalker22
Legendary
*
Offline Offline

Activity: 1512
Merit: 1359



View Profile
January 31, 2023, 09:18:14 PM
 #2

Why do you need an Electrum server when you can check the balance of any address on any blockchain explorer or via numerous blockchain APIs??
Or am I missing something here?

█████████████████████████
██
█████▀▀███████▀▀███████
█████▀░░▄███████▄░░▀█████
██▀░░██████▀░▀████░░▀██
██▀░░▀▀▀████████████░░▀██
██░░█▄████▀▀███▀█████░░██
██░░███▄▄███████▀▀███░░██
██░░█████████████████░░██
██▄░░████▄▄██████▄▄█░░▄██
██▄░░██████▄░░████░░▄██
█████▄░░▀███▌░░▐▀░░▄█████
███████▄▄███████▄▄███████
█████████████████████████
.
.ROOBET 2.0..██████.IIIIIFASTER & SLEEKER.██████.
|

█▄█
▀█▀
████▄▄██████▄▄████
█▄███▀█░░█████░░█▀███▄█
▀█▄▄░▐█████████▌▄▄█▀
██▄▄█████████▄▄████▌
██████▄▄████████
█▀▀████████████████
██████
█████████████
██
█▀▀██████████████
▀▀▀███████████▀▀▀▀
|.
    PLAY NOW    
bnbstorm (OP)
Copper Member
Member
**
Offline Offline

Activity: 98
Merit: 34


View Profile
January 31, 2023, 09:26:25 PM
 #3

Why do you need an Electrum server when you can check the balance of any address on any blockchain explorer or via numerous blockchain APIs??
Or am I missing something here?


API usually have limits to check balances like you can request X amount of addresses in X seconds. some also require KYC. If we can query our own server or multiple public servers then it is decentralized way.

Charles-Tim
Legendary
*
Offline Offline

Activity: 1554
Merit: 4925


Leading Crypto Sports Betting & Casino Platform


View Profile
January 31, 2023, 09:52:17 PM
 #4

Can we request an Electrum server to tell us balance of an address?
Just that if you use Electrum server, you are running your own node, but you can import the addresses just like the normal way on Electrum and see the coin balance after the addresses import.

Can Electrum servers be used to confirm payments for website invoices?
If you need what to help you process transactions for your website, it would be better to make use of a payment processor, check the list of payment processor.

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
DireWolfM14
Copper Member
Legendary
*
Offline Offline

Activity: 2184
Merit: 4241


Join the world-leading crypto sportsbook NOW!


View Profile WWW
January 31, 2023, 10:29:53 PM
Merited by hugeblack (4), pooya87 (2), ABCbits (1)
 #5

Hello
Can we request an Electrum server to tell us balance of an address? As electrum software does this by querying these servers to get balances of addresses so can we do this manually in browser or through some short code? What will be the process?
Can Electrum servers be used to confirm payments for website invoices?
Thanks

Yes, there is.  Install and run your own blockchain explorer.  Mempool.space is easy enough to install.  Blocstream can also be installed locally and used as a private blockchain explorer.  The easiest thing to do is follow Charles-Tim's suggestion; i.e. import all the public addresses into an Electrum watch-only wallet.

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
▄▄██████▄▄
▀█▀
█  █▀█▀
  ▄█  ██  █▄  ▄
█ ▄█ █▀█▄▄█▀█ █▄ █
▀▄█ █ ███▄▄▄▄███ █ █▄▀
▀▀ █    ▄▄▄▄    █ ▀▀
   ██████   █
█     ▀▀     █
▀▄▀▄▀▄▀▄▀▄▀▄
▄ ██████▀▀██████ ▄
▄████████ ██ ████████▄
▀▀███████▄▄███████▀▀
▀▀▀████████▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
bnbstorm (OP)
Copper Member
Member
**
Offline Offline

Activity: 98
Merit: 34


View Profile
February 01, 2023, 12:07:03 AM
Last edit: February 01, 2023, 03:42:56 AM by Mr. Big
 #6

Hello
Can we request an Electrum server to tell us balance of an address? As electrum software does this by querying these servers to get balances of addresses so can we do this manually in browser or through some short code? What will be the process?
Can Electrum servers be used to confirm payments for website invoices?
Thanks

Yes, there is.  Install and run your own blockchain explorer.  Mempool.space is easy enough to install.  Blocstream can also be installed locally and used as a private blockchain explorer.  The easiest thing to do is follow Charles-Tim's suggestion; i.e. import all the public addresses into an Electrum watch-only wallet.

Importing watch only is a manual process. I am looking for a programmable solution. In which we can send requests to electrum servers. Like simple http or json requests



Can we request an Electrum server to tell us balance of an address?
Just that if you use Electrum server, you are running your own node, but you can import the addresses just like the normal way on Electrum and see the coin balance after the addresses import.

Can Electrum servers be used to confirm payments for website invoices?
If you need what to help you process transactions for your website, it would be better to make use of a payment processor, check the list of payment processor.

Thank you. I understand payment processors and already went through this list. I want to query data from Electrum servers or nodes.

DireWolfM14
Copper Member
Legendary
*
Offline Offline

Activity: 2184
Merit: 4241


Join the world-leading crypto sportsbook NOW!


View Profile WWW
February 01, 2023, 03:11:26 AM
 #7

Importing watch only is a manual process. I am looking for a programmable solution. In which we can send requests to electrum servers. Like simple http or json requests

You'll have to forgive me, I'm trying to guess what you're trying to do, you haven't given us many details.  It sounds like you want to take the addresses from your website sales, and automatically check their balances.  You can do that with the Electrum client.  You can copy the entire list of public addresses and paste them into a new or existing watch-only wallet.  It's manual, but doesn't take very much time.  You don't have to do one address at a time.

I imagine you (or someone) can write a script that exports your web sales, extracts the addresses, and creates a new wallet with those addresses.  It's beyond my skills, but I reckon it's possible.  As for something that already exists that will do what you want, I don't know about anything.

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
▄▄██████▄▄
▀█▀
█  █▀█▀
  ▄█  ██  █▄  ▄
█ ▄█ █▀█▄▄█▀█ █▄ █
▀▄█ █ ███▄▄▄▄███ █ █▄▀
▀▀ █    ▄▄▄▄    █ ▀▀
   ██████   █
█     ▀▀     █
▀▄▀▄▀▄▀▄▀▄▀▄
▄ ██████▀▀██████ ▄
▄████████ ██ ████████▄
▀▀███████▄▄███████▀▀
▀▀▀████████▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
pooya87
Legendary
*
Offline Offline

Activity: 3458
Merit: 10604



View Profile
February 01, 2023, 04:55:02 AM
 #8

API usually have limits to check balances like you can request X amount of addresses in X seconds. some also require KYC. If we can query our own server or multiple public servers then it is decentralized way.
They place those limits to prevent spam, after all their computer (server) can only handle so many requests before it hangs. It is going to be the same with an Electrum node, they are not designed to handle too many requests either and I believe they may end up banning your IP.

Generally speaking Electrum is not designed for scaling, it is designed for convenience and ease of use for regular users with small number of addresses to check. Depending on the size of your requests it is best if you run your own indexed node.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
nc50lc
Legendary
*
Offline Offline

Activity: 2422
Merit: 5658


Self-proclaimed Genius


View Profile
February 01, 2023, 05:36:33 AM
Merited by hugeblack (8), pooya87 (2), ABCbits (1)
 #9

Can Electrum servers be used to confirm payments for website invoices?
It's possible if you can mimic Electrum's connection with the servers (it's open-source): github.com/spesmilo/electrum/blob/master/electrum/network.py
For example, there are other clients/wallets that can use Electrum's server like "Blue" and "Sparrow" to mention a few.

But as mentioned above, most Electrum server implementations have even smaller limits than blockexplorer APIs, which is set by default.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
bnbstorm (OP)
Copper Member
Member
**
Offline Offline

Activity: 98
Merit: 34


View Profile
February 01, 2023, 08:39:46 AM
 #10

Importing watch only is a manual process. I am looking for a programmable solution. In which we can send requests to electrum servers. Like simple http or json requests

You'll have to forgive me, I'm trying to guess what you're trying to do, you haven't given us many details.  It sounds like you want to take the addresses from your website sales, and automatically check their balances.  You can do that with the Electrum client.  You can copy the entire list of public addresses and paste them into a new or existing watch-only wallet.  It's manual, but doesn't take very much time.  You don't have to do one address at a time.

I imagine you (or someone) can write a script that exports your web sales, extracts the addresses, and creates a new wallet with those addresses.  It's beyond my skills, but I reckon it's possible.  As for something that already exists that will do what you want, I don't know about anything.
API usually have limits to check balances like you can request X amount of addresses in X seconds. some also require KYC. If we can query our own server or multiple public servers then it is decentralized way.
They place those limits to prevent spam, after all their computer (server) can only handle so many requests before it hangs. It is going to be the same with an Electrum node, they are not designed to handle too many requests either and I believe they may end up banning your IP.

Generally speaking Electrum is not designed for scaling, it is designed for convenience and ease of use for regular users with small number of addresses to check. Depending on the size of your requests it is best if you run your own indexed node.
Can Electrum servers be used to confirm payments for website invoices?
It's possible if you can mimic Electrum's connection with the servers (it's open-source): github.com/spesmilo/electrum/blob/master/electrum/network.py
For example, there are other clients/wallets that can use Electrum's server like "Blue" and "Sparrow" to mention a few.

But as mentioned above, most Electrum server implementations have even smaller limits than blockexplorer APIs, which is set by default.

Thank you all for such generous response. I understand it now. I thought maybe these servers are limit less and work like nodes where we can query data. Was thinking to make a custom payment processor but it seems not possible with this approach.
Thank you

ABCbits
Legendary
*
Offline Offline

Activity: 2884
Merit: 7526


Crypto Swap Exchange


View Profile
February 01, 2023, 12:22:14 PM
Merited by hugeblack (4), pooya87 (2), bnbstorm (1)
 #11

Can Electrum servers be used to confirm payments for website invoices?
It's possible if you can mimic Electrum's connection with the servers (it's open-source): github.com/spesmilo/electrum/blob/master/electrum/network.py

Or just read Electrum protocol documentation[1].

But as mentioned above, most Electrum server implementations have even smaller limits than blockexplorer APIs, which is set by default.

And the limit is rather complex. Aside from maximum data size, there's also response delay after hitting soft limit and maximum connection[2].

I thought maybe these servers are limit less and work like nodes where we can query data. Was thinking to make a custom payment processor but it seems not possible with this approach.
Thank you

But unlike Electrum server, you can't just request specific data based on known address/txid to Bitcoin node. Most node implementation also have limit maximum upload/day.

[1] https://electrumx.readthedocs.io/en/latest/protocol-basics.html
[2] https://electrumx.readthedocs.io/en/latest/environment.html#envvar-INITIAL_CONCURRENT

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
bnbstorm (OP)
Copper Member
Member
**
Offline Offline

Activity: 98
Merit: 34


View Profile
February 01, 2023, 12:37:41 PM
 #12

Can Electrum servers be used to confirm payments for website invoices?
It's possible if you can mimic Electrum's connection with the servers (it's open-source): github.com/spesmilo/electrum/blob/master/electrum/network.py

Or just read Electrum protocol documentation[1].

But as mentioned above, most Electrum server implementations have even smaller limits than blockexplorer APIs, which is set by default.

And the limit is rather complex. Aside from maximum data size, there's also response delay after hitting soft limit and maximum connection[2].

I thought maybe these servers are limit less and work like nodes where we can query data. Was thinking to make a custom payment processor but it seems not possible with this approach.
Thank you

But unlike Electrum server, you can't just request specific data based on known address/txid to Bitcoin node. Most node implementation also have limit maximum upload/day.

[1] https://electrumx.readthedocs.io/en/latest/protocol-basics.html
[2] https://electrumx.readthedocs.io/en/latest/environment.html#envvar-INITIAL_CONCURRENT

Yes it seems this is the way. I am thinking to learn more about BTCPay server as it seems to be best and leading solution of all payment problems.
Thanks for your recommendations I will go through Electrum documentation as well.

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!