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 d82066b commit 153cf84
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Bitfinex.Net/SymbolOrderBooks/BitfinexOrderBookFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,16 @@ public BitfinexOrderBookFactory(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;

Spot = new OrderBookFactory<BitfinexOrderBookOptions>(
Create,
(sharedSymbol, options) => Create(BitfinexExchange.FormatSymbol(sharedSymbol.BaseAsset, sharedSymbol.QuoteAsset, sharedSymbol.TradingMode, sharedSymbol.DeliverTime), options));
Spot = new OrderBookFactory<BitfinexOrderBookOptions>(Create, Create);
}

/// <inheritdoc />
public IOrderBookFactory<BitfinexOrderBookOptions> Spot { get; }

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

Expand Down

0 comments on commit 153cf84

Please sign in to comment.