Class ExternalOrderPublisher

java.lang.Object
edu.yu.marketmaker.external.ExternalOrderPublisher

public class ExternalOrderPublisher extends Object
External Order Publisher Generates and submits random buy/sell orders to the Exchange API. Purpose: Drive trading activity and test system under load and concurrency. Key Characteristics: - Stateless: Does NOT track positions, quotes, or any internal state - Concurrent: Issues orders across multiple symbols simultaneously - Adversarial: Generates orders that may hit expired quotes or bad prices
  • Constructor Details

  • Method Details

    • submitOrder

      public void submitOrder(ExternalOrder order)
      Submit an order to the Exchange. Calls POST /orders on Exchange API.
      Parameters:
      order - The ExternalOrder to submit
    • startGeneratingOrders

      public void startGeneratingOrders() throws IOException
      Generate and submit random orders continuously. Creates a concurrent load by submitting orders for multiple symbols simultaneously.
      Throws:
      IOException
    • stop

      public void stop() throws IOException
      Stop generating orders.
      Throws:
      IOException