Historical data Issue

venun
venun edited December 2017 in Python client
I am trying to get data for every 5 minutes for every 5 seconds, OHLC is even not running continuous for 1 min, ending up with no response in between, Please fix this issue..

{"status": "error", "message": "Gateway timed out", "error_type": "NetworkException"}

Thanks,
Venu
  • venun
    {"status": "error", "message": "Gateway timed out", "error_type": "NetworkException"}
  • sujith
    Can you let us know which API you are using?
  • venun
    SSLError: HTTPSConnectionPool(host='api.kite.trade', port=443): Max retries exceeded with url: /instruments/historical/4632577/minute?from=2017-12-12&to=2017-12-12&api_key=ba64dhmc3t8vulae&access_token=7cwl0nuo5si5urn9k4ogqp6y98dvu92m (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),))
  • venun
    today also same problem.... disconnecting , not lasting for more than 10 min
  • venun
    again:
    raise ex.ClientNetworkException("Gateway timed out", code=504)

    ClientNetworkException: Gateway timed out
  • venun

    Again:
    SSLError: HTTPSConnectionPool(host='api.kite.trade', port=443): Max retries exceeded with url: /instruments/historical/4632577/minute?from=2017-12-13&to=2017-12-13&api_key=ba64dhmc3t8vulae&access_token=87e3itip6utquy1pma9in0ocw3a4jtir&i=NSE:JUBLFOOD (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),))
  • mintuhouse
    Same issue here
    Did you find a fix?
  • sujith
    Hi,
    The above URL looks like historical data API. The data team is rearchitecting the historical data API from scratch which will fix this.
  • venun
    @sujith
    today now the time is 9:23 , it failed 3 times, please dont play with our money, if you able to fix it tell us,. let us know frankly. very irritating.

    Thanks,
    venu
  • venun
    again:
    Traceback (most recent call last):

    File "", line 1, in
    runfile('C:/Users/venun/.spyder-py3/omc.py', wdir='C:/Users/venun/.spyder-py3')

    File "C:\Anaconda\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile
    execfile(filename, namespace)

    File "C:\Anaconda\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)
  • venun
    @Kailash @sujith ,

    Hello Team,
    Why dont you provide access to database to get OHLC, rather than HTTP request. It help us a lot, we can retrieve, multiple stocks at a time.

    Thanks,
    Venu

  • venun
    If anyone facing the same issue:
    here is the workaround:
    find the length of the empty response:
    while True:
    if length > empty response length
    execute your code:
    else
    sleep(2)
  • Vaga
    Same error here... I have logged in at least 10 times since morning. This is really irritating especially when we put actual trades.

    File "/usr/local/lib/python3.5/dist-packages/kiteconnect/__init__.py", line 636, in _request
    raise ex.ClientNetworkException("Gateway timed out", code=504)
    kiteconnect.exceptions.ClientNetworkException: Gateway timed out


  • venun
    Hello Team,
    Today is very bad... for every 30 seconds, some of your api are failing to fetch data...
    very pathetic... Please address....

    Thanks,
    Venu
  • venun
    Stopped trading for the day........ :/
  • Vaga
    Same here :(
  • venun
    @sujith @Kailash
    please address this issue, we are facing so many problems , please answer us
    we are paying for your services
    Thanks,
    Venu
  • venun
    ConnectionError: ('Connection aborted.', OSError("(10054, 'WSAECONNRESET')",))
  • venun
    length of response 89 == OHLC NULL
    Traceback (most recent call last):
  • sujith
    Hi @venun,
    Our data team is working on this issue.
    Historical data is provided for backtesting purposes. It is not ideally meant for the use case wherein you keep fetching candle after 5 or 15 minutes. I would suggest generating candles at your end for the above scenario.

    A 5minute candle is generated using five 1minute candles. You need to listen to ticks coming from Kite ticker and generate candles like this,
    open -> first LTP of the minute.
    high -> highest LTP of the minute.
    low -> lowest LTP of the minute.
    close -> last LTP of the minute.
  • venun
    Any way if it is backtesting or realtime, it should give data when I hit the database, There is nothing like that, if any API is there its is my choice to run in real time or historical.
    Your are trying to escape from the issue.
  • venun
    Can we test together all your APIs, without proper testing your are releasing your API to clients
  • venun
    Anyways I spend 3 weeks with your API's , please give us a free tail before you sell...

    Please let us know once you fix the issues, with some test results your tested before release

    Thanks,
    Venu
  • venun
    @sujith
    you can check mylogin : with in 30 seconds it got failed
    ltp=kite.quote('NSE','JUBLFOOD')['last_price']

    File "C:\Anaconda\lib\site-packages\kiteconnect\__init__.py", line 501, in quote
    return self._get("market.quote", {"exchange": exchange, "tradingsymbol": tradingsymbol})

    File "C:\Anaconda\lib\site-packages\kiteconnect\__init__.py", line 577, in _get
    return self._request(route, "GET", params)

    File "C:\Anaconda\lib\site-packages\kiteconnect\__init__.py", line 668, in _request
    raise(exp(data["message"], code=r.status_code))

    DataException: Exception fetching quote
  • sagarraut0007
    I'm also trying to fetch Historical API on every 5 mins but facing same issue. please resolve this. i still didn't get it, why you are charging people for this crap "Historical API".
Sign In or Register to comment.