Getting error msg while fetching historical data from api


I'm getting below error msg while calling historical_data method.

error-msg : - Too many requests

Please do let me know how many request can I make per seconds or your limitation in this call.

I'm writing a scanner program where I need at least 250 scrips candle data with in 5 to 10 seconds.

Please do let me know if you have any limitation in calling api to get OHLC of candle and also provide workaround for this.

Note:- I have also noticed that most of the time current candle data didn't receive, any reason for this ?

Please also suggest any reliable third party vendor for real-time data OHLC candle data.

  • ZI4453
    @rajukumarpu9 .Use websocket for marketdata
    even if you can make 250 GET calls in a second you would get the same data since prior until there is an update in tick.Any API provider will be having very strict policy on GET calls ...
    Webscoket connection is your only choice and i would recommend you to code for Round r0bin making sure that you can close you calculations less than 150-200 milliseconds.
    *Avoid globals,
    *Use light weigh DB (Sqllite3)
    *keep API calls in threads,
    *list comprehension
  • sujith
    You can check out the rate limits here.

    The historical data API is provided only for backtesting purposes. We don't recommend using the same for live market strategies.
    For live market strategies, you may construct your own candles as discussed here.
  • rajukumarpu9
    Hi @ZI4453 , thanks for the information.
    I'm not making 250 GET calls for one scrip. making one call for one scrip , 250 calls for 250 individual scrips.

  • rajukumarpu9
    Hi @sujith ,

    Can you pls share some sample code for how to construct 1 min candle.
  • ZI4453
    @rajkumarpu9 , are you looking candle data for analysis or you are trying to build a platoform for yourself, Becasue building candle involves totally a different topic.. this API can only provide data , any other post processing we have to take care of ourselves
  • rajukumarpu9
    @ZI4453 , First I need candle data in real-time and then post processing will take care of myself. Please do let me know if you have any idea like how fast we can build candle from tick data. Please share your idea .
    Pls share your whatsapps number , mine is +65-86474369.

  • ZI4453
    I am puzzled to know why candle data is required when you hava "data" which can be assigned to variable for post processing.
    lets say if candle shows 10->15->12->19..... it means a particular variable was assigned & these data and that variable simple showed it as graph for visual representation.
    Now-coming to your requirement, ideally any Algo will work based on signals generated() which requires tick data(which we already have ) ......
    i am still not able to get to the point that why we are looking for candle data when have raw data in hand....
  • rajukumarpu9
    my logic is depend on the candle data (OHLCV). I'm not sure how ticks data looks like, whether I can achieve it directly from tick data or not. Please share if you have ticks data sample.
Sign In or Register to comment.