From 234287307dcf3d7156256871484b2bebf7bf8ea3 Mon Sep 17 00:00:00 2001 From: Gareth Kirwan Date: Thu, 18 May 2023 03:17:52 +0100 Subject: [PATCH] Okx: Fix GetFundingRateHistory limit (#1204) Fix limit of 100 rejected Allow a limit of 0 for using the default value of limit (currently 100). --- exchanges/okx/okx.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exchanges/okx/okx.go b/exchanges/okx/okx.go index c1d5d06c..fa79591b 100644 --- a/exchanges/okx/okx.go +++ b/exchanges/okx/okx.go @@ -3466,9 +3466,9 @@ func (ok *Okx) GetFundingRateHistory(ctx context.Context, instrumentID string, b if !after.IsZero() { params.Set("after", strconv.FormatInt(after.UnixMilli(), 10)) } - if limit > 0 && limit < 100 { + if limit > 0 && limit <= 100 { params.Set("limit", strconv.FormatInt(limit, 10)) - } else { + } else if limit > 100 { return nil, errLimitValueExceedsMaxOf100 } var resp []FundingRateResponse