-
Notifications
You must be signed in to change notification settings - Fork 547
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
Add event for API limit usage monitoring #2115
Comments
Hi @sunlei This is an interesting one. It would help to understand the potential use cases in more detail Some questions:
|
|
Thanks, this seems reasonable, and I can see how it could be valuable. Do you have any thoughts on the struct—specifically the fields and types we'd want to include? One option could be to start with it as a custom type, and later make it first-class with a |
I haven’t thought through the specifics of the data structure yet. It will require abstracting information from various exchanges to create a unified model. Currently, I’m working on adding WebSocket-based order functionality for Bybit. Once that is completed, I can start considering how to design the data structure. |
Feature Request
We primarily execute strategies on cryptocurrency exchanges, all of which impose rate limits. These limits typically fall into two categories:
Those informations is typically included in the response headers.
I remember there used to be a
show_usage
option in the Binance adapter, which was used to output limit usage information to log.In high-frequency strategies, these rate limits are critical and require constant monitoring. Therefore, I propose adding a new event type to communicate limit usage data, which could be passed via callbacks like
on_data
.What do you think about this idea?
The text was updated successfully, but these errors were encountered: