Marchelo23/mempool
0
โก Bitcoin Mempool Fee Predictor API
ML-powered real-time fee predictions for Bitcoin block inclusion.
Uses an XGBoost + LightGBM ensemble trained on live mempool data to predict the optimal fee rate (sats/vByte) needed to get your transaction confirmed in the next 1, 3, or 6 blocks.
๐ API Endpoints
๐ก Example
curl https://marchelo23-mempool.hf.space/fees/predictResponse
{
"timestamp": "2026-04-23T12:00:00",
"mempool_snapshot": {
"tx_count": 45000,
"vsize_mb": 120.5,
"total_fee_btc": 1.234
},
"fee_predictions": {
"1_block": {
"predicted_fee_sat_vb": 42,
"confidence_interval": [36, 48],
"priority": "high"
},
"3_blocks": {
"predicted_fee_sat_vb": 28,
"priority": "medium"
},
"6_blocks": {
"predicted_fee_sat_vb": 15,
"priority": "low"
}
},
"recommendation": "NORMAL"
}๐ง Models
- XGBoost (v2.1+): Primary model, 0.6 ensemble weight
- LightGBM (v4.5+): Secondary model, 0.4 ensemble weight
- Training: Automated retraining on live mempool snapshots
- Features: 100+ engineered features from mempool state, fee landscape, block timing, and network metrics
๐๏ธ Architecture
mempool.space API โ Feature Engineering โ Ensemble (XGB + LGB) โ Fee PredictionsBuilt with FastAPI, deployed as a Docker container on Hugging Face Spaces.
๐ Data Source
All data is fetched in real-time from the mempool.space public API (Bitcoin mainnet).
