Hi,
I am trying to create option order and I am getting following error
java.lang.RuntimeException: Non 200 response: [400 - {
"error" : "Following parameters are not allowed when placing an order: optionDeliverables"
Here is my code snippet
Order order = new Order();
order.setComplexOrderStrategyType(ComplexOrderStrategyType.NONE);
order.setOrderType(OrderType.LIMIT);
order.setSession(Session.NORMAL);
order.setOrderStrategyType(OrderStrategyType.SINGLE);
BigDecimal buyprice = new BigDecimal(1.0).setScale(2, RoundingMode.HALF_UP);
order.setPrice(buyprice);
order.setDuration(Duration.DAY);
OrderLegCollection olc = new OrderLegCollection();
olc.setInstruction(Instruction.BUY_TO_OPEN);
olc.setQuantity(new BigDecimal("1"));
order.getOrderLegCollection().add(olc);
OptionInstrument instrument = new OptionInstrument();
instrument.setSymbol("CCL_012122C30");
instrument.setAssetType(AssetType.OPTION);
olc.setInstrument(instrument);;
Hi, I am trying to create option order and I am getting following error
java.lang.RuntimeException: Non 200 response: [400 - { "error" : "Following parameters are not allowed when placing an order: optionDeliverables"
Here is my code snippet Order order = new Order(); order.setComplexOrderStrategyType(ComplexOrderStrategyType.NONE); order.setOrderType(OrderType.LIMIT); order.setSession(Session.NORMAL); order.setOrderStrategyType(OrderStrategyType.SINGLE); BigDecimal buyprice = new BigDecimal(1.0).setScale(2, RoundingMode.HALF_UP); order.setPrice(buyprice); order.setDuration(Duration.DAY);
}
Any help for the same will be highly appreciated.