Max Sessions Rate Reached Error
Max Sessions Rate Reached Error [Urgent!]
For the way I am using the API, I need to call multiple timeframes on multiple assets simultaneously. When sending the GET request, I get the error "[max sessions rate reached]". This only occurs when requesting several timeframes on several assets. When sending the same type of GET request but with only a few assets and timeframes, I am able to get the desired output.
Error:

Is there a rate limit for the number of requests that can be made per minute? Why is this error being generated and how can I access more assets and timeframes simultaneously? I can pay for troubleshooting assistance, implementation of the API is urgent to meet project deadlines
Did you solve this?
dear @thereyoflite can you insert your code ? how many do you have request per minutes ?
Hi @thereyoflite. You're getting rate limited. Basically too many requests to TradingView for your session.
Is there a rate limit for the number of requests that can be made per minute?
Definitely
Why is this error being generated
Because there is a rate limit and you're disrespecting it
and how can I access more assets and timeframes simultaneously?
We don't know exactly how the rate limiting of TradingView works
Is it per second? Is it per minute? Is it per endpoint? Is it per session? How many requests?
Nonetheless you can implement an exponential backoff feature so that when you get this error you try again later. But if for example you need to send 5 million requests every hour and TradingView only allows 4 million. There's not much you can do unless ...
Idea: you could also have multiple premium accounts (different sessions) and this could let you fetch more data simultaneously. So for the example you could send 2.5 million requests for account A and 2.5 million requests for account B thus not hitting the imaginary 4 million per hour limit.
Other idea: you could optimize the API usage so that you can get what you want but send less requests. Need to evaluate
I can pay for troubleshooting assistance, implementation of the API is urgent to meet project deadlines
Rate limits are annoying. Let me know if you haven't solved your issue yet
@Mathieu2301 can close this issue for inactivity since it was reported in January, someone asked if he solved it in May and we're in September and the OP didn't say anything. For what it's worth, I left some detailed answers to his questions 🤝