public class AnalyticOrder extends Order
Order
introducing analytic information, e.g. adding to this order iceberg related
information (icebergPeakSize
, icebergHiddenSize
, icebergExecutedSize
).
The collection of analytic order events of a symbol represents the most recent analytic information
that is available about orders on the market at any given moment of time.
Analytic order is similar to a regular Order
. In addition this event has few additional properties:
icebergPeakSize
- the size of the peak, i.e. the visible part of the iceberg,
that is being continually refilled until the order is fully traded or cancelled;
icebergHiddenSize
- the prediction of current hidden size of the iceberg, as inferred by the model;
icebergExecutedSize
- the executed size of the iceberg order. For IcebergType.SYNTHETIC
type
represents total executed size of all orders сomposing current iceberg;
getIcebergType()
- type of the iceberg, either native (exchange-managed) or synthetic (managed outside of the exchange).
Like regular orders, analytic order events arrive from
multiple sources for the same market symbol and are distinguished by their
index
.
It is unique across all the sources of depth information for the symbol.
The event with sizeAsDouble
either 0
or NaN
is a signal to remove previously received order for the corresponding index.
The method hasSize
is a convenient method to test for size presence.
Analytic
event has the following properties:
eventSymbol
- underlying symbol of this event;
source
- source of this event;
eventFlags
- transactional event flags;
index
- unique per-symbol index of this order;
time
- time of this order;
timeNanoPart
- microseconds and nanoseconds time part of this order;
sequence
- sequence of this order;
price
- price of this order;
size
- size of this order as integer number (rounded toward zero);
sizeAsDouble
- size of this order as floating number with fractions;
executedSize
- executed size of this order;
count
- number of individual orders in this aggregate order;
exchangeCode
- exchange code of this order;
orderSide
- side of this order;
scope
- scope of this order;
marketMaker
- market maker or other aggregate identifier of this order;
icebergPeakSize
- iceberg peak size of this analytic order;
icebergHiddenSize
- iceberg hidden size of this analytic order;
icebergExecutedSize
- iceberg executed size of this analytic order;
icebergType
- iceberg type of this analytic order.
Analytic order event sources provide a consistent view of the analytic order book. Their updates
may incorporate multiple changes to individual orders that have to be processed at the same time.
The corresponding information is carried in eventFlags
property.
See Event Flags section of OrderBase
class documentation for details.
IndexedEventModel
class handles all the snapshot and transaction logic and conveniently represents
a list current of events.
It relies on the code of AbstractIndexedEventModel
to handle this logic.
Use the source code of AbstractIndexedEventModel
for clarification on transactions and snapshot logic.
When publishing an order event with DXPublisher.publishEvents
method, least significant 32 bits of order index
must be in a range of from 0 to
Integer.MAX_VALUE
inclusive.
Use setSource
method after setIndex
to properly
include source identifier into the index.
A snapshot has to be published in the descending order of index
, starting with
an event with the largest index and marking it with IndexedEvent.SNAPSHOT_BEGIN
bit in eventFlags
,
and finishing the snapshot with an event that has zero 32 least significant bits of index.
IndexedEvent.SNAPSHOT_END
bit in eventFlags
is optional during publishing.
It will be properly set on receiving end anyway.
This event type cannot be used with DXFeed.getLastEvent
method.
action
- event business meaning (see OrderAction
for more details)actionTime
- time of the last actionorderId
- ID of this orderauxOrderId
- additional ID for this ordertradeId
- trade (order execution) IDtradePrice
- price of the tradetradeSize
- size of the trade
This event is implemented on top of QDS records AnalyticOrder#<source-id>
,
where <source-id>
is up to 4 ASCII characters with a mnemonic for the source like "GLBX".
LEVEL_AGGREGATE, LEVEL_COMPOSITE, LEVEL_ORDER, LEVEL_REGIONAL, MAX_SEQUENCE, SIDE_BUY, SIDE_SELL
REMOVE_EVENT, SNAPSHOT_BEGIN, SNAPSHOT_END, SNAPSHOT_MODE, SNAPSHOT_SNIP, TX_PENDING
Constructor and Description |
---|
AnalyticOrder()
Creates new analytic order with default values.
|
AnalyticOrder(String eventSymbol)
Creates new analytic order with the specified event symbol.
|
Modifier and Type | Method and Description |
---|---|
double |
getIcebergExecutedSize()
Returns iceberg executed size of this analytic order.
|
double |
getIcebergHiddenSize()
Returns iceberg hidden size of this analytic order.
|
double |
getIcebergPeakSize()
Returns iceberg peak size of this analytic order.
|
IcebergType |
getIcebergType()
Returns iceberg type of this analytic order.
|
void |
setIcebergExecutedSize(double icebergExecutedSize)
Changes iceberg executed size of this analytic order.
|
void |
setIcebergHiddenSize(double icebergHiddenSize)
Changes iceberg hidden size of this analytic order.
|
void |
setIcebergPeakSize(double icebergPeakSize)
Changes iceberg peak size of this analytic order.
|
void |
setIcebergType(IcebergType icebergType)
Changes iceberg type of this analytic order.
|
String |
toString()
Returns string representation of this analytic order.
|
getMarketMaker, setMarketMaker
getAction, getActionTime, getAuxOrderId, getCount, getEventFlags, getExchangeCode, getExecutedSize, getIndex, getLevel, getOrderId, getOrderSide, getPrice, getScope, getSequence, getSide, getSize, getSizeAsDouble, getSource, getTime, getTimeNanoPart, getTimeNanos, getTimeSequence, getTradeId, getTradePrice, getTradeSize, hasSize, setAction, setActionTime, setAuxOrderId, setCount, setEventFlags, setExchangeCode, setExecutedSize, setIndex, setLevel, setOrderId, setOrderSide, setPrice, setScope, setSequence, setSide, setSize, setSizeAsDouble, setSource, setTime, setTimeNanoPart, setTimeNanos, setTimeSequence, setTradeId, setTradePrice, setTradeSize
getEventSymbol, getEventTime, setEventSymbol, setEventTime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEventSymbol, getEventTime, setEventSymbol, setEventTime
public AnalyticOrder()
public AnalyticOrder(String eventSymbol)
eventSymbol
- event symbol.public double getIcebergPeakSize()
public void setIcebergPeakSize(double icebergPeakSize)
icebergPeakSize
- iceberg peak size of this analytic order.public double getIcebergHiddenSize()
public void setIcebergHiddenSize(double icebergHiddenSize)
icebergHiddenSize
- iceberg hidden size of this analytic order.public double getIcebergExecutedSize()
public void setIcebergExecutedSize(double icebergExecutedSize)
icebergExecutedSize
- iceberg executed size of this analytic order.public IcebergType getIcebergType()
public void setIcebergType(IcebergType icebergType)
icebergType
- iceberg type of this analytic order.Copyright © 2002–2023 Devexperts LLC. All rights reserved.