diff --git a/pkg/exchange/binance/binanceapi/client_test.go b/pkg/exchange/binance/binanceapi/client_test.go index bad92bce3..530113819 100644 --- a/pkg/exchange/binance/binanceapi/client_test.go +++ b/pkg/exchange/binance/binanceapi/client_test.go @@ -52,7 +52,7 @@ func TestClient_GetMarginFutureNextHourlyInterestRate(t *testing.T) { err := client.SetTimeOffsetFromServer(ctx) if assert.NoError(t, err) { req := client.NewGetMarginFutureHourlyInterestRateRequest(). - Assets("BTC,USDT"). + Assets("BTC,ETH,USDT,USDC"). IsIsolated("FALSE") rates, err := req.Do(ctx) assert.NoError(t, err) diff --git a/pkg/exchange/binance/exchange.go b/pkg/exchange/binance/exchange.go index ba017441c..8ac3c34cc 100644 --- a/pkg/exchange/binance/exchange.go +++ b/pkg/exchange/binance/exchange.go @@ -309,6 +309,11 @@ func (e *Exchange) NewStream() types.Stream { func (e *Exchange) QueryMarginFutureHourlyInterestRate( ctx context.Context, assets []string, ) (rates types.MarginNextHourlyInterestRateMap, err error) { + + if len(assets) > 20 { + return nil, fmt.Errorf("assets length must be less than 20, got %d", len(assets)) + } + req := e.client2.NewGetMarginFutureHourlyInterestRateRequest() req.Assets(strings.Join(assets, ",")) req.IsIsolated("FALSE")