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.

  • Are you asking for an implementation or is it a theoretical question? Also will your application have access to the keys? – JBaczuk Sep 25 '18 at 15:41
  • 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 Sep 25 '18 at 17:07
  • @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 Sep 26 '18 at 7:31
  • @JBaczuk I am asking for implementation , yes application will have have access to keys. – S Ravi Kumar Sep 26 '18 at 7:33
  • 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 you – cryptoKTM Jan 8 at 13:57
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.

  • Thanks for your prompt reply. I will try this approach and update my result here. – S Ravi Kumar Sep 26 '18 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.