Trading Options

mohanarakere
mohanarakere edited September 2019 in Java client
Hi,

How to trade options using kite connect API

For example. I want to buy
  1. Nifty Option
  2. Expiry date : 26SEP2019
  3. Strike price : 11100
  4. Option type : CE
Tried below code, but it is throwing InvalidInputException

OrderParams orderParams = new OrderParams();
orderParams.quantity = 1;
orderParams.orderType = Constants.ORDER_TYPE_MARKET;
orderParams.tradingsymbol = "NIFTY26SEP11100CE";
orderParams.product = Constants.PRODUCT_NRML;
orderParams.exchange = Constants.EXCHANGE_NFO;
orderParams.transactionType = transactionType;
orderParams.validity = Constants.VALIDITY_IOC;

Order order = getConnection().placeOrder(orderParams, Constants.VARIETY_REGULAR);

Thanks in advance

Sign In or Register to comment.