Package edu.yu.marketmaker.external
Class ExternalOrderPublisher
java.lang.Object
edu.yu.marketmaker.external.ExternalOrderPublisher
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidGenerate and submit random orders continuously.voidstop()Stop generating orders.voidsubmitOrder(ExternalOrder order) Submit an order to the Exchange.
-
Constructor Details
-
ExternalOrderPublisher
- Throws:
IOException
-
-
Method Details
-
submitOrder
Submit an order to the Exchange. Calls POST /orders on Exchange API.- Parameters:
order- The ExternalOrder to submit
-
startGeneratingOrders
Generate and submit random orders continuously. Creates a concurrent load by submitting orders for multiple symbols simultaneously.- Throws:
IOException
-
stop
Stop generating orders.- Throws:
IOException
-