InputException while placing limit order

vijayaraj22
Hi, I'm new to this kite forum. I tried placing market order through java client. It's working fine. But when placing limit order , it throws inputException

try {
OrderParams orderParams = new OrderParams();
orderParams.quantity = 1;
orderParams.orderType = Constants.ORDER_TYPE_LIMIT;
orderParams.tradingsymbol = "IDEA";
orderParams.product = Constants.PRODUCT_CNC;
orderParams.exchange = Constants.EXCHANGE_NSE;
orderParams.transactionType = Constants.TRANSACTION_TYPE_BUY;
orderParams.validity = Constants.VALIDITY_DAY;
orderParams.price = 12.2;
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 = kiteSdk.placeOrder(orderParams, Constants.VARIETY_REGULAR);
}catch(InputException e) {
System.out.println("Eror code:::"+e.toString()+"::::::::"+e.getMessage()+"::::"+e.getCause());
throw e;
}

The above is my snippet and the output is

Eror code:::com.zerodhatech.kiteconnect.kitehttp.exceptions.InputException::::::::null::::null
2021-11-18 13:21:38.175 ERROR 76853 --- [ task-1] .a.i.SimpleAsyncUncaughtExceptionHandler : Unexpected exception occurred invoking async method: public void com.investment.arbitrage.util.CommonUtil.placeOrder(java.lang.String,int,java.lang.String) throws org.json.JSONException,java.io.IOException,com.zerodhatech.kiteconnect.kitehttp.exceptions.KiteException

com.zerodhatech.kiteconnect.kitehttp.exceptions.InputException: null
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.dealWithException(KiteResponseHandler.java:54) ~[kiteconnect.jar:1.11]
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:20) ~[kiteconnect.jar:1.11]
at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.postRequest(KiteRequestHandler.java:86) ~[kiteconnect.jar:1.11]
at com.zerodhatech.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:353) ~[kiteconnect.jar:1.11]
at com.investment.arbitrage.util.CommonUtil.placeOrder(CommonUtil.java:299) ~[main/:na]
at com.investment.arbitrage.util.CommonUtil$$FastClassBySpringCGLIB$$9f9da3a6.invoke() ~[main/:na]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.3.12.jar:5.3.12]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783) ~[spring-aop-5.3.12.jar:5.3.12]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.12.jar:5.3.12]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) ~[spring-aop-5.3.12.jar:5.3.12]
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115) ~[spring-aop-5.3.12.jar:5.3.12]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_144]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_144]

Can someone help me here?
Tagged:
  • sujith
    can you print exception.message or run javakiteconnect with debug logs on and paste the response here?
  • vijayaraj22
    when i printed exception.message , it said 'Your order price is higher than the current [upper circuit limit]'. Now fixed it and it is working now. Thanks @sujith
This discussion has been closed.