Inferenco Predictions SDK
A Rust library for cryptocurrency price forecasting that combines statistical methods, technical analysis, and machine learning.
Projects using this SDK
- DeFiCalc integrates the SDK for price-aware DeFi calculations.
- Inferenco Nova uses the SDK to power AI-driven blockchain conversations and tooling.
Features
- Hybrid Forecasting Engine: Ensemble of statistical models, ML (SVR), and technical indicators
- Multi-Horizon Forecasts: From 15 minutes to 4 years
- Two-Tier Caching: Smart TTL-based caching for API responses and forecasts
- Rate Limiting: Built-in token bucket + exponential backoff for CoinGecko API
- Technical Analysis: RSI, MACD, Bollinger Bands
- Local AI: On-the-fly SmartCore SVR training (no external models needed)
Installation
Add to your Cargo.toml:
[]
= "0.1.0"
= { = "1", = ["full"] }
Quick Start
Usage
use ;
async
Fetching Charts
To retrieve historical candles and (for long horizons) projection bands, set the chart flag to true in your request. This is best handled via the run_prediction_handler helper or by manually calling fetch_chart_candles.
use ;
// ... inside async fn
let request = ForecastRequest ;
// Returns a JSON string containing both "forecast" and "chart" fields
let json_response = run_prediction_handler.await?;
println!;
Response Structure:
Run the Example
Documentation
See DOCUMENTATION.md for detailed architecture, API reference, and integration guides.
CI/CD
GitHub Actions runs:
cargo fmt --checkcargo clippycargo buildcargo test(unit + integration + doc tests)
License
MIT