API Rate Limit - need clarification. I have quoted examples for reference

Hi,

Can someone please clarify about API rate limit ?

  • If I have 1 scrip and I trigger to get 15 days data from today , in an interval of 5 seconds, then how is rate limit calculated ?

is it :

  • Number of Requests per Day: 10,000 requests - Time Interval Between Requests: 5 seconds - Number of Requests per Hour: 3600 seconds per hour/ 5 seconds interval = 720 call in 1 hr - In a trading session, Total Number of Hours the code can run before it hits 10000 limit: 10,000 requests per day / Number of Requests per Hour which is 720 = 13 hrs

  • If there are 3 srcips then is the calculation ?

  • Number of Requests per Hour: 3x(3600 seconds per hour/ 5 seconds interval)= 720x3 call in 1 hr for = 2160 calls in 1 hr - In a trading session, Number of Hours the code can run before it hits 10000 limit: 10,000 requests per day / Number of Requests per Hour which is 2160 = 4 hrs

  • Another question regarding point 2, do I need to add 1 sec gap between the Get History calls of those 3 scripts also ? and is it mandatory ?

@Z4PBvkQGyF : could you please revert !

Hi @ranaharsh

The calculation mentioned by you is right for a single scrip , for multiple scrips it depends on the number of API calls done , you can fetch data of multiple symbols with a single api call as well , in that case the rate limit will still be the same as per 1 scrip mentioned from you’re end

Ohk great :+1: so I can save trips to sever by putting few scrips in the same api call. That works for me.. In any case I don’t have more than 5 scrips at any given time. I can’t track more that that..

@WWhYB2qrsx so how many scrips I can request in single api call ?

hi, @WWhYB2qrsx & @Z4PBvkQGyF ,

  1. why is this history not working at this time of the day ?

data = {‘cont_flag’: ‘1’, ‘date_format’: ‘1’, ‘range_from’: ‘2023-12-30’, ‘range_to’: ‘2024-01-29’, ‘resolution’: ‘60’, ‘symbol’: ‘NSE:SBIN-EQ’}

why is the response = {‘code’: 429, ‘message’: ‘Bad request’, ‘s’: ‘error’}.

And Can the message be more precise and with detailed info about what went wrong ?

I didn’t even execute History today . I only ran web socket for may be 30 min.. and since market shot up so fast I stopped the algo already.

  1. And how to put multiple symbols in history() ? the v3 document doesn’t suggest this.

@WWhYB2qrsx @Z4PBvkQGyF : can you please reply ?

@WWhYB2qrsx can you please reply