Candle API not returning any data ....

sameer
Candle API not returning any data ... Please check

this is not tolerable during market timings
  • fury1984
    @vivek @Kailash Still we are not getting any candle data from historical API today... Please look into it
  • fury1984
    @vivek @sujith @Kailash 10 min historical API call for today returning candles with timestamps 09:53, 10:03 etc... as shown below... Please look into it...
    [{'volume': 74968, 'date': '2017-01-11T09:53:00+0530', 'low': 1274.05, 'open': 1279.05, 'close': 1274.15, 'high': 1280}, {'volume': 3825, 'date': '2017-01-11T10:03:00+0530', 'low': 1273.15, 'open': 1274.15, 'close': 1273.15, 'high': 1275}]
  • sujith
    sujith edited January 2017
    Hi,
    We had some technical issue with our database today. It is fixed now.
  • sameer
    sameer edited January 2017
    @sujith Its same again today ... Candle API is very slow ... Sometimes returning data after more than 1 attempts
  • sujith
    @sameer,
    I just tried multiple times, it is working fine.
  • sameer
    sameer edited January 2017
    @sujith Just checked my logs at 8:45am and 9:15/20am ... Its was very slow during that time

    i) sometimes returning response to candle API call after 10 sec - no problem of network on my side as I am running prog on AWS
    ii) Sometime returning null Historical data (and hence I had to make repeated calls)

    Thats very bad during market time


    @sujith Are u sure u tested during that time ? If u need I can tell exact timestamps when response returned after 10 sec / when null historical data sent
  • sameer
    sameer edited January 2017
    @nithin @sujith @Kailash Its 8:45am ... Yesterday it was OK but today again I am facing same problem.
    I am almost alternatively getting NULL historical data from candle API(after which I sleep for 5 sec)

    Why doesn't kite team take complaints seriously ?
  • botany02
    botany02 edited January 2017
    @sameer

    The possible close reason is AWS.
    Sometime times AWS Firewall blocks incoming traffic for unknown reason(Just for few seconds to few hours).

    We also faced this problem earlier in AWS and initially thought of Kite Server might be causing the issues and soon realized that the AWS network was the cause.We double checked that AWS has network issue even-though it has very high speed network.

    We tried adding the Kite/Zerodha Server IP address specifically in security Group to allow all incoming traffic, but still that not solved issue.

    We chosen AWS bcoz of Mumbai Data center but due to network issues we are forced to switch all our servers to another cloud company.

    You can try one thing, Just run your client in your PC or other Cloud Server at 8.45 and see whether you are getting historical data or not. If you get historical data correctly, then you can conclude that AWS is the cause.
  • sameer
    sameer edited January 2017
    Thanks @botany02. I will try that.

    Kite team,

    I have two obsevations:
    1) I faced no problem while downloading day data. Faced this problem for minute data only

    2)
    Here is my Java code:
    historicalData = kiteSdk.getHistoricalData(params, token, type);
    if (historicalData != null)
    {
    if (historicalData.dataArrayList.size() == 0) {
    printlog("No data received")
    sleep(5 sec);
    }
    }


    I was continously getting logs "No data received" => I was getting non-null historicalData object.

    Can we get non-null historicalData object but zero size dataArray if there is any network issue as mentioned by @botany02 ? Please validate this so I can take further action.

    If u return null historicalData object on network issue, then its Kite server problem(as I am getting non-null hist obj only with 0 size dataArray)
    otherwise its problem on my end and I will try to fix network issue

    Please confirm!
  • sameer
    Should not Java client throw some networkException in that case ?
  • sujith
    @sameer,
    You will get HistoricalData object with dataArrayList size 0.
  • sujith
    @sameer,
    Yes it does throw KiteNetworkException, if there is connection error.
  • sameer
    sameer edited January 2017
    Hi @sujith
    As suggested by @botany02, I tried on my laptop and I got same problem .. Not sure why its happening.

    I don't get this when I try to read "day" data...
    I get this only for "1minute" data of exactly one day(which is previous trading day)

    I try to read minute data and I get dataArraysize = 0 for some time and then after 2/3 retries I get data...

    Is there any way I can debug or u need any more information to check on your end ?

    =========Input==============
    startDate : last trading day date
    endDate: last trading day date
    type: "minute"
    ======================
  • sujith
    @sameer,
    If you try to fetch minute data more than 30 days then you get the following response,
    {"status": "error", "error_type": "InputException", "message": "Difference between `to` and `from` dates for `minute` cannot be more than 30 days"}
    Try printing error message and check.
  • sameer
    @sujith Please read above comment by me:
    1. I am reading minute data for exactly 1 day (previous trading day)
    2. I am not getting any exception to check error response. I am getting non-null historical data but with dataArray.size() = 0 without any exception so how can I check error message.
  • sujith
    @sameer,
    We will investigate this and get back to you.
Sign In or Register to comment.