Table of Contents

Struct OrderBook

Namespace
WhalesSecret.TradeScriptLib.Entities.MarketData
Assembly
WhalesSecret.TradeScriptLib.dll

Immutable L2 order book snapshot for particular SymbolPair on an exchange.

public readonly struct OrderBook : IEquatable<OrderBook>
Implements
Inherited Members
Extension Methods

Remarks

In rare situations, the bid price might be higher than the ask price. In such situation, the order book information is provided as is without any attempt to fix the bug.

Constructors

OrderBook(ExchangeSymbolPair, long, DateTime, IReadOnlyList<OrderBookEntry>, IReadOnlyList<OrderBookEntry>)

Creates a new instance of the object.

Properties

Asks

List of asks.

Bids

List of bids.

ExchangeMarket

Exchange market where the symbol pair is traded.

ExchangeSymbolPair

Exchange market where SymbolPair is traded and the order book snapshot comes from.

LastUpdate

UTC time when the latest piece of information for this instance was received.

LastUpdateId

ID of the last applied order book update to this order book snapshot.

Spread

Bid-ask spread: Difference between the ask price and the bid price, or null if either the bid side or the ask side of the order book is empty.

SymbolPair

Order book's symbol pair.

Methods

Equals(object?)

Indicates whether this instance and a specified object are equal.

Equals(OrderBook)

Indicates whether the current object is equal to another object of the same type.

GetEstimatedRawUpperBoundarySize()

Returns a quick estimation on the upper boundary of the raw size of the update in JSON serialized form.

GetHashCode()

Returns the hash code for this instance.

ToFullString()

Creates a fully detailed string representation of the order book update.

This is a helper method for debugging purposes only.

ToString()

Returns the fully qualified type name of this instance.

Operators

operator ==(OrderBook, OrderBook)

Determines whether two specified order books have the same value.

operator !=(OrderBook, OrderBook)

Determines whether two specified order books have different values.

See Also