mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-15 18:33:06 +00:00
Added strict levels to symbol order book
This commit is contained in:
@@ -44,20 +44,30 @@ namespace CryptoExchange.Net.Objects
|
||||
/// </summary>
|
||||
public bool SequenceNumbersAreConsecutive { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not a level should be removed from the book when it's pushed out of scope of the limit. For example with a book of limit 10,
|
||||
/// when a new bid is added which makes the total amount of bids 11, should the last bid entry be removed
|
||||
/// </summary>
|
||||
public bool StrictLevels { get; }
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="name">The name of the order book implementation</param>
|
||||
/// <param name="sequencesAreConsecutive">Whether each update should have a consecutive id number. Used to identify and reconnect when numbers are skipped.</param>
|
||||
public OrderBookOptions(string name, bool sequencesAreConsecutive)
|
||||
/// <param name="strictLevels">Whether or not a level should be removed from the book when it's pushed out of scope of the limit. For example with a book of limit 10,
|
||||
/// when a new bid is added which makes the total amount of bids 11, should the last bid entry be removed</param>
|
||||
/// <param name="levels">Amount of levels for this order book</param>
|
||||
public OrderBookOptions(string name, bool sequencesAreConsecutive, bool strictLevels)
|
||||
{
|
||||
OrderBookName = name;
|
||||
SequenceNumbersAreConsecutive = sequencesAreConsecutive;
|
||||
StrictLevels = strictLevels;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{base.ToString()}, OrderBookName: {OrderBookName}, SequenceNumbersAreConsequtive: {SequenceNumbersAreConsecutive}";
|
||||
return $"{base.ToString()}, OrderBookName: {OrderBookName}, SequenceNumbersAreConsequtive: {SequenceNumbersAreConsecutive}, StrictLevels: {StrictLevels}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user