mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-07 16:06:15 +00:00
added orderbook update event
This commit is contained in:
parent
c75636a017
commit
c01bcc87b1
@ -69,8 +69,11 @@ namespace CryptoExchange.Net.OrderBook
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event when the state changes
|
/// Event when the state changes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event Action<OrderBookStatus, OrderBookStatus> OnStatusChange;
|
public event Action<OrderBookStatus, OrderBookStatus> OnStatusChange;
|
||||||
|
/// <summary>
|
||||||
|
/// Event when orderbook was updated
|
||||||
|
/// </summary>
|
||||||
|
public event Action OnOrderBookUpdate;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The number of asks in the book
|
/// The number of asks in the book
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -259,6 +262,7 @@ namespace CryptoExchange.Net.OrderBook
|
|||||||
|
|
||||||
CheckProcessBuffer();
|
CheckProcessBuffer();
|
||||||
bookSet = true;
|
bookSet = true;
|
||||||
|
OnOrderBookUpdate?.Invoke();
|
||||||
log.Write(LogVerbosity.Debug, $"{id} order book {Symbol} data set: {BidCount} bids, {AskCount} asks");
|
log.Write(LogVerbosity.Debug, $"{id} order book {Symbol} data set: {BidCount} bids, {AskCount} asks");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -299,6 +303,7 @@ namespace CryptoExchange.Net.OrderBook
|
|||||||
ProcessUpdate(entry.Type, entry.Entry);
|
ProcessUpdate(entry.Type, entry.Entry);
|
||||||
LastSequenceNumber = lastSequenceNumber;
|
LastSequenceNumber = lastSequenceNumber;
|
||||||
CheckProcessBuffer();
|
CheckProcessBuffer();
|
||||||
|
OnOrderBookUpdate?.Invoke();
|
||||||
log.Write(LogVerbosity.Debug, $"{id} order book {Symbol} update: {entries.Count} entries processed");
|
log.Write(LogVerbosity.Debug, $"{id} order book {Symbol} update: {entries.Count} entries processed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user