Input exception while placing order

pankaj8932
Hi, I am trying to place order from Kite API but it always gives me input exception error. As a safer side I did used below sample code provided by kite but still it gives error. Is there something which I am missing or I need to assign some kind of privilege to perform this operation. I did use profile API and it works seamlessly. Please help me on this. Thanks.

Error got :
com.zerodhatech.kiteconnect.kitehttp.exceptions.InputException
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.dealWithException(KiteResponseHandler.java:54)
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:20)
at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.postRequest(KiteRequestHandler.java:86)
at com.zerodhatech.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:362)


Sample code used :
OrderParams orderParams = new OrderParams();
orderParams.quantity = 1;
orderParams.orderType = Constants.ORDER_TYPE_LIMIT;
orderParams.tradingsymbol = "ASHOKLEY";
orderParams.product = Constants.PRODUCT_CNC;
orderParams.exchange = Constants.EXCHANGE_NSE;
orderParams.transactionType = Constants.TRANSACTION_TYPE_BUY;
orderParams.validity = Constants.VALIDITY_DAY;
orderParams.price = 140.20;
orderParams.triggerPrice = 0.0;
orderParams.tag = "myTag"; //tag is optional and it cannot be more than 8 characters and only alphanumeric is allowed

Order order = kiteConnect.placeOrder(orderParams, Constants.VARIETY_REGULAR);
System.out.println(order.orderId);
  • pankaj8932
    okays it shows my account is dormant ."message":"NSE is disabled for your account". It needs to activate again I believe
  • sujith
    You can read more about it here.
Sign In or Register to comment.