Requests and Events
StockMarketABM.MarketTypesMod defines the request/response objects exchanged with the market and the canonical event hierarchy emitted back to clients. The shared enums and structs keep agent messages and engine outputs consistent across modules.
StockMarketABM.MarketTypesMod.CancelRequest — TypeCancelRequestInstruction from an agent to cancel a previously accepted order.
StockMarketABM.MarketTypesMod.MarketEvent — TypeMarketEventAbstract supertype for all events emitted by the market engine. Events capture state changes such as order acceptance, trade execution, or cancellation.
StockMarketABM.MarketTypesMod.OrderAccepted — TypeOrderAccepted <: MarketEventEvent recorded when an order is acknowledged by the market. resting is true when the order (or its residual) was posted to the book, and false when the order was immediately matched.
StockMarketABM.MarketTypesMod.OrderCanceled — TypeOrderCanceled <: MarketEventEvent produced when an order is cancelled, either by explicit instruction or as a side effect of matching policies (e.g. IOC). The reason field captures the cause in a machine-readable form.
StockMarketABM.MarketTypesMod.OrderRequest — TypeOrderRequestCanonical request sent by an agent to submit an order into the market. The request includes the desired side, quantity, optional limit price, order type, time-in-force policy, timestamp, targeted instrument, and optional expiry.
StockMarketABM.MarketTypesMod.OrderResponse — TypeOrderResponseResponse returned to the requester after a submission or cancel attempt. It includes the assigned order identifier (when applicable), final status, emitted events, and an optional human-readable message.
StockMarketABM.MarketTypesMod.ResponseStatus — Type@enum ResponseStatusTerminal status for an order submission. Values indicate whether an order was rejected outright, accepted with no fills, partially filled, or completely filled.
StockMarketABM.MarketTypesMod.TradeExecuted — TypeTradeExecuted <: MarketEventEvent emitted for each executed trade. It records the trade price and quantity, identifies maker and taker orders/agents, and stores remaining quantities on both sides post fill.