Skip to content

Commit

Permalink
tagging release 3.292
Browse files Browse the repository at this point in the history
  • Loading branch information
dxcity committed Jul 23, 2020
1 parent 4077449 commit a2b3fe1
Show file tree
Hide file tree
Showing 87 changed files with 2,338 additions and 453 deletions.
14 changes: 14 additions & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
QDS 3.292:

* [QD-1251] New order source for cboe C2 options
* [QD-1241] dxFeed API: Extend Order event for Full Order Book
- JVM parameter "-Ddxscheme.fob=true" will add Full Order Book fields to Order record
- List of Order sources that support Full Order Book can be customized by
"-Dcom.dxfeed.event.market.impl.Order.fob.suffixes" parameter (default value="|#NTV")
* [QD-1244] QDS: Add support for long and timestamp fields in QD schema
- Added support for long values and time in millis to com.dxfeed.annotation.EventFieldType
(to enable long use @EventFieldMapping(type = EventFieldType.LONG) annotation)
- Changed ordering of constants in com.dxfeed.annotation.EventFieldType
* [QD-1235] QD Core: Disable conflation for Order events
- JVM parameter "-Dcom.devexperts.qd.impl.matrix.History.conflateFilter" manages which records are conflated;
if "-Ddxscheme.fob=true" is specified, then default value is "!:Order*", else it is "*"

QDS 3.291:

