# Hook: onBeforePlaceOrder()

Called before the trading system places an order. Can be used to filter directives and ensure risk management. The hook is active only for orders placed through the trading system placeOrder() method. The hook can return undefined to avoid sending the order to the trading platform (to cancel the order request).

  • Interface
class MidaTradingSystem {
    protected onBeforePlaceOrder (directives: MidaOrderDirectives): Promise<MidaOrderDirectives | undefined>;