Turning Bitcoin Core fee estimates into sat/vB

If a fee widget reads estimatesmartfee directly, it must convert the unit, carry the effective target, and handle a missing estimate. Each affects what the reader sees.

Ask for a six-block estimate

bitcoin-cli estimatesmartfee 6 economical

Bitcoin Core 30 returns feerate in BTC per 1,000 virtual bytes. For example, a result of 0.00002500 BTC/kvB represents 2,500 satoshis per 1,000 vB, or 2.5 sat/vB. Multiply the RPC number by 100,000 to display sat/vB. Keep fractional values until the final display or fee calculation.

At this illustrative rate a 140-vB transaction corresponds to 350 satoshis in total fees. A different virtual size gives a different total even if the node reports exactly the same rate. Use the transaction's estimated virtual size when quoting a total before signing.

Preserve the estimator's uncertainty

Read blocks from the response alongside feerate. The estimator can adjust the target to a range supported by its observations. If it lacks sufficient history, it can return errors without feerate. Display an unavailable state and keep the diagnostic for the operator. Writing zero into the rate field would silently turn missing data into a valid-looking quote.

Record the requested mode with the quote. The conservative mode weighs a longer history, so two widgets polling the same node with different modes can legitimately show different estimates. Confirmation timing remains probabilistic.

bitcoincore.org estimatesmartfee