I have to to use bitcoin api using nodejs. but I cannot understand from where I have to start.Search some node module like bitcoin-core and bitcoin.

Can anyone describe the step how can I set up bitcoin in our system and use using nodejs. Also refer some link where use of bitcoin api request and response parameter are describe in nodejs.

I have to use bitcoin json-rpc api's with node.js but dont know from where i can start?

  • 3
    As it is written, this question doesn't make a lot of sense. You seem to need to do something with Bitcion, but haven't specified what that is. Without that information, nobody can help you.
    – Jestin
    Commented Aug 31, 2017 at 19:06

3 Answers 3


I m using bitcore for stand alone rpc because it has many new indexes and new methods.

See this link https://bitcore.io/guides/bitcoin


First and foremost, install bitcoin-core. I recommend compiling it yourself but there are binaries available for download. You'll want to perform all the steps in this tutorial - follow all steps for the daemon. Do not do the graphical user interface steps. https://bitcoin.org/en/full-node#ubuntu-1610

Run the daemon and use bitcoin-cli to familiarize yourself with the Bitcoin RPC API. https://bitcoin.org/en/full-node#other-linux-distributions

Start the daemon, such that it creates the right folders. bitcoind -daemon Stop it after a few seconds. bitcoin-cli stop

You should see a new folder .bitcoind in your HOME directory. (Or AppData if you're on Windows). You'll need to add this file into it as 'bitcoin.conf':



Replace YOURUSERNAME with a username of your choice, same for the password. Remember these as you'll need it for configuring your NodeJS app.

bitcoind -daemon

Get the balance: bitcoin-cli -rpcuser=YOURUSERNAME -rpcpassword=YOURPASSWORD getbalance

Pick a nice Bitcoin Core JSON-RPC Node module, like this one: https://www.npmjs.com/package/node-bitcoin-rpc ^Also has the get balance example.

They use the same commands that you enter in the bitcoin-cli.


Yet another way to proceed is to make your own client.

Here is mine on PHP. Even if you do not know PHP, you can see how easy is to create one from scratch:


Selected Bitcoind commands I need:


In case you do own client, make sure you handle first transaction


in special code, because bitcoind can not handle it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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