hypercall_db/types/oracle.rs
1//! Oracle persistence types.
2//!
3//! Input structs for TWAP price samples and settlement prices.
4
5/// Input for persisting an oracle price sample.
6#[derive(Debug, Clone)]
7pub struct NewOraclePriceSampleInput {
8 pub symbol: String,
9 pub expiry_timestamp: i64,
10 pub sample_timestamp_ms: i64,
11 pub price: f64,
12 pub source: String,
13}
14
15/// Input for persisting an oracle settlement price.
16#[derive(Debug, Clone)]
17pub struct NewOracleSettlementPriceInput {
18 pub symbol: String,
19 pub expiry_timestamp: i64,
20 pub settlement_price: f64,
21 pub sample_count: i32,
22 pub window_start: i64,
23 pub window_end: i64,
24 pub algorithm: String,
25}