Skip to content

Commit 9ba0969

Browse files
committed
Propagate info if order is coming from the snapshot
1 parent 03ec35e commit 9ba0969

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<PropertyGroup>
66
<LangVersion>latest</LangVersion>
7-
<Version>2.13.0</Version>
7+
<Version>2.13.1</Version>
88
</PropertyGroup>
99

1010
</Project>

src/Crypto.Websocket.Extensions.Core/Orders/Models/CryptoOrder.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public double? AmountOrigQuote
177177
/// Whenever order was executed on margin
178178
/// </summary>
179179
public bool OnMargin { get; set; }
180-
180+
181181
/// <summary>
182182
/// Reason why order was canceled/rejected
183183
/// </summary>
@@ -187,12 +187,17 @@ public double? AmountOrigQuote
187187
/// Paid fee
188188
/// </summary>
189189
public double Fee { get; set; }
190-
190+
191191
/// <summary>
192192
/// Currency of the paid fee
193193
/// </summary>
194194
public string? FeeCurrency { get; set; }
195195

196+
/// <summary>
197+
/// Whether this is the initial order snapshot (not an update)
198+
/// </summary>
199+
public bool IsSnapshot { get; set; }
200+
196201

197202
private double? WithCorrectSign(double? value)
198203
{

src/Crypto.Websocket.Extensions/Orders/Sources/HyperliquidOrderSource.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ private void HandleFillsSnapshot(Fill[] fills)
119119
var orders = fills
120120
.Select(ConvertFill)
121121
.ToArray();
122+
foreach (var order in orders)
123+
order.IsSnapshot = true;
122124
OrderSnapshotSubject.OnNext(orders);
123125
}
124126

0 commit comments

Comments
 (0)