Expand Down
2 changes: 1 addition & 1 deletion auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>QD</artifactId>
<groupId>com.devexperts.qd</groupId>
<version>3.291</version>
<version>3.292</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion dxfeed-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>QD</artifactId>
<groupId>com.devexperts.qd</groupId>
<version>3.291</version>
<version>3.292</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
21 changes: 19 additions & 2 deletions dxfeed-api/src/main/java/com/dxfeed/annotation/EventFieldType.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,21 @@ public enum EventFieldType {
*/
TRANSIENT,

/** @deprecated Use {@link #TIME_SECONDS} instead. */
@Deprecated
TIME,

/**
* This type can be used for {@code long} properties that store time in milliseconds since Java Epoch.
* It will be mapped to a QD field that keeps <b>seconds</b> since Java Epoch (milliseconds will be lost).
*/
TIME,
TIME_SECONDS,

/**
* This type can be used for {@code long} properties that store time in milliseconds since Java Epoch.
* It will be mapped to a time millis QD field.
*/
TIME_MILLIS,

/**
* This type can be used for {@code int} properties that store number of days since Java Epoch.
Expand All @@ -42,6 +52,13 @@ public enum EventFieldType {
*/
INT,

/**
* This type can be used for {@code long} properties.
* By default primitive longs are mapped to {@link #DECIMAL} - use this type with {@link EventFieldMapping}
* annotation to map to a long QD field.
*/
LONG,

/**
* This type can be used for all primitive properties.
* It will be mapped to a decimal QD field.
Expand Down Expand Up @@ -70,5 +87,5 @@ public enum EventFieldType {
* This type can be used for all reference properties.
* It will be mapped to a serial object QD field.
*/
MARSHALLED
MARSHALLED,
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,19 @@
* <p>
* This event type cannot be used with {@link DXFeed#getLastEvent DXFeed.getLastEvent} method.
*
* <h3><a name="fobSection">Full Order Book Support</a></h3>
*
* Some feeds provide support for "Full Order Book" (FOB) where additional fields will be available:
* <ul>
* <li>{@link #getAction() action} - event business meaning (see {@link OrderAction} for more details)</li>
* <li>{@link #getActionTime() actionTime} - time of the last action</li>
* <li>{@link #getOrderId() orderId} - ID of this order</li>
* <li>{@link #getAuxOrderId() auxOrderId} - additional ID for this order</li>
* <li>{@link #getTradeId() tradeId} - trade (order execution) ID</li>
* <li>{@link #getTradePrice() tradePrice} - price of the trade</li>
* <li>{@link #getTradeSize() tradeSize} - size of the trade</li>
* </ul>
*
* <h3>Implementation details</h3>
* <p>
* This event is implemented on top of QDS records {@code AnalyticOrder#<source-id>},
Expand Down
13 changes: 13 additions & 0 deletions dxfeed-api/src/main/java/com/dxfeed/event/market/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,19 @@
*
* This event type cannot be used with {@link DXFeed#getLastEvent DXFeed.getLastEvent} method.
*
* <h3><a name="fobSection">Full Order Book Support</a></h3>
*
* Some feeds provide support for "Full Order Book" (FOB) where additional fields will be available:
* <ul>
* <li>{@link #getAction() action} - event business meaning (see {@link OrderAction} for more details)</li>
* <li>{@link #getActionTime() actionTime} - time of the last action</li>
* <li>{@link #getOrderId() orderId} - ID of this order</li>
* <li>{@link #getAuxOrderId() auxOrderId} - additional ID for this order</li>
* <li>{@link #getTradeId() tradeId} - trade (order execution) ID</li>
* <li>{@link #getTradePrice() tradePrice} - price of the trade</li>
* <li>{@link #getTradeSize() tradeSize} - size of the trade</li>
* </ul>
*
* <h3>Implementation details</h3>
*
* This event is implemented on top of QDS record {@code Quote} for composite quotes with {@link Scope#COMPOSITE},
Expand Down
161 changes: 161 additions & 0 deletions dxfeed-api/src/main/java/com/dxfeed/event/market/OrderAction.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
/*
* !++
* QDS - Quick Data Signalling Library
* !-
* Copyright (C) 2002 - 2020 Devexperts LLC
* !-
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at
* http://mozilla.org/MPL/2.0/.
* !__
*/
package com.dxfeed.event.market;

/**
* Action enum for the Full Order Book (FOB) Orders. Action describes business meaning of the {@link Order} event:
* whether order was added or replaced, partially or fully executed, etc.
*/
public enum OrderAction {

/**
* Default enum value for orders that do not support "Full Order Book" and for backward compatibility -
* action must be derived from other {@link Order} fields.
*
* <p>All Full Order Book related fields for this action will be empty.
*/
UNDEFINED(0),

/**
* New Order is added to Order Book.
*
* <p>Full Order Book fields:
* <ul>
* <li>{@link Order#getOrderId() orderId} - always present</li>
* <li>{@link Order#getAuxOrderId() auxOrderId} - ID of the order replaced by this new order - if available.</li>
* <li>Trade fields will be empty</li>
* </ul>
*/
NEW(1),

/**
* Order is modified and price-time-priority is not maintained (i.e. order has re-entered Order Book).
* Order {@link Order#getEventSymbol() symbol} and {@link Order#getOrderSide() side} will remain the same.
*
* <p>Full Order Book fields:
* <ul>
* <li>{@link Order#getOrderId() orderId} - always present</li>
* <li>Trade fields will be empty</li>
* </ul>
*/
REPLACE(2),

/**
* Order is modified without changing its price-time-priority (usually due to partial cancel by user).
* Order's {@link Order#getSize() size} will contain new updated size.
*
* <p>Full Order Book fields:
* <ul>
* <li>{@link Order#getOrderId() orderId} - always present</li>
* <li>Trade fields will be empty</li>
* </ul>
*/
MODIFY(3),

/**
* Order is fully canceled and removed from Order Book.
* Order's {@link Order#getSize() size} will be equal to 0.
*
* <p>Full Order Book fields:
* <ul>
* <li>{@link Order#getOrderId() orderId} - always present</li>
* <li>{@link Order#getAuxOrderId() auxOrderId} - ID of the new order replacing this order - if available.</li>
* <li>Trade fields will be empty</li>
* </ul>
*/
DELETE(4),

/**
* Size is changed (usually reduced) due to partial order execution.
* Order's {@link Order#getSize() size} will be updated to show current outstanding size.
*
* <p>Full Order Book fields:
* <ul>
* <li>{@link Order#getOrderId() orderId} - always present</li>
* <li>{@link Order#getAuxOrderId()} auxOrderId} - aggressor order ID, if available</li>
* <li>{@link Order#getTradeId() tradeId} - if available</li>
* <li>{@link Order#getTradeSize() tradeSize} and {@link Order#getTradePrice() tradePrice} -
* contain size and price of this execution</li>
* </ul>
*/
PARTIAL(5),

/**
* Order is fully executed and removed from Order Book.
* Order's {@link Order#getSize() size} will be equals to 0.
*
* <p>Full Order Book fields:
* <ul>
* <li>{@link Order#getOrderId() orderId} - always present</li>
* <li>{@link Order#getAuxOrderId()} auxOrderId} - aggressor order ID, if available</li>
* <li>{@link Order#getTradeId() tradeId} - if available</li>
* <li>{@link Order#getTradeSize() tradeSize} and {@link Order#getTradePrice() tradePrice} -
* contain size and price of this execution - always present</li>
* </ul>
*/
EXECUTE(6),

/**
* Non-Book Trade - this Trade not refers to any entry in Order Book.
* Order's {@link Order#getSize() size} and {@link Order#getPrice() price} will be equals to 0.
*
* <p>Full Order Book fields:
* <ul>
* <li>{@link Order#getOrderId() orderId} - always empty</li>
* <li>{@link Order#getTradeId()} tradeId} - if available</li>
* <li>{@link Order#getTradeSize() tradeSize} and {@link Order#getTradePrice() tradePrice} -
* contain size and price of this trade - always present</li>
* </ul>
*/
TRADE(7),

/**
* Prior Trade/Order Execution bust.
* Order's {@link Order#getSize() size} and {@link Order#getPrice() price} will be equals to 0.
*
* <p>Full Order Book fields:
* <ul>
* <li>{@link Order#getOrderId() orderId} - always empty</li>
* <li>{@link Order#getTradeId() tradeId} - always present</li>
* <li>{@link Order#getTradeSize() tradeSize} and {@link Order#getTradePrice() tradePrice} - always empty</li>
* </ul>
*/
BUST(8);

private static final OrderAction[] ACTIONS = Util.buildEnumArrayByOrdinal(UNDEFINED, 9);

/**
* Returns side by integer code bit pattern.
* @param code integer code.
* @return side.
* @throws ArrayIndexOutOfBoundsException if code is invalid.
*/
public static OrderAction valueOf(int code) {
return ACTIONS[code];
}

private final int code;

private OrderAction(int code) {
this.code = code;
if (code != ordinal())
throw new IllegalArgumentException("code differs from ordinal");
}

/**
* Returns integer code that is used in flag bits.
* @return integer code.
*/
public int getCode() {
return code;
}
}
Loading

0 comments on commit a2b3fe1

Please sign in to comment.