Skip to content

Commit

Permalink
Add test and missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan O'Hara-Reid committed Nov 27, 2024
1 parent 70781cb commit 6803a2a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
12 changes: 7 additions & 5 deletions exchanges/gateio/ratelimiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,12 @@ var packageRateLimits = request.RateLimitDefinitions{
publicCurrencyPairsMarginEPL: standardRateLimit(),
publicOrderbookMarginEPL: standardRateLimit(),

publicInsuranceDeliveryEPL: standardRateLimit(),
publicDeliveryContractsEPL: standardRateLimit(),
publicOrderbookDeliveryEPL: standardRateLimit(),
publicCandleSticksDeliveryEPL: standardRateLimit(),
publicTickersDeliveryEPL: standardRateLimit(),
publicInsuranceDeliveryEPL: standardRateLimit(),
publicDeliveryContractsEPL: standardRateLimit(),
publicOrderbookDeliveryEPL: standardRateLimit(),
publicTradingHistoryDeliveryEPL: standardRateLimit(),
publicCandleSticksDeliveryEPL: standardRateLimit(),
publicTickersDeliveryEPL: standardRateLimit(),

publicFuturesContractsEPL: standardRateLimit(),
publicOrderbookFuturesEPL: standardRateLimit(),
Expand Down Expand Up @@ -370,6 +371,7 @@ var packageRateLimits = request.RateLimitDefinitions{
optionsSubmitOrderEPL: optionsSubmitCancelAmendRateLimit(),
optionsOrdersEPL: standardRateLimit(),
optionsCancelOrdersEPL: optionsSubmitCancelAmendRateLimit(),
optionsOrderEPL: standardRateLimit(),
optionsCancelOrderEPL: optionsSubmitCancelAmendRateLimit(),
optionsTradingHistoryEPL: standardRateLimit(),

Expand Down
16 changes: 16 additions & 0 deletions exchanges/gateio/ratelimiter_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package gateio

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestRateLimits(t *testing.T) {
for epl := range optionsTradingHistoryEPL {
if epl == 0 {
continue
}
assert.NotEmptyf(t, packageRateLimits[epl], "Empty rate limit not found for const %v", epl)
}
}

0 comments on commit 6803a2a

Please sign in to comment.