pub trait OracleWriter: Send + Sync {
// Required methods
fn save_oracle_price_samples_sync(
&self,
samples: &[NewOraclePriceSampleInput],
) -> Result<()>;
fn save_oracle_settlement_price_sync(
&self,
settlement: &NewOracleSettlementPriceInput,
) -> Result<()>;
fn get_oracle_settlement_price_sync(
&self,
symbol: &str,
expiry_timestamp: i64,
) -> Result<Option<f64>>;
}Expand description
Write-only oracle persistence operations.
Required Methods§
Sourcefn save_oracle_price_samples_sync(
&self,
samples: &[NewOraclePriceSampleInput],
) -> Result<()>
fn save_oracle_price_samples_sync( &self, samples: &[NewOraclePriceSampleInput], ) -> Result<()>
Persist a batch of price samples for a given symbol/expiry. Duplicate samples (by symbol, expiry, timestamp, source) are silently ignored.
Sourcefn save_oracle_settlement_price_sync(
&self,
settlement: &NewOracleSettlementPriceInput,
) -> Result<()>
fn save_oracle_settlement_price_sync( &self, settlement: &NewOracleSettlementPriceInput, ) -> Result<()>
Persist a finalized settlement price. If a settlement already exists for this (symbol, expiry), it is silently ignored.