Zerodha API doesn't work in night

kabraanurag90
kabraanurag90 edited September 2016 in General
As my access token expires everyday. In night the MSG_FAILURE message comes.

Can you please increase access_token for 2 days atleast till this problem is resolved. I can't work in night due to this.
  • Vivek
    Yeah we have a scheduled maintenance of our oms every night between 2AM-5AM and access_token are valid for a day only as per regulations.
  • Kailash
    @kabraanurag90 As Vivek has pointed out, a number of OMS processes and cleanups happens past midnight.
  • kabraanurag90
    So there is no way I can fetch data in mid night. I am for creating an app which will use your data api to show stocks data. But in this case in night my app will not work. Other than the order execution api's the fetch data of instrument should work.

    Can you let me know alternate for this how can I get data in midnight ?
  • kabraanurag90
    And also it started happening from 1 AM only
  • Vivek
    @kabraanurag90 I am afraid its not possible to get data via Quote api after 1AM but you can try fetching data from our websocket Streaming api but the acces_token will be cleared early morning so you have to generate it again for next market day.
  • kabraanurag90
    @vivek @Kailash I am creating an real time alerts app. Is it legal to make using zerodha's api ?

    So a user can set a alert to price and I will check that continuously using web socket. And will send user notification/alert/email once target is achieved. Is it fine with you guys ?

    Also I found that "too many request" error comes sometimes when I take quotes for 500-1000 in one script without any pause. So my app will be sustainable for long user base of app ? I don't want that due to "too many request" my users will sometimes won't be able to see data.

    Let me know if you need any more infromation.
  • Vivek
    @kabraanurag90 We have rate limiting for api so its not ideal for you to use quote api to fetch market data. Our Websocket streaming api is the perfect use case for such applications. We currently scale it up to 16k concurrent users and its very reliable. Though we have 200 scrips subscription limit we are planning to increase it soon.
Sign In or Register to comment.