com.dxfeed.event.market
Class Order

java.lang.Object
  extended by com.dxfeed.event.market.MarketEvent
      extended by com.dxfeed.event.market.Order
All Implemented Interfaces:
IndexedEvent, java.io.Serializable

public class Order
extends MarketEvent
implements IndexedEvent

Order event for full available market depth for a symbol. 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.

Limitations

This event type cannot be used with DXFeed.getLastEvent method.

The subscription for this event type cannot be mixed with subscription for a regular best Quote in the same DXFeedSubscription object.

Implementation details

This event is implemented on top of QDS record 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.

See Also:
Serialized Form

Field Summary
static int LEVEL_AGGREGATE
           
static int LEVEL_COMPOSITE
           
static int LEVEL_ORDER
           
static int LEVEL_REGIONAL
           
static int SIDE_BUY
           
static int SIDE_SELL
           
 
Constructor Summary
Order()
          Creates order with default values of all properties.
Order(java.lang.String eventSymbol)
          Creates 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.
 java.lang.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.
 long getSize()
          Returns size of this order.
 long getTime()
          Returns time of this order.
 void setExchangeCode(char exchangeCode)
          Sets exchange code of this order.
 void setIndex(long index)
          Sets unique per-symbol index of this order.
 void setLevel(int level)
          Sets detail level of this order.
 void setMarketMaker(java.lang.String marketMaker)
          Set market maker or other aggregate identifier of this order.
 void setPrice(double price)
          Sets price of this order.
 void setSide(int side)
          Sets side of this order.
 void setSize(long size)
          Sets size of this order.
 void setTime(long time)
          Sets time of this order.
 java.lang.String toString()
           
 
Methods inherited from class com.dxfeed.event.market.MarketEvent
getEventSymbol, setEventSymbol
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SIDE_BUY

public static final int SIDE_BUY
See Also:
Constant Field Values

SIDE_SELL

public static final int SIDE_SELL
See Also:
Constant Field Values

LEVEL_COMPOSITE

public static final int LEVEL_COMPOSITE
See Also:
Constant Field Values

LEVEL_REGIONAL

public static final int LEVEL_REGIONAL
See Also:
Constant Field Values

LEVEL_AGGREGATE

public static final int LEVEL_AGGREGATE
See Also:
Constant Field Values

LEVEL_ORDER

public static final int LEVEL_ORDER
See Also:
Constant Field Values
Constructor Detail

Order

public Order()
Creates order with default values of all properties.


Order

public Order(java.lang.String eventSymbol)
Creates order with the specified event symbol.

Method Detail

getIndex

public long getIndex()
Returns unique per-symbol index of this order.

Specified by:
getIndex in interface IndexedEvent

setIndex

public void setIndex(long index)
Sets unique per-symbol index of this order.


getSide

public int getSide()
Returns side of this order.

See Also:
SIDE_BUY, SIDE_SELL

setSide

public void setSide(int side)
Sets side of this order.

See Also:
SIDE_BUY, SIDE_SELL

getLevel

public int getLevel()
Returns detail level of this order.

See Also:
LEVEL_COMPOSITE, LEVEL_REGIONAL, LEVEL_AGGREGATE, LEVEL_ORDER

setLevel

public void setLevel(int level)
Sets detail level of this order.

See Also:
LEVEL_COMPOSITE, LEVEL_REGIONAL, LEVEL_AGGREGATE, LEVEL_ORDER

getTime

public long getTime()
Returns time of this order.


setTime

public void setTime(long time)
Sets time of this order.


getExchangeCode

public char getExchangeCode()
Returns exchange code of this order.


setExchangeCode

public void setExchangeCode(char exchangeCode)
Sets exchange code of this order.


getMarketMaker

public java.lang.String getMarketMaker()
Returns market maker or other aggregate identifier of this order. This value is defined only for LEVEL_AGGREGATE orders.


setMarketMaker

public void setMarketMaker(java.lang.String marketMaker)
Set market maker or other aggregate identifier of this order.


getPrice

public double getPrice()
Returns price of this order.


setPrice

public void setPrice(double price)
Sets price of this order.


getSize

public long getSize()
Returns size of this order.


setSize

public void setSize(long size)
Sets size of this order.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object