|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dxfeed.event.market.MarketEvent
com.dxfeed.event.market.Order
public final class Order
Order event is a snapshot for a full available market depth for a symbol.
The collection of order events of a symbol represent the most recent information that is
available about orders on the market at any given moment of time.
Order objects give multiple level
of details about the actual buy and sell orders that are working in the market.
Level of detail of the given order is retrieved with 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.
Field Summary | |
---|---|
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 Summary | |
---|---|
Order()
Creates new order with default values. |
|
Order(String eventSymbol)
Creates new order with the specified event symbol. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.dxfeed.event.market.MarketEvent |
---|
getEventSymbol, setEventSymbol |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
.
getLevel()
,
getExchangeCode()
,
getMarketMaker()
,
Constant Field Valuespublic static final int LEVEL_REGIONAL
exchangeCode != '\0'
and
marketMaker == null
.
getLevel()
,
getExchangeCode()
,
getMarketMaker()
,
Constant Field Valuespublic static final int LEVEL_AGGREGATE
exchangeCode != '\0'
and
marketMaker != null
.
getLevel()
,
getExchangeCode()
,
getMarketMaker()
,
Constant Field Valuespublic static final int LEVEL_ORDER
exchangeCode != '\0'
and
may optionally have marketMaker
specified.
getLevel()
,
getExchangeCode()
,
getMarketMaker()
,
Constant Field ValuesConstructor Detail |
---|
public Order()
public Order(String eventSymbol)
eventSymbol
- event symbol.Method Detail |
---|
public long getIndex()
getIndex
in interface IndexedEvent
public void setIndex(long index)
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)
SIDE_BUY
corresponds to buy order (bid),
SIDE_SELL
corresponds to sell order (ask or offer).
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.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |