hypercall_db/types/integrity.rs
1//! Integrity monitoring types for the /monitoring/integrity endpoint.
2
3use anyhow::Result;
4use rust_decimal::Decimal;
5
6/// Aggregated results from all integrity checks, run on a single DB connection.
7/// Each field is an independent query result so a single failing check
8/// doesn't block the others.
9pub struct IntegrityQueryResults {
10 /// (fill_count, total_notional_volume).
11 pub fill_volume: Result<(i64, Decimal)>,
12 /// (total_settlements, applied, pending, total_payout_value).
13 pub settlement_stats: Result<(i64, i64, i64, Decimal)>,
14 pub open_interest_by_underlying: Result<Vec<(String, Decimal)>>,
15 pub ledger_events_settlement_total: Result<Decimal>,
16 /// CALL-553 canary: non-terminal orders on settled instruments.
17 pub orphaned_settlement_orders: Result<i64>,
18}