Fee Estimator
class FeeEstimator @JvmOverloads constructor(probabilities: List<Double> = DEFAULT_PROBABILITIES, blockTargets: List<Double> = DEFAULT_BLOCK_TARGETS, shortTermWindowDuration: Duration = Duration.ofMinutes(30), longTermWindowDuration: Duration = Duration.ofHours(24))(source)
The main entry point for calculating Bitcoin fee estimates.
FeeEstimator analyzes historical mempool data to predict transaction confirmation times with various confidence levels.
Example usage:
// Initialize with default settings
val estimator = FeeEstimator()
// Calculate estimates from historical snapshots
val estimate = estimator.calculateEstimates(mempoolSnapshots)
// Get fee rate for 6 blocks with 95% confidence
val feeRate = estimate.getFeeRate(targetBlocks = 6, probability = 0.95)
Content copied to clipboard
Functions
Link copied to clipboard
Calculates fee estimates based on historical mempool snapshots.
Link copied to clipboard
fun configure(probabilities: List<Double>? = null, blockTargets: List<Double>? = null, shortTermWindowDuration: Duration? = null, longTermWindowDuration: Duration? = null): FeeEstimator
Creates a new FeeEstimator with modified settings.