From 96479e844fd1341480beb267949c13c7ce1bbcdc Mon Sep 17 00:00:00 2001 From: Gareth Kirwan Date: Sat, 14 Dec 2024 16:53:47 +0700 Subject: [PATCH] fixup! Huobi: Switch to types.Time --- exchanges/huobi/futures_types.go | 4 ++-- exchanges/huobi/huobi_wrapper.go | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/exchanges/huobi/futures_types.go b/exchanges/huobi/futures_types.go index 842304827c6..0d1cac72cdf 100644 --- a/exchanges/huobi/futures_types.go +++ b/exchanges/huobi/futures_types.go @@ -11,10 +11,10 @@ type FContractInfoData struct { ContractSize float64 `json:"contract_size"` PriceTick float64 `json:"price_tick"` DeliveryDate string `json:"delivery_date"` - DeliveryTime types.Time `json:"delivery_time,string"` + DeliveryTime types.Time `json:"delivery_time"` CreateDate string `json:"create_date"` ContractStatus int64 `json:"contract_status"` - SettlementTime types.Time `json:"settlement_time,string"` + SettlementTime types.Time `json:"settlement_time"` } } diff --git a/exchanges/huobi/huobi_wrapper.go b/exchanges/huobi/huobi_wrapper.go index d60dd1d3939..8ff734c4c21 100644 --- a/exchanges/huobi/huobi_wrapper.go +++ b/exchanges/huobi/huobi_wrapper.go @@ -301,7 +301,8 @@ func (h *HUOBI) FetchTradablePairs(ctx context.Context, a asset.Item) (currency. } pairs = make([]currency.Pair, 0, len(symbols.Data)) expiryCodeDates := map[string]currency.Code{} - for _, c := range symbols.Data { + for i := range symbols.Data { + c := symbols.Data[i] if c.ContractStatus != 1 { continue }