JKorf / Binance.Net

A C# .netstandard client library for the Binance REST and Websocket Spot and Futures API focusing on clear usage and models
https://jkorf.github.io/Binance.Net/
MIT License
1.04k stars 428 forks source link

Add RateLimiter based on Weight #174

Open nikkozp opened 5 years ago

nikkozp commented 5 years ago

Hey. Noticed that you have a RateLimit which is responsible for requests per second.

Binance uses Weight in its queries. Do you have plans to add RateLimitBehaviour with Weight?

JKorf commented 5 years ago

Hi, I might add this add some point, but I'm currently busy with some other stuff. I'll keep this issue open so I won't forget it.

nikkozp commented 5 years ago

Thanks. Want to leave their wishes:

  1. Ability to set HighPriority for the request to work without delay, but not exceed the Weight. Globally and for each request separately.
pyerpl commented 5 years ago

Also thanks it will be very useful for me also (weighted + priority)

MarkusGalant commented 5 years ago

Thanks. Want to leave their wishes:

  1. Ability to set HighPriority for the request to work without delay, but not exceed the Weight. Globally and for each request separately.

Maybe we have delayed because every Api call check server time by Api call.

JKorf commented 2 years ago

The latest versions have a refactored rate limiting system, and a default rate limiter applied for the client. With this the weight of requests to the Binance API have been added. As for a priority request, this is not something I could easily add in. I would suggest working around this by creating a new client without rate limiter and using that for priority requests while maybe lowering the rate limit on the normal client.