Getting closed exception while calling getInstruments(Exch) API

TradeWithLoKi
Hi,
I am new on this platform; can someone please help me why am I getting this error when I have called getInstruments(exch)?
java.lang.RuntimeException: java.lang.IllegalStateException: closed
at com.systematic.trade.service.SimulationService.startSimulation(SimulationService.java:32) ~[main/:?]
at com.systematic.trade.Main.main(Main.java:18) ~[main/:?]
Caused by: java.lang.IllegalStateException: closed
at okio.RealBufferedSource.select(RealBufferedSource.kt:220) ~[okio-jvm-2.4.3.jar:?]
at okhttp3.internal.Util.readBomAsCharset(Util.kt:256) ~[okhttp-4.4.0.jar:?]
at okhttp3.ResponseBody.string(ResponseBody.kt:187) ~[okhttp-4.4.0.jar:?]
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:34) ~[kiteconnect-3.3.2.jar:?]
at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.getCSVRequest(KiteRequestHandler.java:167) ~[kiteconnect-3.3.2.jar:?]
at com.zerodhatech.kiteconnect.KiteConnect.getInstruments(KiteConnect.java:733) ~[kiteconnect-3.3.2.jar:?]
at com.systematic.trade.clients.KiteTradingClient.getInstruments(KiteTradingClient.java:39) ~[main/:?]
at com.systematic.trade.service.SimulationService.getAndStoreInstruments(SimulationService.java:38) ~[main/:?]
at com.systematic.trade.service.SimulationService.startSimulation(SimulationService.java:27) ~[main/:?]

Is it due to exchange is currently closed?
  • sujith
    This doesn't seem like Kite Connect Exception. Can you run with debug logs on and check?
Sign In or Register to comment.