Skip to content

Commit

Permalink
Fixed Bitget and Kraken order book creation ExchangeOrderBookFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
JKorf committed Oct 14, 2024
1 parent 3f8ad7a commit 6e024b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CryptoClients.Net/ExchangeOrderBookFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public ExchangeOrderBookFactory(
return Bitfinex.Spot.Create(symbol.GetSymbol(bitfinexClient.SpotApi.FormatSymbol));
case "Bitget":
var bitgetClient = new BitgetRestClient();
return symbol.TradingMode == TradingMode.Spot ? Bitget.Spot.Create(symbol.GetSymbol(bitgetClient.SpotApi.FormatSymbol))
return symbol.TradingMode == TradingMode.Spot ? Bitget.Spot.Create(symbol.GetSymbol(bitgetClient.SpotApiV2.FormatSymbol))
: symbol.TradingMode.IsInverse() ? Bitget.CoinFutures.Create(symbol.GetSymbol(bitgetClient.FuturesApiV2.FormatSymbol))
: ExchangeParameters.GetValue<string?>(exchangeParameters, "Bitget", "ProductType") == "UsdtFutures" ? Bitget.UsdtFutures.Create(symbol.GetSymbol(bitgetClient.FuturesApiV2.FormatSymbol))
: Bitget.UsdcFutures.Create(symbol.GetSymbol(bitgetClient.FuturesApiV2.FormatSymbol));
Expand Down Expand Up @@ -151,7 +151,7 @@ public ExchangeOrderBookFactory(
return symbol.TradingMode == TradingMode.Spot ? HTX.Spot.Create(symbol.GetSymbol(htxClient.SpotApi.FormatSymbol))
: HTX.UsdtFutures.Create(symbol.GetSymbol(htxClient.UsdtFuturesApi.FormatSymbol));
case "Kraken":
var krakenClient = new KrakenRestClient();
var krakenClient = new KrakenSocketClient();
return symbol.TradingMode == TradingMode.Spot ? Kraken.Spot.Create(symbol.GetSymbol(krakenClient.SpotApi.FormatSymbol))
: Kraken.Futures.Create(symbol.GetSymbol(krakenClient.FuturesApi.FormatSymbol));
case "Kucoin":
Expand Down

0 comments on commit 6e024b7

Please sign in to comment.