Order Expiry Store

Time-limited orders are tracked through StockMarketABM.OrderExpiryStore. It pairs a priority queue keyed by expiry time with a metadata table so the market engine can quickly register, invalidate, or trigger expirations.

StockMarketABM.OrderExpiryStore.take_due_expiry!Method
take_due_expiry!(store, now) -> Union{Tuple{OrderId,ExpiringOrderState},Nothing}

Pop the earliest order whose expiry time is ≤ now. Returns a pair of the order identifier and its state, or nothing when no orders are due.

source