Author

Topic: Request address balance from any Electrum server (Read 144 times)

copper member
Activity: 126
Merit: 35
February 01, 2023, 07:37:41 AM
#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.
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
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
copper member
Activity: 126
Merit: 35
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
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
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.
legendary
Activity: 3472
Merit: 10611
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.
copper member
Activity: 2338
Merit: 4543
Join the world-leading crypto sportsbook NOW!
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.
copper member
Activity: 126
Merit: 35
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.
copper member
Activity: 2338
Merit: 4543
Join the world-leading crypto sportsbook NOW!
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.
legendary
Activity: 1512
Merit: 4795
Leading Crypto Sports Betting & Casino Platform
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.
copper member
Activity: 126
Merit: 35
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.
legendary
Activity: 1526
Merit: 1359
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?
copper member
Activity: 126
Merit: 35
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
Jump to: