In live mode, the strategy loop automatically skips quoting for markets when any feed is stale (default threshold: 30 seconds). You can configure this via params:
hz.run( params={"feed_stale_threshold": 60.0}, # Allow up to 60s staleness ...)
InventorySnapshot
ctx.inventory provides the current position state:
@dataclassclass InventorySnapshot: positions: list[Position] # All open positions @property def net(self) -> float: """Net position across all markets (YES - NO).""" def net_for_market(self, market_id: str) -> float: """Net position for a specific market (YES - NO).""" def net_for_event(self, market_ids: list[str]) -> float: """Net position across all markets in an event.""" def positions_for_event(self, market_ids: list[str]) -> list[Position]: """Filter positions for markets in an event."""