Skip to main content

Crate hypercall_vol_oracle

Crate hypercall_vol_oracle 

Source
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::SharedRiskVolOracle;
pub use risk_oracle::SharedVolOracle;
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§

PollingVolOracle
Provider runtime trait for polling or streaming live volatility data.