Create wallet address on user registration for trading platform

0

I am creating a crypto-trading platform . I wanted to know how to create wallet address dynamically for all new registered user and also create new address for every transaction.

I am using bitcoind for bitcoin and will be doing RPC calls directly. Also let me know if there is any better way to do it.

S Ravi Kumar

Posted 2018-09-25T10:15:42.957

Reputation: 1

Are you asking for an implementation or is it a theoretical question? Also will your application have access to the keys?JBaczuk 2018-09-25T15:41:09.980

We'll need more information to specifically answer your question: what Bitcoin node software are you using? Are you connecting through a client library, straight RPC calls, or just using the command line?Motoma 2018-09-25T17:07:59.193

@Motoma I am using bitcoind and will be doing direct RPC calls for now. Let know if there are any other better options.S Ravi Kumar 2018-09-26T07:31:39.610

@JBaczuk I am asking for implementation , yes application will have have access to keys.S Ravi Kumar 2018-09-26T07:33:46.870

since i have worked on exchange platform and payment gateways you can message me in persion about the doubts, i will be happy to help youcryptoKTM 2019-01-08T13:57:45.147

creating wallet address dynamically can be done with RPCs but for a exchange you wiil be needing extra services like mempool crawler, block crawler and soo oncryptoKTM 2019-01-08T13:58:59.833

Answers

0

The call you want is getnewaddress, which will generate a new Bitcoin address, add it to the current wallet, and return the address as the result of the call.

You can find documentation for the call here: https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/getnewaddress/

If you were writing this in Python, it would look something like this:

from pyjsonrpc import ServiceProxy

bitcoin = ServiceProxy("http://127.0.0.1:8332")
bitcoin.username = 'testuser'
bitcoin.password = 'testpass'
print(bitcoin.getnewaddress())

You would then need to track the addresses generated and record them with your user accounts, monitoring transactions and crediting users as they come in.

Motoma

Posted 2018-09-25T10:15:42.957

Reputation: 161

Thanks for your prompt reply. I will try this approach and update my result here.S Ravi Kumar 2018-09-26T13:02:15.283