Skip to content

Commit df00dc3

Browse files
l0rdakvslee
authored andcommitted
Set order book LastUpdatedUtc to actual server time (#426)
1 parent e62251a commit df00dc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ExchangeSharp/API/Exchanges/Binance/ExchangeBinanceAPI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ protected override IWebSocket OnGetOrderBookWebSocket(Action<ExchangeOrderBook>
309309
string json = msg.ToStringFromUTF8();
310310
var update = JsonConvert.DeserializeObject<MultiDepthStream>(json);
311311
string marketSymbol = update.Data.MarketSymbol;
312-
ExchangeOrderBook book = new ExchangeOrderBook { SequenceId = update.Data.FinalUpdate, MarketSymbol = marketSymbol };
312+
ExchangeOrderBook book = new ExchangeOrderBook { SequenceId = update.Data.FinalUpdate, MarketSymbol = marketSymbol, LastUpdatedUtc = CryptoUtility.UnixTimeStampToDateTimeMilliseconds(update.Data.EventTime) };
313313
foreach (List<object> ask in update.Data.Asks)
314314
{
315315
var depth = new ExchangeOrderPrice { Price = ask[0].ConvertInvariant<decimal>(), Amount = ask[1].ConvertInvariant<decimal>() };

0 commit comments

Comments
 (0)