Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: How to understand the number of API calls I'm making? #370

Open
3 tasks done
dskarbrevik opened this issue Oct 20, 2023 · 1 comment
Open
3 tasks done

Comments

@dskarbrevik
Copy link

Question form pre-submit checklist.

  • I have searched the existing issues to ensure there isn't already an issue about this question.
  • My question has to do with the Python SDK and isn't a general question about the API. (If it is please open your issue here)
  • My question isn't about how to do a specific algorithm or asking for trade advice (answers to these are outside the scope of this repo).

Question

As I'm testing out the functionality of various sdk features, I'm left wondering what kind of behavior will have me hitting rate limits and what will be fine.

Does the SDK have any utils to help me monitor the number of calls I'm making?

And one specific example question on this topic, if I make a StockBarsRequest() for 2 symbols, TimeFrame="Day" and start/end of 1 year.. is this 1 API call?.. or 2 API calls (1 per symbol)?.. or more because of the start/end length?

@LukeDickerson19
Copy link

+1, it'd be nice if alpaca-py provided access to the html headers X-Ratelimit-Limit, X-Ratelimit-Remaining, and X-Ratelimit-Reset, as described here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants