why im not being able to fetch data during pre open?

yc_mhk
Its showing an error IllegalStateException:closed when tried to fetch data during pre open. The code line is kiteSdk.getQuote(getq). It was working fine until yesterday but not now. Kindly resolve this asap.
  • tonystark
    Can you mention the javakiteconnect version you are using and run in debug mode and paste the stacktrace here?

    PS: Make sure to remove app and client-specific tokens.
  • yc_mhk
    Version 3 downloaded in 2020. It shows error only between 9:00 and 9:08. So i have to try it tomorrow again for error sign. As i said it was working fine until yesterday. Rest all APIs work like order place,modify,cancel etc. Only i cannot get qoutes in pre open session
  • tonystark
    That is a very old version. Latest is 3.2.1. You should regularly update library to be in sync with our backend changes.

    IllegalStateException can happen due to a lot of different reasons. We can't help without getting more details.
  • yc_mhk
    java.lang.IllegalStateException: closed
    at okio.RealBufferedSource.select(RealBufferedSource.kt:220)
    at okhttp3.internal.Util.readBomAsCharset(Util.kt:256)
    at okhttp3.ResponseBody.string(ResponseBody.kt:187)
    at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:24)
    at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.getRequest(KiteRequestHandler.java:135)
    at com.zerodhatech.kiteconnect.KiteConnect.getQuote(KiteConnect.java:664)
    at sam$6.run(sam.java:1262)
    at java.lang.Thread.run(Thread.java:748)

    This is what you get.
  • sujith
    Can you update javakiteconnect to the latest version and try? Could be happening because of outdated dependencies.
  • amitabhchoudhury
    Is this resolved? Was multiple threads actively accessing datafeed?
Sign In or Register to comment.