diff --git a/HTX.Net/SymbolOrderBooks/HTXOrderBookFactory.cs b/HTX.Net/SymbolOrderBooks/HTXOrderBookFactory.cs index 88528de..ac42652 100644 --- a/HTX.Net/SymbolOrderBooks/HTXOrderBookFactory.cs +++ b/HTX.Net/SymbolOrderBooks/HTXOrderBookFactory.cs @@ -25,18 +25,14 @@ public HTXOrderBookFactory(IServiceProvider serviceProvider) { _serviceProvider = serviceProvider; - Spot = new OrderBookFactory( - CreateSpot, - (sharedSymbol, options) => CreateSpot(HTXExchange.FormatSymbol(sharedSymbol.BaseAsset, sharedSymbol.QuoteAsset, sharedSymbol.TradingMode, sharedSymbol.DeliverTime), options)); - UsdtFutures = new OrderBookFactory( - CreateUsdtFutures, - (sharedSymbol, options) => CreateUsdtFutures(HTXExchange.FormatSymbol(sharedSymbol.BaseAsset, sharedSymbol.QuoteAsset, sharedSymbol.TradingMode, sharedSymbol.DeliverTime), options)); + Spot = new OrderBookFactory(CreateSpot, Create); + UsdtFutures = new OrderBookFactory(CreateUsdtFutures, Create); } /// public ISymbolOrderBook Create(SharedSymbol symbol, Action? 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);