API rate limit : Querying for multiple user at the same time

Harry
Hi Team,

I am developing an application where I have multiple accounts that will trade the same strategy. Whenever I receive an on_order_update callback, after 100ms I get the last order state, using order_history. Earlier I implemented using continuous polling of order_history. But considering the API limit, I moved it to a call-back mechanism from OMS.

Since all the user's sessions are running inside the same machine, there is a good chance that I could call order_history for all the users at the same time. I could face the API rate limit. I believe the API rate limit is based on IP rather than the api_key.

Any ideas on how to implement this architecture? In layman's terms, I could think of creating systems with different IPs. But I am a novice in networking concepts.
  • rakeshr
    there is a good chance that I could call order_history for all the users at the same time. I could face the API rate limit.
    No, this won't be an issue for an extended number of users, if each user has a different app/api_keys.
  • Harry
    So then basically API rate limit is based on api_key not the IP. Please correct me if I am wrong.
  • rakeshr
    No, it's based on IP as well. But enough room is given for multiple app users. You won't face issues for 10s of users/API keys.
  • Harry
    Thanks @rakeshr . This will help me for time being. Assuming I scale up in future what would be the right path?
Sign In or Register to comment.