Action:
    | {
        orderType?: OrderType;
        price: Numeric;
        quantity: Numeric;
        side: Side;
        type: "createOrder";
    }
    | { orderId: OrderId; type: "cancelOrder" }
    | { type: "settleBalance" }
    | { to: Identity; type: "registerReferer" }

A type-safe action for session batch submission.

Use with O2Client.batchActions and MarketActionGroup. Factory functions (createOrderAction, cancelOrderAction, settleBalanceAction) are optional sugar — plain objects with the correct type discriminant also work.