Skip to content

Commit

Permalink
Fix for orderbook creation via factory
Browse files Browse the repository at this point in the history
  • Loading branch information
JKorf committed Nov 29, 2024
1 parent 04a1805 commit b5c987d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions HTX.Net/SymbolOrderBooks/HTXOrderBookFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,14 @@ public HTXOrderBookFactory(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;

Spot = new OrderBookFactory<HTXOrderBookOptions>(
CreateSpot,
(sharedSymbol, options) => CreateSpot(HTXExchange.FormatSymbol(sharedSymbol.BaseAsset, sharedSymbol.QuoteAsset, sharedSymbol.TradingMode, sharedSymbol.DeliverTime), options));
UsdtFutures = new OrderBookFactory<HTXOrderBookOptions>(
CreateUsdtFutures,
(sharedSymbol, options) => CreateUsdtFutures(HTXExchange.FormatSymbol(sharedSymbol.BaseAsset, sharedSymbol.QuoteAsset, sharedSymbol.TradingMode, sharedSymbol.DeliverTime), options));
Spot = new OrderBookFactory<HTXOrderBookOptions>(CreateSpot, Create);
UsdtFutures = new OrderBookFactory<HTXOrderBookOptions>(CreateUsdtFutures, Create);
}

/// <inheritdoc />
public ISymbolOrderBook Create(SharedSymbol symbol, Action<HTXOrderBookOptions>? options = null)
{
var symbolName = HTXExchange.FormatSymbol(symbol.BaseAsset, symbol.QuoteAsset, symbol.TradingMode, symbol.DeliverTime);
var symbolName = symbol.GetSymbol(HTXExchange.FormatSymbol);
if (symbol.TradingMode == TradingMode.Spot)
return CreateSpot(symbolName, options);

Expand Down

0 comments on commit b5c987d

Please sign in to comment.