From b79793485484f825d593bcccf5ca58fdc73e2fe0 Mon Sep 17 00:00:00 2001 From: Ryan O'Hara-Reid Date: Mon, 24 Jul 2023 13:26:50 +1000 Subject: [PATCH] bitfinex: fix websocket subscribing issue caused by formatting (#1276) * bitfinex: fix subscribing issue caused by formatting * glorious: nits --------- Co-authored-by: Ryan O'Hara-Reid --- exchanges/bitfinex/bitfinex_websocket.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/exchanges/bitfinex/bitfinex_websocket.go b/exchanges/bitfinex/bitfinex_websocket.go index d17f7d4d..6211358d 100644 --- a/exchanges/bitfinex/bitfinex_websocket.go +++ b/exchanges/bitfinex/bitfinex_websocket.go @@ -1493,12 +1493,8 @@ func (b *Bitfinex) WsUpdateOrderbook(p currency.Pair, assetType asset.Item, book // GenerateDefaultSubscriptions Adds default subscriptions to websocket to be handled by ManageSubscriptions() func (b *Bitfinex) GenerateDefaultSubscriptions() ([]stream.ChannelSubscription, error) { - var channels = []string{ - wsBook, - wsTrades, - wsTicker, - wsCandles, - } + var wsPairFormat = currency.PairFormat{Uppercase: true} + var channels = []string{wsBook, wsTrades, wsTicker, wsCandles} var subscriptions []stream.ChannelSubscription assets := b.GetAssetTypes(true) @@ -1526,7 +1522,7 @@ func (b *Bitfinex) GenerateDefaultSubscriptions() ([]stream.ChannelSubscription, } params["key"] = "trade:1m:" + prefix + enabledPairs[k].String() + fundingPeriod } else { - params["symbol"] = enabledPairs[k].String() + params["symbol"] = wsPairFormat.Format(enabledPairs[k]) } subscriptions = append(subscriptions, stream.ChannelSubscription{