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.OrderAcceptedType
OrderAccepted <: MarketEvent

Event 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.

source
StockMarketABM.MarketTypesMod.OrderCanceledType
OrderCanceled <: MarketEvent

Event 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.

source
StockMarketABM.MarketTypesMod.OrderRequestType
OrderRequest

Canonical 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.

source
StockMarketABM.MarketTypesMod.OrderResponseType
OrderResponse

Response 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.

source
StockMarketABM.MarketTypesMod.TradeExecutedType
TradeExecuted <: MarketEvent

Event 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.

source