<p>Electrum wallet requires a special <em>Electrum compatible server</em> where it can query the data needed.</p>

<p>There are now several implementations eg:</p>

<ul>
<li><a href="https://github.com/spesmilo/electrum-server" rel="nofollow noreferrer">https://github.com/spesmilo/electrum-server</a></li>
<li><a href="https://github.com/chris-belcher/electrum-personal-server" rel="nofollow noreferrer">https://github.com/chris-belcher/electrum-personal-server</a></li>
<li><a href="https://github.com/kyuupichan/electrumx" rel="nofollow noreferrer">https://github.com/kyuupichan/electrumx</a></li>
</ul>

<blockquote>
  <p>...code snippet that implements such funtionality</p>
</blockquote>

<p><a href="https://github.com/spesmilo/electrum-server/blob/ce1b11d7f5f7a70a3b6cc7ec1d3e552436e54ffe/src/storage.py#L286" rel="nofollow noreferrer">https://github.com/spesmilo/electrum-server/blob/ce1b11d7f5f7a70a3b6cc7ec1d3e552436e54ffe/src/storage.py#L286</a></p>

CC BY-SA 4.0
2019-10-06T09:08:01.230Z
I just wonder if I can connect to one of those electrumx from my app, in other words to simulate electrum client in order to synchronise addresses?
vistore
CC BY-SA 4.0
2019-10-08T11:09:54.670Z
Should be possible, yes.  Just study the API.
Jonathan Cross
CC BY-SA 4.0
2019-10-23T16:38:34.093Z
@vistore Does this answer your question?  If so, please accept the answer.
Jonathan Cross
CC BY-SA 4.0
2019-10-01T15:49:12.567Z
2019-10-01T15:49:12.567Z
Jonathan Cross
<p>I need to periodically check the balance of a number of bitcoin addresses (a few tens or hundreds addresses).
I noticed that Electrum may syncronize a thousand or more imported addresses in a matter of a few seconds. But I failed to realise how it is done searching through Electrum source code. </p>

<p>Which methods it uses? Does it really import all these addresses into currently connected remote node and then calls <code>listunspent</code> no matter how many addresses I insert into the wallet?</p>

<p>Can you please point me to a code snippet that implements such funtionality</p>

<json-rpc><api><electrum><balance>
Electrum address syncronization
vistore
# Electrum address syncronization

(Asked by: username_0 on 2019-09-26)

I need to periodically check the balance of a number of bitcoin addresses (a few tens or hundreds addresses).
I noticed that Electrum may syncronize a thousand or more imported addresses in a matter of a few seconds. But I failed to realise how it is done searching through Electrum source code.

Which methods it uses? Does it really import all these addresses into currently connected remote node and then calls `listunspent` no matter how many addresses I insert into the wallet?

Can you please point me to a code snippet that implements such funtionality

**Tags:** json-rpc, api, electrum, balance


---

## 1 answers

### Answer by username_1 on 2019-10-01. Score: 1

Electrum wallet requires a special *Electrum compatible server* where it can query the data needed.

There are now several implementations eg:

* <https://github.com/spesmilo/electrum-server>
* <https://github.com/chris-belcher/electrum-personal-server>
* <https://github.com/kyuupichan/electrumx>

> ...code snippet that implements such funtionality

<https://github.com/spesmilo/electrum-server/blob/ce1b11d7f5f7a70a3b6cc7ec1d3e552436e54ffe/src/storage.py#L286>

> **Comments:**
> **username_0**: I just wonder if I can connect to one of those electrumx from my app, in other words to simulate electrum client in order to synchronise addresses?  
> **username_1**: Should be possible, yes.  Just study the API.  
> **username_1**: @username_0 Does this answer your question?  If so, please accept the answer.  

---

