Expand description
Volatility Oracle module for fetching implied volatility data.
This module provides real-time volatility surface data from Block Scholes via WebSocket API for use in margin calculations and options pricing.
§Example
ⓘ
use hypercall_vol_oracle::{BlockScholesVolOracle, BlockScholesVolOracleConfig};
use std::sync::Arc;
let config = BlockScholesVolOracleConfig {
symbols: vec!["BTC".to_string(), "ETH".to_string()],
..Default::default()
};
let oracle = Arc::new(BlockScholesVolOracle::new(config));
let handle = oracle.start_polling();
// Later, query volatility
if let Some(vol) = oracle.get_vol("BTC", 100000.0, 1735689600).await {
println!("BTC 100k strike vol: {:.2}%", vol * 100.0);
}Re-exports§
pub use blockscholes_oracle::BlockScholesVolOracle;pub use blockscholes_oracle::BlockScholesVolOracleConfig;pub use blockscholes_oracle::DEFAULT_CACHE_TTL_MS;pub use blockscholes_types::BlockScholesMessage;pub use blockscholes_types::BlockScholesSubscribe;pub use blockscholes_types::VolSurfacePoint;pub use blockscholes_types::VolSurfaceUpdateMessage;pub use databento_oracle::DatabentoVolOracle;pub use databento_oracle::DatabentoVolOracleConfig;pub use deribit_oracle::DeribitVolOracle;pub use deribit_oracle::DeribitVolOracleConfig;pub use deribit_oracle::DEFAULT_DERIBIT_BASE_URL;pub use derive_oracle::DeriveVolOracle;pub use derive_oracle::DeriveVolOracleConfig;pub use derive_oracle::DEFAULT_DERIVE_BASE_URL;pub use fixed_oracle::FixedTestRiskVolOracle;pub use polygon_oracle::PlatformSpotPrices;pub use polygon_oracle::PolygonUnderlyingConfig;pub use polygon_oracle::PolygonVolOracle;pub use polygon_oracle::PolygonVolOracleConfig;pub use polygon_oracle::DEFAULT_POLYGON_BASE_URL;pub use polymarket_oracle::PolymarketVolOracle;pub use polymarket_oracle::PolymarketVolOracleConfig;pub use realized_vol_oracle::RealizedVolOracle;pub use realized_vol_oracle::RealizedVolOracleConfig;pub use risk_oracle::RiskVolOracle;pub use risk_oracle::RiskVolOracle as VolOracle;pub use risk_oracle::VolLookupError;pub use risk_oracle::VolOracleStatus;pub use risk_oracle::VolProviderKind;pub use risk_oracle::VolSurfaceSnapshot;pub use routed_oracle::RoutedVolOracle;pub use sticky_moneyness_oracle::StickyMoneynessVolOracle;pub use sticky_moneyness_oracle::StickyMoneynessVolOracleConfig;pub use vol_surface_cache::DeltaCurveExport;pub use vol_surface_cache::DeltaIvExport;pub use vol_surface_cache::VolPoint;pub use vol_surface_cache::VolatilitySurface;
Modules§
- blockscholes_
oracle - Block Scholes Volatility Oracle implementation.
- blockscholes_
types - Block Scholes WebSocket API types.
- databento_
oracle - Databento-backed vol oracle for CME products (initially GC gold options).
- deribit_
oracle - Deribit Volatility Oracle implementation.
- derive_
oracle - Derive (Lyra) Volatility Oracle implementation.
- fixed_
oracle - polygon_
oracle - polymarket_
oracle - Polymarket-derived Volatility Oracle for pre-IPO assets (e.g., SPCX).
- realized_
vol_ oracle - Realized-volatility oracle for assets without live option-market anchors.
- risk_
oracle - routed_
oracle - sticky_
moneyness_ oracle - vol_
surface_ cache - Volatility surface cache for storing and querying implied volatility data.
Traits§
- Polling
VolOracle - Provider runtime trait for polling or streaming live volatility data.