
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
bitcoinfees-21co
Advanced tools
bitcoinfees from 21.co
Current API Rate Limit: 5000 requests per hour.
npm i bitcoinfees-21co
var bitcoinfees = require('bitcoinfees-21co');
bitcoinfees.FeesApi.recommended().then(function(res){
console.log(res)
})
{ "fastestFee": 40, "halfHourFee": 20, "hourFee": 10 }
var bitcoinfees = require('bitcoinfees-21co');
bitcoinfees.FeesApi.list().then(console.log)
{ "fees": [
{"minFee":0,"maxFee":0,"dayCount":545,"memCount":87,
"minDelay":4,"maxDelay":32,"minMinutes":20,"maxMinutes":420},
...
] }
bitcoinfees.FeesApi.recommended().catch(function(e){
console.log(e.message)
})
var errors = require('bitcoinfees-21co/errors')
bitcoinfees.FeesApi.recommended()
.catch(errors.StatusCodeError, function (reason) {
// HTTP STATUS ERROR(404 or 500, 502, etc...)
console.log("HTTP StatusCodeError " + reason.statusCode, "HTTP", reason.statusCode)
})
.catch(errors.RequestError, function (reason) {
// REQUEST ERROR(SYSTEMCALL, TIMEOUT)
console.log(reason.message, "SYSCALL", reason.error.code)
})
.catch(function(e){
// OTHER ERROR
console.log(e.message)
})
var bitcoinfees = require('bitcoinfees-21co');
var assert = require('assert');
var clamp = function(value, min, max){
return Math.min(Math.max(min, value), max)
}
bitcoinfees.FeesApi.recommended().then(function(res){
assert(res.hourFee > 0);
return clamp(res.hourFee, 20, 200) // The API obstacle leads to loss
})
It is better to store it in the database when using it on the server
FAQs
realtime bitcoinfees from 21.co
We found that bitcoinfees-21co demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.