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 ?


  • 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: bcoin.io/slack-signup
    – pinhead
    Jan 4, 2020 at 23:45
  • @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: bcoin.io/guides/vps-setup.html (which seems to be unavailable today....) Jan 5, 2020 at 4:47
  • @Anonymous, I appreciate your concern, but I ve already told you in another thread that Bitcoin Core doesn't have the features I need (BCOIN does....) and, most importantly, I will not use my BCOIN node to generate and manage private keys. Jan 5, 2020 at 4:50
  • You never said what those features are.
    – Claris
    Jan 5, 2020 at 4:52
  • @MarioMazzola yes that guide had outdated information (like the minimum required version of nodejs). The bug I think you are facing was fixed in this PR, not too long ago. Just check that your bcoin install is recent enough to include it, maybe pull from master again github.com/bcoin-org/bcoin/pull/889
    – pinhead
    Jan 5, 2020 at 4:57

1 Answer 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.

Your Answer

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

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