Interface OrderGateway

All Known Implementing Classes:
PaperTradingGateway

public interface OrderGateway
Order entry abstraction — the seam between strategy code and the venue. Strategies talk to this interface only, so the same strategy runs against PaperTradingGateway in simulation and a broker adapter in production.
  • Method Details

    • submitLimit

      long submitLimit(String symbol, Side side, long quantity, double price)
      Submits a limit order; returns the order id (status may be REJECTED).
    • submitMarket

      long submitMarket(String symbol, Side side, long quantity)
      Submits a market order for immediate execution at the touch.
    • cancel

      boolean cancel(long orderId)
      Cancels a working order. Returns false if unknown or already terminal.
    • status

      OrderStatus status(long orderId)
    • addExecutionListener

      void addExecutionListener(OrderGateway.ExecutionListener listener)