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 6e804ec commit f18f297
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions OKX.Net/SymbolOrderBooks/OKXOrderBookFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ public OKXOrderBookFactory(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;

Unified = new OrderBookFactory<OKXOrderBookOptions>(
Create,
(sharedSymbol, options) => Create(OKXExchange.FormatSymbol(sharedSymbol.BaseAsset, sharedSymbol.QuoteAsset, sharedSymbol.TradingMode, sharedSymbol.DeliverTime), options));
Unified = new OrderBookFactory<OKXOrderBookOptions>(Create, Create);
}

/// <inheritdoc />
public ISymbolOrderBook Create(SharedSymbol symbol, Action<OKXOrderBookOptions>? options = null)
{
var symbolName = OKXExchange.FormatSymbol(symbol.BaseAsset, symbol.QuoteAsset, symbol.TradingMode, symbol.DeliverTime);
var symbolName = symbol.GetSymbol(OKXExchange.FormatSymbol);
return Create(symbolName, options);
}

Expand Down

0 comments on commit f18f297

Please sign in to comment.