Okx: Fix GetFundingRateHistory limit (#1204)

Fix limit of 100 rejected
Allow a limit of 0 for using the default value of limit (currently 100).
This commit is contained in:
Gareth Kirwan
2023-05-18 03:17:52 +01:00
committed by GitHub
parent 4095bc9133
commit 234287307d

View File

@@ -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