Skip to main content

Enhanced Order Book Description

Description

The Enhanced Order Book is an extended version of the Order Book. The Enhanced Order Book's Order event has additional fields like Order ID, Action, Trade price, and other data. This allows advanced analytics like tracking separate fields and their status.

Enhanced Order Book fields

If you work with Enhanced Order Book, you receive data for the Order Book fields and also for the following fields:

Field name

Field type

Description

Action

enum

Meaning of the Order event. The Order can be added or replaced, partially or fully executed, etc.

ActionTime

timestamp

Time of the last action

OrderID

long

ID of this order.

You receive Order IDs in the standard exchange's form with no additional remapping. Read more about possible Order IDs assignments of different exchanges

AuxOrderID

long

Additional Order ID for this order. It contains a link to another Order ID - aggressor or replacement. Read more about Aggressor Order Processing

TradeID

long

Trade (Order Execution) ID (Trade-related field)

TradePrice

decimal

Trade price (Trade-related field)

Note

By default, the operation mode for receiving additional data for the Enhanced Order Book is disabled. To enable, use the JVM properties -Ddxscheme.fob=true flag.

Order Action types

The com.dxfeed.event.market.OrderAction field is an enumerated constant that describes the meanings of the Order event actions. These Order Actions are various operations that you can execute with orders in the Extended Order Book. The only exceptions are TRADE and BUST.

Order Action's possible values:

Order Action

Action Type

Description

UNDEFINED

Empty new fields, conflate events, etc.

The default enum value for backward compatibility with the Order Book. This action derives from other Order fields

NEW

Add a new order

New Order is entered into the Order Book

REPLACE

Replace an order

A modified order with maintained price-time priority. For example, the order re-enters the Order Book. Note that the Order event does not change its ID:

  • OrderID, SYMBOL , and SIDE action types are not modified. Since that causes two Order events and this action is considered as CANCEL+REPLACE.

  • If SYMBOL and SIDE action types are not modified, order modification can occur as either REPLACE or DELETE+NEW actions (depending on the exchange).

MODIFY

Modify or partially cancel an order

A modified order has no change in its price-time priority

DELETE

Delete an order

This action type fully cancels and removes an order from the Order Book

PARTIAL

Partial order execution

Size is usually reduced due to partial order execution

EXECUTE

Full order execution

Fully execute and delete an order. The size is 0

TRADE

Non-Book Trade

This Trade doesn't refer to any entry in the Order Book. OrderID is empty

BUST

Trade Bust

Prior TRADE/ORDER execution. BUST doesn't refer to any entry in the Order Book. OrderID is empty

The table below defines Order Action types and their applicable properties:

Action

Price, Side, Time

Size

Action Time

Order ID

Trade ID

Trade Price, Trade Size

Aux Order ID

UNDEFINED

(1)

(1)

-

-

-

-

-

NEW

M

M

M

M

-

-

+ (3)

REPLACE

M (2)

M

M

M

-

-

-

MODIFY

M

M

M

M

-

-

-

DELETE

M

0

M

M

-

-

+ (4)

PARTIAL

M

M

M

M

+

M

+ (5)

EXECUTE

M

0

M

M

+

M

+ (5)

TRADE

-

0

M

-

+

M

-

BUST

-

0

M

-

M

-

-

Check values for the table above:

Value

Description

M

Mandatory field

+

Optional field is specified if available

-

Inapplicable field is empty

(1)

Fields are filled according to previous dxFeed API version requirements

(2)

Symbol and Side remain the same

(3)

Predecessor order replaces Order ID, if available

(4)

Successor order replaces Order ID, if available

(5)

Aggressor Order ID, if available

Notice

Fields such as Symbol, Index are always filled for all new events. Time and Sequence are always filled for all new events except TRADE/BUST.

The Order Action sample section contains a sample sequence of Order Actions.