<p>Evebtually I decide to do it the curl way. </p>

<p>By having my express app to make a simple GET http request to the bitcoin node, I managed to get the job done. 
Doing this with the request npm module is súper simple.</p>

<p>It doesn't solve the issue with the JS api, but allows me to properly leverage on the éstimate fee feature of Bcoin.</p>

CC BY-SA 4.0
2020-01-05T16:23:07.480Z
2020-01-05T16:23:07.480Z
Mario Mazzola
<p>I installed a BCOIN full node and I would like to calculate estimated fees for Bitcoin transactions.
This functionality works perfectly in the CLI. For example:</p>

<pre><code>bcoin-cli fee 3
</code></pre>

<p>Anyway things go wrong when I use the JS api inside my express client app:</p>

<pre><code>const result = await client.estimateFee(3);
</code></pre>

<p>The API doesn't throw any error and no response is given back. This was copied from the official API documentation.</p>

<p>Please note that client and options are properly configured. It works all fine in other express routes where I use the bcoin JS API to get blockchain info, lists of transactions etc.</p>

<p>What's wrong? Perhaps the API changed and documentation is outdated ?</p>

<p>Regards</p>

CC BY-SA 4.0
2020-01-04T23:45:21.610Z
What version of bcoin have you installed? We recently fixed an issue with fee API. Please ensure you're running the master branch from github. If you want to chat, we can help you on IRC #bcoin (freenode) or slack: https://bcoin.io/slack-signup
pinhead
CC BY-SA 4.0
2020-01-05T04:47:30.633Z
@pinhead thanks for the support. Both my node and my express client are running BCOIN 2.0.0-dev. I installed the default version that one automatically gets cutting and pasting commands from the instructions provided in this guide: https://bcoin.io/guides/vps-setup.html (which seems to be unavailable today....)
Mario Mazzola
CC BY-SA 4.0
2020-01-06T23:40:24.347Z
I've removed some off-topic comments from this question. Please use comments to ask for clarification on the question or to provide transient information related to the topic of the question. The comments were [moved to chat](https://chat.stackexchange.com/rooms/102893/discussion-between-pinhead-and-anonymous).
Murch
<api><bcoin><fee-estimation>
Estimated Fees in BCOIN
Mario Mazzola
# Estimated Fees in BCOIN

(Asked by: username_0 on 2020-01-04)

I installed a BCOIN full node and I would like to calculate estimated fees for Bitcoin transactions.
This functionality works perfectly in the CLI. For example:

```
bcoin-cli fee 3

```

Anyway things go wrong when I use the JS api inside my express client app:

```
const result = await client.estimateFee(3);

```

The API doesn't throw any error and no response is given back. This was copied from the official API documentation.

Please note that client and options are properly configured. It works all fine in other express routes where I use the bcoin JS API to get blockchain info, lists of transactions etc.

What's wrong? Perhaps the API changed and documentation is outdated ?

Regards

**Tags:** api, bcoin, fee-estimation

> **Comments:**
> **username_1**: What version of bcoin have you installed? We recently fixed an issue with fee API. Please ensure you're running the master branch from github. If you want to chat, we can help you on IRC #bcoin (freenode) or slack: https://bcoin.io/slack-signup  
> **username_0**: @username_1 thanks for the support. Both my node and my express client are running BCOIN 2.0.0-dev. I installed the default version that one automatically gets cutting and pasting commands from the instructions provided in this guide: https://bcoin.io/guides/vps-setup.html (which seems to be unavailable today....)  
> **username_2**: I've removed some off-topic comments from this question. Please use comments to ask for clarification on the question or to provide transient information related to the topic of the question. The comments were [moved to chat](https://chat.stackexchange.com/rooms/102893/discussion-between-username_1-and-anonymous).  

---

## 1 answers

### Answer by username_0 on 2020-01-05. Score: 1

Evebtually I decide to do it the curl way.

By having my express app to make a simple GET http request to the bitcoin node, I managed to get the job done.
Doing this with the request npm module is súper simple.

It doesn't solve the issue with the JS api, but allows me to properly leverage on the éstimate fee feature of Bcoin.


---

