Skip to content

Commit 10b490d

Browse files
committed
Align args order
1 parent 27ed618 commit 10b490d

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/BinanceBot.Market/MarketDepthManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public MarketDepthManager(IBinanceClient restClient, IBinanceSocketClient webSoc
6767
/// <exception cref="ArgumentOutOfRangeException"><paramref name="orderBookDepth"/> must be greater than zero</exception>
6868
/// <exception cref="OperationCanceledException">The operation was canceled.</exception>
6969
/// <exception cref="InvalidOperationException">Failed to subscribe to order book updates or get order book snapshot</exception>
70-
public async Task BuildAsync(MarketDepth marketDepth, TimeSpan? updateInterval = default, short orderBookDepth = 10, CancellationToken ct = default)
70+
public async Task BuildAsync(MarketDepth marketDepth, short orderBookDepth = 10, TimeSpan? updateInterval = default, CancellationToken ct = default)
7171
{
7272
if (marketDepth == null)
7373
throw new ArgumentNullException(nameof(marketDepth));

src/BinanceBot.MarketViewer.Console/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ await AnsiConsole.Status()
114114

115115
// build order book
116116
Logger.Info($"Building order book for {Symbol}...");
117-
await marketDepthManager.BuildAsync(marketDepth, OrderBookUpdateInterval, OrderBookDepth, ct);
117+
await marketDepthManager.BuildAsync(marketDepth, OrderBookDepth, OrderBookUpdateInterval, ct);
118118
Logger.Info("Order book ready and streaming updates...");
119119

120120

tests/BinanceBot.Market.Tests/MarketDepthManagerTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public async Task BuildAsync_WithZeroOrderBookDepth_ThrowsArgumentOutOfRangeExce
7474

7575
// Act & Assert
7676
await Assert.ThrowsAsync<ArgumentOutOfRangeException>(() =>
77-
manager.BuildAsync(marketDepth, null, 0));
77+
manager.BuildAsync(marketDepth, updateInterval: null, orderBookDepth: 0));
7878
}
7979

8080
[Fact]
@@ -86,7 +86,7 @@ public async Task BuildAsync_WithNegativeOrderBookDepth_ThrowsArgumentOutOfRange
8686

8787
// Act & Assert
8888
await Assert.ThrowsAsync<ArgumentOutOfRangeException>(() =>
89-
manager.BuildAsync(marketDepth, null, -5));
89+
manager.BuildAsync(marketDepth, updateInterval: null, orderBookDepth: -5));
9090
}
9191

9292
[Fact]
@@ -98,7 +98,7 @@ public async Task BuildAsync_WithNegativeUpdateInterval_ThrowsArgumentOutOfRange
9898

9999
// Act & Assert
100100
await Assert.ThrowsAsync<ArgumentOutOfRangeException>(() =>
101-
manager.BuildAsync(marketDepth, TimeSpan.FromMilliseconds(-100)));
101+
manager.BuildAsync(marketDepth, updateInterval: TimeSpan.FromMilliseconds(-100)));
102102
}
103103

104104
[Fact]
@@ -110,7 +110,7 @@ public async Task BuildAsync_WithZeroUpdateInterval_ThrowsArgumentOutOfRangeExce
110110

111111
// Act & Assert
112112
await Assert.ThrowsAsync<ArgumentOutOfRangeException>(() =>
113-
manager.BuildAsync(marketDepth, TimeSpan.Zero));
113+
manager.BuildAsync(marketDepth, updateInterval: TimeSpan.Zero));
114114
}
115115

116116
[Fact]

0 commit comments

Comments
 (0)