pub trait PollingVolOracle: Send + Sync {
// Required methods
fn start_polling(self: Arc<Self>) -> JoinHandle<()>;
fn get_vol<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol: &'life1 str,
strike: f64,
expiry: i64,
) -> Pin<Box<dyn Future<Output = Option<f64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_atm_vol<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol: &'life1 str,
expiry: i64,
) -> Pin<Box<dyn Future<Output = Option<f64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn is_healthy<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn last_update_timestamp<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<i64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Provider runtime trait for polling or streaming live volatility data.
This is intentionally separate from the engine-facing risk-vol lookup trait. Startup and provider implementations use this for provider lifecycle and direct surface inspection.
Required Methods§
Sourcefn start_polling(self: Arc<Self>) -> JoinHandle<()>
fn start_polling(self: Arc<Self>) -> JoinHandle<()>
Start the WebSocket connection and begin receiving volatility updates.
Sourcefn get_vol<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol: &'life1 str,
strike: f64,
expiry: i64,
) -> Pin<Box<dyn Future<Output = Option<f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_vol<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol: &'life1 str,
strike: f64,
expiry: i64,
) -> Pin<Box<dyn Future<Output = Option<f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the implied volatility for a specific point on the surface.
Sourcefn get_atm_vol<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol: &'life1 str,
expiry: i64,
) -> Pin<Box<dyn Future<Output = Option<f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_atm_vol<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol: &'life1 str,
expiry: i64,
) -> Pin<Box<dyn Future<Output = Option<f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the ATM volatility for a symbol at a given expiry.