From 7d0b724302b5f46ef250a2160179c12400da83ac Mon Sep 17 00:00:00 2001 From: thanhpp Date: Mon, 8 Apr 2024 17:54:05 +0700 Subject: [PATCH] refactor: fix TestExchangeInfo Signed-off-by: thanhpp --- v2/exchange_info_service.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/v2/exchange_info_service.go b/v2/exchange_info_service.go index 8d10082a..587f5728 100644 --- a/v2/exchange_info_service.go +++ b/v2/exchange_info_service.go @@ -255,7 +255,12 @@ func (s *Symbol) NotionalFilter() *NotionalFilter { f.ApplyMaxToMarket = i.(bool) } if i, ok := filter["avgPriceMins"]; ok { - f.AvgPriceMins = int(i.(float64)) + switch v := i.(type) { + case float64: + f.AvgPriceMins = int(v) + case int: + f.AvgPriceMins = v + } } return f }