General question:What do you think are the best API sources for estimate Bitcoin mempool fees and is there something better than three sources (
mempool.space,
bitcoiner.live,
blockchain.com) we used for showing
sat/vB fees?
Well, this is
the problem.
All of those fee estimators are just trash imo. They overestimate fees. I have seen the mempool empty, transactions with 1 sat/byte being confirmed and electrum (which uses the same estimators from those sources)
recommending 100 sat/byteAs I am maintaining a website with a service similar to yours (I use bitcoiner mempool data), I am thinking for a solution for this for some time already.
There is discussion here:
https://bitcointalksearch.org/topic/--5288664I think this posts, from PrimeNumber7, is a nice summary of the problem:
The difficulty in estimating the required fee is you don't know when the next blocks will be found. Assuming the last block was found 1 minute ago, the next block may be found in one second, 9 minutes, or in over an hour. If the next block is found in one second, the required fee to get a transaction included in that block will be lower than if the next block is found in an hour because transactions would be included in the interim.
For transactions you need confirmed quickly, you need to overestimate the fee because of the risk there are long gaps between when the next two blocks will be found. If your program assumes 10 minutes between now and when each of the next two blocks will be found, you will underestimate the required fee to get a transaction included 1/2 the time. If your program assumes 20 minutes between now and when each of the next two blocks will be found, you will more frequently get your transaction confirmed in the next two blocks, but will also overpay most of the time.
So you can't really estimate fees, because you don't know the future.
I have made a script, posted in the same topic, which underestimating fees (the opposite of all others, including those you use, which overestimate them). I simple consider the lowest fee which would fit inside a block if a block is mined
now.
Overall, this a problem which doesn't have a perfect solution.
Personally, I prefer to underestimate fees and use something like I did, instead of overpaying fees all the time (your transaction may be confirmed within a block or it may take a while if there is a spike in the mempool)...