Need clear error message in InputException

mailboxofrafiq
Hi @sujith,

I was trying to place a SL order using Java SDK. But the price of option is above my SL price. It threw Input exception. How to get exact error message like 'SL price lesser than LTP' in exception?? Like how it is shown in KITE web.
You can refer logs below:

quantity:80
price:44.8
product:NRML
orderType:SL
validity:DAY
disclosedQuantity:null
triggerPrice:43.8
squareoff:null
stoploss:null
trailingStoploss:null
tag:null
parentOrderId:null
validityTTL:0 icebergQuantity:0 icebergLegs:0 2024-07-23 14:33:16.529||240723202915648 COMPLETE null Tue Jul 23 14:31:46 IST 2024 SELL FINNIFTY2472323350CE QAR:80 ASP:18.3 SL:44.8
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:360)
at com.connect.StopLossCalculator.placeSLOrder(StopLossCalculator.java:315)
at com.connect.StopLossCalculator.calculateStopLoss(StopLossCalculator.java:228)
at com.connect.TradingPortal.doGet(TradingPortal.java:67)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
Tagged:
Sign In or Register to comment.