Contract callContract = filterContracts("C");
Contract putContract = filterContracts("P");
if (RequestIDManager.singleton().isOrderIdInitialized()) {
// Place buy straddle for 1 contract as market order
Order callOrder = createOrder("BUY", 1, "MKT");
Order putOrder = createOrder("BUY", 1, "MKT");
eClientSocket.placeOrder(RequestIDManager.singleton().getNextOrderId(), callContract, callOrder);
eClientSocket.placeOrder(RequestIDManager.singleton().getNextOrderId(), putContract, putOrder);
System.out.println(" [Info] Buy straddle market order submitted for: " + underlyingData.toString());
sleep(WAIT_TIME * 30); // Hang around for order status updates...