bitcoin-best-fee

0.1.1 • Public • Published

bitcoin-best-fee

bitcoin-best-fee aggregates the recommended Bitcoin fees from a variety of endpoints.

Install

npm install bitcoin-best-fee

Usage

const bestFee = require('bitcoin-best-fee')

All methods return a Promise that resolves to the fee in satoshi/byte as a Number.

bestFee.fetchHigh()

Fetch the highest fee from any of the endpoints.

Example:

bestFee.fetchHigh()
.then(fee => console.log(fee))
// -> 240

bestFee.fetchLow()

Fetch the lowest fee from any of the endpoints.

bestFee.fetchMean()

Fetch the mean average fee from all the endpoints.

bestFee.fetchMedian()

Fetch the median average fee from all the endpoints.

Tests

Run npm test to run the linter and basic test suite.

Run npm run test-slow to run additional slow tests. The slow tests are contained in test/slow/. Warning: This takes 2-3m to run; be patient.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i bitcoin-best-fee

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

9.63 kB

Total Files

10

Last publish

Collaborators

  • jprichardson
  • ryanzim