<p>There are two ways you can about doing this:<br /></p>

<ul>
<li>Using a Bitcoin Node (RPC)</li>
<li>Using a library like <a href="https://github.com/bitpay/bitcore" rel="nofollow noreferrer">this</a></li>
</ul>

<p>You asked about RPC so I will talk about that.</p>

<h2>Ubuntu</h2>

<p><strong>1.</strong> You can install the Bitcoin Daemon like this:<br />
<code>$ sudo apt-get install bitcoind</code><br /></p>

<p><strong>2.</strong> You have to start the daemon and wait for blocks to download. <br />You can start the daemon like so: <code>$ bitcoind -daemon</code><br />
You can check the progress of blockchain download like so: <code>$ bitcoin-cli getinfo</code><br /><br /></p>

<p>If you don't have space to download the full chain, you can use the <code>prune</code> method. Create a new file <code>~/.bitcoin/bitcoin.conf</code> and add <code>prune {megabytes of space}</code>. This will limit blockchain space allocation to the value of the <code>prune</code> method.<br /><br /></p>

<p><strong>3.</strong> Setup your JSON RPC configuration. You can refer to <a href="https://bitcoin.stackexchange.com/questions/24457/how-do-i-use-walletnotify">this</a> thread for adding your RPC username and password.</p>

<p><strong>4.</strong> After the blockchain has been downloaded (~150GB), you can connect to the RPC server on port <code>8332</code> by default. You may use <a href="https://github.com/freewil/node-bitcoin" rel="nofollow noreferrer">this library</a> or <a href="https://github.com/tedeh/jayson" rel="nofollow noreferrer">this library</a> to make calls to the RPC server in NodeJS; you may also use any JSON RPC client to make calls.
<br /><br />
<strong>5.</strong> Use <code>walletnotify</code> to receive transaction updates related to your wallet. Setup an <code>insight-api</code> if you want to receive transaction updates from any wallet. You can use <code>insight-api</code> to index and retrieve transaction data and block data on demand as well.</p>

<h2>Resources</h2>

<p><a href="https://bitcoin.org/en/developer-reference#bitcoin-core-apis" rel="nofollow noreferrer">Bitcoin API Calls</a> - You may want to reference to these methods as you are programming<br /><br />
<a href="https://bitcoin.org/en/full-node" rel="nofollow noreferrer">Bitcoin Full Node</a> - More information on starting a local node if you are coming across trouble<br /><br />
<a href="https://github.com/bitpay/insight-api" rel="nofollow noreferrer">Insight API</a> - Used for indexing displaying all transactions and blocks.<br /><br />
<a href="https://bitcoin.stackexchange.com/questions/24457/how-do-i-use-walletnotify"><code>walletnotify</code></a> - Information on how to use walletnotify.</p>

CC BY-SA 3.0
2017-11-28T17:27:00.877Z
Thanks for the reply. Question about pruning, will the wallets API still be able to list transactions that happened before the prune? For example if we have 1GB limit would there be any problems in 6 months from now showing those transactions on our website?
Smittyyy
CC BY-SA 3.0
2017-11-28T21:16:19.997Z
I would not imagine so... the data would need to be stored somewhere.
Monstrum
CC BY-SA 3.0
2017-11-28T16:22:27.410Z
2017-11-28T16:22:27.410Z
Monstrum
<p>I am currently using block.io however with their "low" tag fee transactions are still $2+ and they do not offer a way to set custom withdraw fees in their API.</p>

<p>I'm not too sure what my options are but I want to look into setting up my own Bitcoin node/wallet on an external server that we can integrate with our dashboard.</p>

<p>I have a few questions:</p>

<p>1) How would I go about doing it?</p>

<p>2) How many hours would it take for someone with limited experiance? (I will probably be paying someone)</p>

<p>3) Right now block.io is nice because we have unlimited addresses I presume this wont be a problem with the RPC server?</p>

<transaction-fees><json-rpc>
Integrate Bitcoin node RPC with website API
Smittyyy
# Integrate Bitcoin node RPC with website API

(Asked by: username_0 on 2017-11-27)

I am currently using block.io however with their "low" tag fee transactions are still $2+ and they do not offer a way to set custom withdraw fees in their API.

I'm not too sure what my options are but I want to look into setting up my own Bitcoin node/wallet on an external server that we can integrate with our dashboard.

I have a few questions:

1) How would I go about doing it?

2) How many hours would it take for someone with limited experiance? (I will probably be paying someone)

3) Right now block.io is nice because we have unlimited addresses I presume this wont be a problem with the RPC server?

**Tags:** transaction-fees, json-rpc


---

## 1 answers

### Answer by username_1 on 2017-11-28. Score: 1 | Accepted answer

There are two ways you can about doing this:

* Using a Bitcoin Node (RPC)
* Using a library like [this](https://github.com/bitpay/bitcore)

You asked about RPC so I will talk about that.

## Ubuntu

**1.** You can install the Bitcoin Daemon like this:  
`$ sudo apt-get install bitcoind`

**2.** You have to start the daemon and wait for blocks to download.   
You can start the daemon like so: `$ bitcoind -daemon`  
You can check the progress of blockchain download like so: `$ bitcoin-cli getinfo`

If you don't have space to download the full chain, you can use the `prune` method. Create a new file `~/.bitcoin/bitcoin.conf` and add `prune {megabytes of space}`. This will limit blockchain space allocation to the value of the `prune` method.

**3.** Setup your JSON RPC configuration. You can refer to [this](https://bitcoin.stackexchange.com/questions/24457/how-do-i-use-walletnotify) thread for adding your RPC username and password.

**4.** After the blockchain has been downloaded (~150GB), you can connect to the RPC server on port `8332` by default. You may use [this library](https://github.com/freewil/node-bitcoin) or [this library](https://github.com/tedeh/jayson) to make calls to the RPC server in NodeJS; you may also use any JSON RPC client to make calls.
  
  
**5.** Use `walletnotify` to receive transaction updates related to your wallet. Setup an `insight-api` if you want to receive transaction updates from any wallet. You can use `insight-api` to index and retrieve transaction data and block data on demand as well.

## Resources

[Bitcoin API Calls](https://bitcoin.org/en/developer-reference#bitcoin-core-apis) - You may want to reference to these methods as you are programming  
  
[Bitcoin Full Node](https://bitcoin.org/en/full-node) - More information on starting a local node if you are coming across trouble  
  
[Insight API](https://github.com/bitpay/insight-api) - Used for indexing displaying all transactions and blocks.  
  
[`walletnotify`](https://bitcoin.stackexchange.com/questions/24457/how-do-i-use-walletnotify) - Information on how to use walletnotify.

> **Comments:**
> **username_0**: Thanks for the reply. Question about pruning, will the wallets API still be able to list transactions that happened before the prune? For example if we have 1GB limit would there be any problems in 6 months from now showing those transactions on our website?  
> **username_1**: I would not imagine so... the data would need to be stored somewhere.  

---

