public final class Order extends MarketEvent implements IndexedEvent<String>
getLevel
method.
Order events arrive from
multiple sources for the same market symbol are are distinguished by their
index
. Index is a unique per symbol identifier of the event.
The event with getSize
() == 0 is a signal to remove
previously received order for the corresponding index.
Events from finer-grained level of detail give more information and include events from coarse-grained level of detail. For a consistent representation of the market depth to the end-user, order events must be filtered to remove coarse-grained events that are superseded by the finer-grained events.
DXFeed.getLastEvent
method.
The subscription for this event type cannot be mixed with subscription for a regular best
Quote
in the same DXFeedSubscription
object.
Quote
for composite quotes
with LEVEL_COMPOSITE
, record Quote&X
for regional exchange best quotes
with LEVEL_REGIONAL
, and record MarketMaker
for market-maker quotes and futures price level aggregates
with LEVEL_AGGREGATE
. The most fine-grained LEVEL_ORDER
is not
currently implemented.Modifier and Type | Field and Description |
---|---|
static int |
LEVEL_AGGREGATE
Represents aggregate information for each price level or
best bid and offer for each market maker.
|
static int |
LEVEL_COMPOSITE
Represents best bid and offer.
|
static int |
LEVEL_ORDER
Represents individual order at the market.
|
static int |
LEVEL_REGIONAL
Represents best bid and offer for a given exchange code.
|
static int |
SIDE_BUY
Order to buy (bid).
|
static int |
SIDE_SELL
Order to sell (ask or offer).
|
Constructor and Description |
---|
Order()
Creates new order with default values.
|
Order(String eventSymbol)
Creates new order with the specified event symbol.
|
Modifier and Type | Method and Description |
---|---|
char |
getExchangeCode()
Returns exchange code of this order.
|
long |
getIndex()
Returns unique per-symbol index of this order.
|
int |
getLevel()
Returns detail level of this order.
|
String |
getMarketMaker()
Returns market maker or other aggregate identifier of this order.
|
double |
getPrice()
Returns price of this order.
|
int |
getSide()
Returns side of this order on the market.
|
long |
getSize()
Returns size of this order.
|
long |
getTime()
Returns time of this order.
|
void |
setExchangeCode(char exchangeCode)
Changes exchange code of this order.
|
void |
setIndex(long index)
Changes unique per-symbol index of this order.
|
void |
setLevel(int level)
Changes detail level of this order.
|
void |
setMarketMaker(String marketMaker)
Changes market maker or other aggregate identifier of this order.
|
void |
setPrice(double price)
Changes price of this order.
|
void |
setSide(int side)
Changes side of this order on the market.
|
void |
setSize(long size)
Changes size of this order.
|
void |
setTime(long time)
Changes time of this order.
|
String |
toString()
Returns string representation of this order event.
|
getEventSymbol, setEventSymbol
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEventSymbol, setEventSymbol
public static final int SIDE_BUY
getSide()
,
Constant Field Valuespublic static final int SIDE_SELL
getSide()
,
Constant Field Valuespublic static final int LEVEL_COMPOSITE
exchangeCode == '\0'
and
marketMaker == null
.public static final int LEVEL_REGIONAL
exchangeCode != '\0'
and
marketMaker == null
.public static final int LEVEL_AGGREGATE
exchangeCode != '\0'
and
marketMaker != null
.public static final int LEVEL_ORDER
exchangeCode != '\0'
and
may optionally have marketMaker
specified.public Order()
public Order(String eventSymbol)
eventSymbol
- event symbol.public long getIndex()
getIndex
in interface IndexedEvent<String>
public void setIndex(long index)
setIndex
in interface IndexedEvent<String>
index
- unique per-symbol index of this order.public int getSide()
SIDE_BUY
corresponds to buy order (bid),
SIDE_SELL
corresponds to sell order (ask or offer).public void setSide(int side)
public int getLevel()
LEVEL_COMPOSITE
,
LEVEL_REGIONAL
,
LEVEL_AGGREGATE
,
LEVEL_ORDER
public void setLevel(int level)
level
- detail level of this order.LEVEL_COMPOSITE
,
LEVEL_REGIONAL
,
LEVEL_AGGREGATE
,
LEVEL_ORDER
public long getTime()
public void setTime(long time)
time
- time of this order.public char getExchangeCode()
public void setExchangeCode(char exchangeCode)
exchangeCode
- exchange code of this order.public String getMarketMaker()
LEVEL_AGGREGATE
orders.public void setMarketMaker(String marketMaker)
marketMaker
- market maker or other aggregate identifier of this order.public double getPrice()
public void setPrice(double price)
price
- price of this order.public long getSize()
public void setSize(long size)
size
- size of this order.Copyright © 2014 Devexperts. All Rights Reserved.