Class OrderBase
Base class for common fields of Order, AnalyticOrder
and SpreadOrder events.
Order events represent a snapshot for a full available market depth for a symbol.
The collection of order events of a symbol represents the most recent information that is
available about orders on the market at any given moment of time.
Order event represents market depth for a specific symbol.
AnalyticOrder event represents market depth for a specific symbol
extended with an analytic information, for example, whether particular order represent an iceberg or not.
SpreadOrder event represents market depth for all spreads on a given underlying symbol.
For more details see Javadoc.
public abstract class OrderBase : MarketEvent, IIndexedEvent, IEventType
- Inheritance
-
OrderBase
- Implements
- Derived
- Inherited Members
Constructors
OrderBase()
Initializes a new instance of the OrderBase class.
protected OrderBase()
OrderBase(string?)
Initializes a new instance of the OrderBase class with specified event symbol.
protected OrderBase(string? eventSymbol)
Parameters
eventSymbol
stringThe event symbol.
Fields
MaxSequence
Maximum allowed sequence value. Sequence
public const int MaxSequence = 4194303
Field Value
Properties
Action
Gets or sets action of this order. Returns order action if available, otherwise - Undefined.
public OrderAction Action { get; set; }
Property Value
ActionTime
Gets or sets time of the last Action.
public long ActionTime { get; set; }
Property Value
AuxOrderId
Gets or sets order ID if available. Returns auxiliary order ID if available:.
public long AuxOrderId { get; set; }
Property Value
Count
Gets or sets number of individual orders in this aggregate order.
public long Count { get; set; }
Property Value
EventFlags
Gets or sets transactional event flags.
public int EventFlags { get; set; }
Property Value
EventSource
Gets or sets order source of this event. The source is stored in the highest bits of the Index of this event.
public OrderSource EventSource { get; set; }
Property Value
ExchangeCode
Gets or sets exchange code of this order.
public char ExchangeCode { get; set; }
Property Value
Exceptions
- ArgumentException
If exchange code is greater than 127.
ExecutedSize
Gets or sets executed size of this order.
public double ExecutedSize { get; set; }
Property Value
HasSize
public bool HasSize { get; }
Property Value
Index
Gets or sets unique per-symbol index of this order. Index is non-negative. Note, that this method also changes EventSource, whose id occupies highest bits of index. Use EventSource after invocation of this method to set the desired value of source.
public long Index { get; set; }
Property Value
Exceptions
- ArgumentException
When index is negative.
OrderId
Gets or sets order ID if available. Some actions Trade, Bust have no order ID since they are not related to any order in Order book.
public long OrderId { get; set; }
Property Value
OrderSide
Gets or sets side of this order.
public Side OrderSide { get; set; }
Property Value
Price
Gets or sets price of this order event.
public double Price { get; set; }
Property Value
Scope
Gets or sets scope of this order.
public Scope Scope { get; set; }
Property Value
Sequence
Gets or sets sequence number sequence number of this order to distinguish orders that have the same Time. This sequence number does not have to be unique and does not need to be sequential. Sequence can range from 0 to MaxSequence.
public int Sequence { get; set; }
Property Value
Exceptions
- ArgumentException
If sequence out of range.
Size
Gets or sets size of this order event as floating number with fractions.
public double Size { get; set; }
Property Value
Time
Gets or sets time of this order. Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
public long Time { get; set; }
Property Value
TimeNanoPart
Gets or sets microseconds and nanoseconds time part of this order.
public int TimeNanoPart { get; set; }
Property Value
TimeNanos
Gets or sets timestamp of the original event in nanoseconds. Time is measured in nanoseconds between the current time and midnight, January 1, 1970 UTC.
public long TimeNanos { get; set; }
Property Value
TimeSequence
Gets or sets time and sequence of this order packaged into single long value This method is intended for efficient order time priority comparison. Do not set their property directly. Change Time and/or Sequence.
public long TimeSequence { get; set; }
Property Value
TradeId
Gets or sets trade (order execution) ID for events containing trade-related action.
Returns 0
if trade ID not available.
public long TradeId { get; set; }
Property Value
TradePrice
Gets or sets trade price for events containing trade-related action.
public double TradePrice { get; set; }
Property Value
TradeSize
Gets or sets trade size for events containing trade-related action.
public double TradeSize { get; set; }
Property Value
Methods
BaseFieldsToString()
Returns string representation of this order fields.
protected string BaseFieldsToString()
Returns
- string
The string representation.
ToString()
Returns string representation of this base order event's.
public override string ToString()
Returns
- string
The string representation.