<p>Just run bitcoind on your server and then connect via API to it, here is the reference:
<a href="https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)</a></p>

<p>There are also ready (open source) libs in several languages, which you can integrate in your own apps.</p>

<p>Some examples:</p>

<ul>
<li><a href="https://github.com/Bit-Wasp/bitcoin-php" rel="nofollow noreferrer">https://github.com/Bit-Wasp/bitcoin-php</a></li>
<li><a href="https://github.com/Bit-Wasp/bitcoin-lib-php" rel="nofollow noreferrer">https://github.com/Bit-Wasp/bitcoin-lib-php</a></li>
<li><a href="https://pypi.python.org/pypi/python-bitcoinlib" rel="nofollow noreferrer">https://pypi.python.org/pypi/python-bitcoinlib</a></li>
</ul>

<p>But your question is too broad to give you a more specific answer, since you have to consider, if you want to hold user funds in one wallet and just identify them by different deposit addresses or a separate wallet with it's own keys for every single user.</p>

<p>In general: If you don't know exactly what you are doing, don't store any private keys on the server, especially if you want to hold someone's funds.</p>

CC BY-SA 3.0
2016-11-02T17:28:24.190Z
2016-11-02T17:28:24.190Z
janowitz
<p>Based on my understanding, as a Bitcoin service provider, you should at least maintain a "well-connected" full-node as you should not rely trusted parties to determine the state of the network. </p>

<p>IIRC, exchanges generate new private/public key pairs each time to accept incoming deposits. You can then watch the bitcoin address derived from the public key to see if a deposit has been made. </p>

<p>Any full node implementation should be able to accomplish this with the RPC-JSON interface. You can specify the minimum number of confirmation required when filtering UTXOs that you control. Using a SPV client to provide services would be incredibly unsafe as it would leak information to adversaries (such as transaction ids that you might be interested in and etc..)</p>

CC BY-SA 3.0
2016-11-03T02:49:06.717Z
2016-11-03T02:49:06.717Z
rny
<p>AFAIK, the best practice is to get the unspent transaction outputs (UTXO) (you need to keep track of all the blockchain) and add all the values to know one address' balance, since txid are not reliable (they are subject to transaction malleability).</p>

<p>If you don't want to download the full blockchain then use an external wallet service provider like blockchain.info, BitGo or similar. They also provide useful libraries and APIs. They also let you organize your wallet with labels, etc.
Hope it helps!</p>

CC BY-SA 3.0
2016-11-02T16:09:22.490Z
2016-11-03T10:02:43.247Z
2016-11-03T10:02:43.247Z
joe.js
<p>I'm trying to setup a bitcoin service for my users. How do other sites or exchanges keep track of each users unique Bitcoin deposit address? And how does the application alert the admin/user when a deposit is made successfully after 2 confirmations? </p>

<p>Which applications can do this? I was thinking of using electrum as it didnt require downloading the entire blockchain. What other apps are there that can do something like to manage users btc. </p>

<bitcoin-core><electrum><webapp>
Keeping track of unique deposit Bitcoin Addresses per user
Patoshi パトシ
# Keeping track of unique deposit Bitcoin Addresses per user

(Asked by: username_0 on 2016-10-28)

I'm trying to setup a bitcoin service for my users. How do other sites or exchanges keep track of each users unique Bitcoin deposit address? And how does the application alert the admin/user when a deposit is made successfully after 2 confirmations?

Which applications can do this? I was thinking of using electrum as it didnt require downloading the entire blockchain. What other apps are there that can do something like to manage users btc.

**Tags:** bitcoin-core, electrum, webapp


---

## 3 answers

### Answer by username_1 on 2016-11-02. Score: 1 | Accepted answer

Just run bitcoind on your server and then connect via API to it, here is the reference:
<https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)>

There are also ready (open source) libs in several languages, which you can integrate in your own apps.

Some examples:

* <https://github.com/Bit-Wasp/bitcoin-php>
* <https://github.com/Bit-Wasp/bitcoin-lib-php>
* <https://pypi.python.org/pypi/python-bitcoinlib>

But your question is too broad to give you a more specific answer, since you have to consider, if you want to hold user funds in one wallet and just identify them by different deposit addresses or a separate wallet with it's own keys for every single user.

In general: If you don't know exactly what you are doing, don't store any private keys on the server, especially if you want to hold someone's funds.


---

### Answer by username_2 on 2016-11-03. Score: 0

Based on my understanding, as a Bitcoin service provider, you should at least maintain a "well-connected" full-node as you should not rely trusted parties to determine the state of the network.

IIRC, exchanges generate new private/public key pairs each time to accept incoming deposits. You can then watch the bitcoin address derived from the public key to see if a deposit has been made.

Any full node implementation should be able to accomplish this with the RPC-JSON interface. You can specify the minimum number of confirmation required when filtering UTXOs that you control. Using a SPV client to provide services would be incredibly unsafe as it would leak information to adversaries (such as transaction ids that you might be interested in and etc..)


---

### Answer by username_3 on 2016-11-02. Score: 0

AFAIK, the best practice is to get the unspent transaction outputs (UTXO) (you need to keep track of all the blockchain) and add all the values to know one address' balance, since txid are not reliable (they are subject to transaction malleability).

If you don't want to download the full blockchain then use an external wallet service provider like blockchain.info, BitGo or similar. They also provide useful libraries and APIs. They also let you organize your wallet with labels, etc.
Hope it helps!


---

