adjust max order limiter

This commit is contained in:
c9s 2024-03-09 23:41:24 +08:00
parent c06b1613b9
commit cf4fb0eaf1
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -56,7 +56,9 @@ func New(key, secret string) *Exchange {
v3margin: &v3.MarginService{Client: client},
queryTradeLimiter: rate.NewLimiter(rate.Every(1*time.Second), 2),
submitOrderLimiter: rate.NewLimiter(rate.Every(100*time.Millisecond), 10),
// 1200 cpm (1200 requests per minute = 20 requests per second)
submitOrderLimiter: rate.NewLimiter(rate.Every(50*time.Millisecond), 20),
// closedOrderQueryLimiter is used for the closed orders query rate limit, 1 request per second
closedOrderQueryLimiter: rate.NewLimiter(rate.Every(1*time.Second), 1),