Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rust_hft/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4107,6 +4107,7 @@ impl ExecutionClient for PolymarketExecutionClient {
quantity: Quantity(position.size),
avg_price: Price(position.avg_price),
unrealized_pnl: position.cash_pnl,
realized_pnl: position.realized_pnl,
})
.collect())
}
Expand Down
7 changes: 7 additions & 0 deletions rust_hft/infra-services/core/metrics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ pub struct EngineStatisticsExport {
pub orders_filled: u64,
pub orders_rejected: u64,
pub orders_canceled: u64,
// Account-truth facts are emitted by the engine. The readiness policy that
// interprets them remains in the runtime-health layer.
pub runtime_truth_observed_at_us: u64,
pub reconciliation_complete: bool,
pub reconciliation_healthy: bool,
pub risk_halted: bool,
pub data_integrity_gaps: u64,
Comment on lines +91 to +95

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wire account-truth fields into readiness

When reconciliation is incomplete/unhealthy or the runtime is risk-halted, these new fields are populated by the engine but update_engine_statistics still drops them and assess_readiness still returns ready using only idle time and queue utilization. In operator-control or degraded-account starts this can expose /readiness as ready while the authoritative-account facts are false, so persist these values in the registry and include them in the readiness decision or exported health detail.

Useful? React with 👍 / 👎.

}

impl MetricsRegistry {
Expand Down
1 change: 1 addition & 0 deletions rust_hft/market-core/engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ metrics = ["dep:infra-metrics"]
legacy-sdk = []

[dev-dependencies]
hft-oms-core = { path = "../../risk-control/oms-core" }
hft-data-adapter-bitget = { path = "../../data-pipelines/adapters/adapter-bitget" }
strategy-trend = { package = "hft-strategy-trend", path = "../../strategy-framework/strategies/trend" }
strategy-arbitrage = { package = "hft-strategy-arbitrage", path = "../../strategy-framework/strategies/arbitrage" }
Expand Down
Loading
Loading