got exception java.io.InterruptedIOException: interrupted while selling

sourav359
Today at 9:15:02 I was trying to sort selling a stock, but it returned -

java.io.InterruptedIOException: interrupted
at okio.Timeout.throwIfReached(Timeout.kt:98)
at okio.OutputStreamSink.write(Okio.kt:53)
at okio.AsyncTimeout$sink$1.write(AsyncTimeout.kt:103)
at okio.RealBufferedSink.flush(RealBufferedSink.kt:247)
at okhttp3.internal.http1.Http1ExchangeCodec.finishRequest(Http1ExchangeCodec.kt:155)
at okhttp3.internal.connection.Exchange.finishRequest(Exchange.kt:91)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:74)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148)
at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.postRequest(KiteRequestHandler.java:83)
at com.zerodhatech.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:291)
at in.zerodha.kite.sourav.strat.execution.Trader.orderMarketSell(Trader.java:54)

But yesterday the code was running fine. Bellow is my code -

OrderParams orderParams = new OrderParams();
orderParams.exchange = Constants.EXCHANGE_NSE;
orderParams.tradingsymbol = "BHARTIARTL";
orderParams.transactionType = Constants.TRANSACTION_TYPE_SELL;
orderParams.orderType = Constants.ORDER_TYPE_MARKET;
orderParams.quantity = 250;
orderParams.product = Constants.PRODUCT_MIS;
orderParams.triggerPrice = 0.0;
orderParams.disclosedQuantity = 0;
orderParams.validity = Constants.VALIDITY_DAY;
orderParams.tag = "000001"; //tag is optional and it cannot be more than 8 characters and only alphanumeric is allowed

Order order = kiteConnect.placeOrder(orderParams, Constants.VARIETY_REGULAR);

This kiteConnect.placeOrder() shoot this exception.

Please help...
  • sujith
    There can be multiple reasons for this. You can refer to a similar issue here.
  • sourav359
    sourav359 edited April 2020
    No can't find my issue. Actually, yesterday it was running fine... even after that unsuccessful trade it ran fine today... is there any time issue? like it will not work before 9:16:00 am or something like that?
  • sujith
    No, we don't have any restrictions like that.
Sign In or Register to comment.