Hi, Today 12 May 2021 at around 3pm there were several socket connection timeout issues which persisted for 30 seconds as all retry exhausted. But few request went through in between and my java client code issued getOrders and it passed and returned 2 orders as printed in my java code at 15:00:35. The two orders were MRF and RELIANCE.
Wed May 12 15:00:35 IST 2021:Aru runInstrumentOrderUpdate Done processing 2 orders
but by that time 3 orders were processed as shown in kite 15:00:29 SELL SBIN MAY FUT NFO NRML 1500 / 1500 367.20 COMPLETE 10:50:55 SELL MRF MAY FUT NFO NRML 10 / 10 77,701.00 COMPLETE 10:40:47 SELL RELIANCE BSE CNC 15 / 15 1,915.41 COMPLETE
Why would getOrders API passed but still returned one less order? SBIN order was missing. This screws up all the validation logic in code I have been using JAVA kite API since October 2020 but never faced this issue. Can you please check what went wrong at backend? I can give you the client code if required for tracing.
Also when the getOrders was called again after 2 minutes then it returned 3 orders Wed May 12 15:02:44 IST 2021:Aru runInstrumentOrderUpdate Done processing 3 orders
Why the getOrders failed to return correct order numbers at 15:00:35?
Network timeout seen at around 3PM today bactrace. I am ok with this but not with issue reported above Wed May 12 15:00:12 IST 2021com.zerodhatech.kiteconnect.kitehttp.exceptions.NetworkException at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.dealWithException(KiteResponseHandler.java:58) at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:20) at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.getRequest(KiteRequestHandler.java:54) at com.zerodhatech.kiteconnect.KiteConnect.getPositions(KiteConnect.java:594) at com.katiyar.share.Broker.getPositions(Broker.java:269) at com.katiyar.share.Broker.validateKiteFuturesPosition(Broker.java:752) at com.katiyar.share.FuturesStrategy.runStrategy(FuturesStrategy.java:208) at com.katiyar.share.TradeMsgHandler.run(TradeMsgHandler.java:215) at java.lang.Thread.run(Thread.java:748) Wed May 12 15:00:23 IST 2021java.net.SocketTimeoutException: timeout at okio.SocketAsyncTimeout.newTimeoutException(Okio.kt:149) at okio.AsyncTimeout.access$newTimeoutException(AsyncTimeout.kt:162) at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:340) at okio.RealBufferedSource.indexOf(RealBufferedSource.kt:449) at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:333) at okhttp3.internal.http1.Http1ExchangeCodec.readHeaderLine(Http1ExchangeCodec.kt:207) at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:178) at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:106) at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:79) 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)
15:00:29 SELL SBIN MAY FUT NFO NRML 1500 / 1500 367.20 COMPLETE
You mean to say, the order placed at 15:00:29 was missing from your orderbook response, requested at 15:00:35? If possible, can you add both 15:00:35 and 15:02:44 requested orderbook response? Also, can you check the detail order's history of the order placed at 15:00:29 and check order status timelines?
@rakeshr Yes your understanding is correct. The SBIN order was missing in response. Currently my client code does not records the response of API's. All it prints as to how many orders were present in getOrders response and matches with local orders which are fired from client. After yesterdays fiasco I have now added code to print details or Order response if there is a mismatch. But the same call after 2 minutes returned orders properly. Here is the order history recorded at end of the day Removed account ID detail manually in response below for privacy
I havent got any response. Is someone looking into the matter? What debugging functionality is there are on Kite server side to debug such kind of issues?
15:00:29
was missing from your orderbook response, requested at15:00:35
?If possible, can you add both
15:00:35
and15:02:44
requested orderbook response?Also, can you check the detail order's history of the order placed at
15:00:29
and check order status timelines?But the same call after 2 minutes returned orders properly.
Here is the order history recorded at end of the day
Removed account ID detail manually in response below for privacy
com.zerodhatech.models.Order
Object {
exchangeOrderId: null disclosedQuantity: 0 validity: DAY tradingSymbol: SBIN21MAYFUT
orderVariety: regular userId: null orderType: MARKET triggerPrice: 0
statusMessage: null price: 0 status: PUT ORDER REQ RECEIVED product: NRML
accountId: XXXXX exchange: NFO orderId: 210512205537996 symbol: null
pendingQuantity: 1500 orderTimestamp: Wed May 12 15:00:29 IST 2021 exchangeTimestamp: null exchangeUpdateTimestamp: null
averagePrice: 0 transactionType: SELL filledQuantity: 0 quantity: 1500
parentOrderId: null tag: AruAlgo guid: 14613XuN2Qhzpd6d7V}com.zerodhatech.models.Order
Object {
exchangeOrderId: null disclosedQuantity: 0 validity: DAY tradingSymbol: SBIN21MAYFUT
orderVariety: regular userId: null orderType: MARKET triggerPrice: 0
statusMessage: null price: 0 status: VALIDATION PENDING product: NRML
accountId: XXXXX exchange: NFO orderId: 210512205537996 symbol: null
pendingQuantity: 1500 orderTimestamp: Wed May 12 15:00:29 IST 2021 exchangeTimestamp: null exchangeUpdateTimestamp: null
averagePrice: 0 transactionType: SELL filledQuantity: 0 quantity: 1500
parentOrderId: null tag: AruAlgo guid: 14613XuN2Qhzpd6d7V}com.zerodhatech.models.Order
Object {
exchangeOrderId: null disclosedQuantity: 0 validity: DAY tradingSymbol: SBIN21MAYFUT
orderVariety: regular userId: null orderType: MARKET triggerPrice: 0
statusMessage: null price: 0 status: OPEN PENDING product: NRML
accountId: XXXXX exchange: NFO orderId: 210512205537996 symbol: null
pendingQuantity: 1500 orderTimestamp: Wed May 12 15:00:29 IST 2021 exchangeTimestamp: null exchangeUpdateTimestamp: null
averagePrice: 0 transactionType: SELL filledQuantity: 0 quantity: 1500
parentOrderId: null tag: AruAlgo guid: 14613XuN2Qhzpd6d7V}com.zerodhatech.models.Order
Object {
exchangeOrderId: 1500000078779337 disclosedQuantity: 0 validity: DAY tradingSymbol: SBIN21MAYFUT
orderVariety: regular userId: null orderType: MARKET triggerPrice: 0
statusMessage: null price: 0 status: OPEN product: NRML
accountId: XXXXX exchange: NFO orderId: 210512205537996 symbol: null
pendingQuantity: 1500 orderTimestamp: Wed May 12 15:00:29 IST 2021 exchangeTimestamp: Wed May 12 15:00:29 IST 2021 exchangeUpdateTimestamp: Wed May 12 15:00:29 IST 2021
averagePrice: 0 transactionType: SELL filledQuantity: 0 quantity: 1500
parentOrderId: null tag: AruAlgo guid: 14613XuN2Qhzpd6d7V}com.zerodhatech.models.Order
Object {
exchangeOrderId: 1500000078779337 disclosedQuantity: 0 validity: DAY tradingSymbol: SBIN21MAYFUT
orderVariety: regular userId: null orderType: MARKET triggerPrice: 0
statusMessage: null price: 0 status: COMPLETE product: NRML
accountId: XXXXX exchange: NFO orderId: 210512205537996 symbol: null
pendingQuantity: 0 orderTimestamp: Wed May 12 15:00:29 IST 2021 exchangeTimestamp: Wed May 12 15:00:29 IST 2021 exchangeUpdateTimestamp: Wed May 12 15:00:29 IST 2021
averagePrice: 367.2 transactionType: SELL filledQuantity: 1500 quantity: 1500
parentOrderId: null tag: AruAlgo guid: 14613XuN2Qhzpd6d7V}