Skip to content

Commit 9b2e689

Browse files
author
dxcity
committed
tagging release 3.260
1 parent 1d8f299 commit 9b2e689

File tree

78 files changed

+571
-561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+571
-561
lines changed

ReleaseNotes.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2+
QDS 3.260:
3+
4+
* [QD-1065] Remove dependency on timetest library
5+
* [QD-1066] BUG FIX: default negation of custom RecordOnly filters shall produce FastRecordFilter
6+
* [QD-1067] dxFeed API: Use fractional sizes internally for aggregations and checks
7+
8+
QDS 3.259:
9+
110
* [QD-1063] BUG FIX: TapeConnector stops working prematurely
211
- DXEndpoint.Role.STREAM_PUBLISHER role is created to support tape writing at maximum speed
312
- ConvertTapeFile sample is provided to demonstrate proper use of dxFeed API for tape conversion

auth/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<parent>
1515
<artifactId>QD</artifactId>
1616
<groupId>com.devexperts.qd</groupId>
17-
<version>3.259</version>
17+
<version>3.260</version>
1818
<relativePath>../pom.xml</relativePath>
1919
</parent>
2020
<modelVersion>4.0.0</modelVersion>

dxfeed-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<parent>
1515
<artifactId>QD</artifactId>
1616
<groupId>com.devexperts.qd</groupId>
17-
<version>3.259</version>
17+
<version>3.260</version>
1818
<relativePath>../pom.xml</relativePath>
1919
</parent>
2020
<modelVersion>4.0.0</modelVersion>

dxfeed-api/src/main/java/com/dxfeed/event/market/Order.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import java.util.Collection;
1515
import javax.xml.bind.annotation.XmlRootElement;
1616

17+
import com.dxfeed.api.DXFeed;
1718
import com.dxfeed.api.DXPublisher;
1819
import com.dxfeed.model.AbstractIndexedEventModel;
1920
import com.dxfeed.model.market.OrderBookModel;
@@ -29,8 +30,9 @@
2930
* multiple sources for the same market symbol and are distinguished by their
3031
* {@link #getIndex index}. Index is a unique per symbol identifier of the event.
3132
* It is unique across all the sources of depth information for the symbol.
32-
* The event with {@link #getSize() size} of {@code 0} is a signal to remove
33-
* previously received order for the corresponding index.
33+
* The event with {@link #getSizeAsDouble() sizeAsDouble} either {@code 0} or {@link Double#NaN NaN}
34+
* is a signal to remove previously received order for the corresponding index.
35+
* The method {@link #hasSize() hasSize} is a convenient method to test for size presence.
3436
*
3537
* <p> Events from finer-grained {@link Scope} of detail give more information and include events
3638
* from coarse-grained {@link Scope} of detail. For a consistent representation of the market depth
@@ -50,7 +52,7 @@
5052
* <li>{@link #getTimeNanoPart() timeNanoPart} - microseconds and nanoseconds time part of this order;
5153
* <li>{@link #getSequence() sequence} - sequence of this order;
5254
* <li>{@link #getPrice() price} - price of this order;
53-
* <li>{@link #getSize() size} - size of this order;
55+
* <li>{@link #getSize() size} - size of this order as integer number (rounded toward zero);
5456
* <li>{@link #getSizeAsDouble() sizeAsDouble} - size of this order as floating number with fractions;
5557
* <li>{@link #getCount() count} - number of individual orders in this aggregate order;
5658
* <li>{@link #getExchangeCode() exchangeCode} - exchange code of this order;
@@ -94,7 +96,7 @@
9496
*
9597
* <h3>Limitations</h3>
9698
*
97-
* This event type cannot be used with {@link com.dxfeed.api.DXFeed#getLastEvent DXFeed.getLastEvent} method.
99+
* This event type cannot be used with {@link DXFeed#getLastEvent DXFeed.getLastEvent} method.
98100
*
99101
* <h3>Implementation details</h3>
100102
*

dxfeed-api/src/main/java/com/dxfeed/event/market/OrderBase.java

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
* multiple sources for the same market symbol and are distinguished by their
4242
* {@link #getIndex index}. Index is a unique per symbol identifier of the event.
4343
* It is unique across all the sources of depth information for the symbol.
44-
* The event with {@link #getSize() size} of {@code 0} is a signal to remove
45-
* previously received order for the corresponding index.
44+
* The event with {@link #getSizeAsDouble() sizeAsDouble} either {@code 0} or {@link Double#NaN NaN}
45+
* is a signal to remove previously received order for the corresponding index.
46+
* The method {@link #hasSize() hasSize} is a convenient method to test for size presence.
4647
*
4748
* <h3><a name="eventFlagsSection">Event flags, transactions and snapshots</a></h3>
4849
*
@@ -57,12 +58,12 @@
5758
* {@link #getIndex() index} contain source-specific event index which is always zero in
5859
* an event that is marked with {@link #SNAPSHOT_END} bit in {@link #getEventFlags() eventFlags}.
5960
*
60-
* <p> Note, that it is always the case that {@link #getSize() size} is {@code 0}
61-
* for an order with {@link #REMOVE_EVENT} bit in {@link #getEventFlags() eventFlags},
61+
* <p> Note that for an order with {@link #REMOVE_EVENT} bit in {@link #getEventFlags() eventFlags}
62+
* it is always the case that {@link #getSizeAsDouble() sizeAsDouble} is either {@code 0} or {@link Double#NaN NaN},
6263
* so no additional logic to process this bit is required for orders.
63-
* Transactions and snapshots may include orders with {@link #getSize() size} of {@code 0}. The filtering that
64-
* distinguishes those events as removals of orders shall be performed after all the transactions and snapshot
65-
* processing.
64+
* Transactions and snapshots may include orders with {@link #getSizeAsDouble() sizeAsDouble} of {@code 0}.
65+
* The filtering that distinguishes those events as removals of orders shall be performed after
66+
* all transactions and snapshot processing.
6667
*
6768
* <p> Some aggregated feeds (like CME market depth) are mapped into two distinct source ids (one for
6869
* buy orders and one for sell orders), but updates and transactions may span both. It is important to keep a
@@ -390,17 +391,17 @@ public void setPrice(double price) {
390391
}
391392

392393
/**
393-
* Returns size of this order.
394-
* @return size of this order.
394+
* Returns size of this order as integer number (rounded toward zero).
395+
* @return size of this order as integer number (rounded toward zero).
395396
*/
396397
@XmlTransient
397398
public long getSize() {
398399
return (long)size;
399400
}
400401

401402
/**
402-
* Changes size of this order.
403-
* @param size size of this order.
403+
* Changes size of this order as integer number (rounded toward zero).
404+
* @param size size of this order as integer number (rounded toward zero).
404405
*/
405406
public void setSize(long size) {
406407
this.size = size;
@@ -423,6 +424,14 @@ public void setSizeAsDouble(double size) {
423424
this.size = size;
424425
}
425426

427+
/**
428+
* Returns {@code true} if this order has some size (sizeAsDouble is neither {@code 0} nor {@link Double#NaN NaN}).
429+
* @return {@code true} if this order has some size (sizeAsDouble is neither {@code 0} nor {@link Double#NaN NaN}).
430+
*/
431+
public boolean hasSize() {
432+
return size != 0 && !Double.isNaN(size);
433+
}
434+
426435
/**
427436
* Returns number of individual orders in this aggregate order.
428437
* @return number of individual orders in this aggregate order.

dxfeed-api/src/main/java/com/dxfeed/event/market/Quote.java

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
import com.dxfeed.impl.XmlTimeAdapter;
2222

2323
/**
24-
* Quote event is a snapshot of the best bid and ask prices,
25-
* and other fields that change with each quote.
26-
* It represents the most recent information that is available about the best quote on
27-
* the market at any given moment of time.
24+
* Quote event is a snapshot of the best bid and ask prices, and other fields that change with each quote.
25+
* It represents the most recent information that is available about the best quote on the market
26+
* at any given moment of time.
2827
*
2928
* <h3>Properties</h3>
3029
*
@@ -37,16 +36,16 @@
3736
* <li>{@link #getBidTime() bidTime} - time of the last bid change;
3837
* <li>{@link #getBidExchangeCode() bidExchangeCode} - bid exchange code;
3938
* <li>{@link #getBidPrice() bidPrice} - bid price;
40-
* <li>{@link #getBidSize() bidSize} - bid size;
39+
* <li>{@link #getBidSize() bidSize} - bid size as integer number (rounded toward zero);
4140
* <li>{@link #getBidSizeAsDouble() bidSizeAsDouble} - bid size as floating number with fractions;
4241
* <li>{@link #getAskTime() askTime} - time of the last ask change;
4342
* <li>{@link #getAskExchangeCode() askExchangeCode} - ask exchange code;
4443
* <li>{@link #getAskPrice() askPrice} - ask price;
45-
* <li>{@link #getAskSize() askSize} - ask size;
44+
* <li>{@link #getAskSize() askSize} - ask size as integer number (rounded toward zero);
4645
* <li>{@link #getAskSizeAsDouble() askSizeAsDouble} - ask size as floating number with fractions.
4746
* </ul>
4847
*
49-
* Bid corresponds to the best (maximal price) order to buy, while
48+
* Bid corresponds to the best (maximal price) order to buy,
5049
* ask corresponds to the best (minimal price) order to sell.
5150
*
5251
* <h3>Implementation details</h3>
@@ -218,17 +217,17 @@ public void setBidPrice(double bidPrice) {
218217
}
219218

220219
/**
221-
* Returns bid size.
222-
* @return bid size.
220+
* Returns bid size as integer number (rounded toward zero).
221+
* @return bid size as integer number (rounded toward zero).
223222
*/
224223
@XmlTransient
225224
public long getBidSize() {
226225
return (long)bidSize;
227226
}
228227

229228
/**
230-
* Changes bid size.
231-
* @param bidSize bid size.
229+
* Changes bid size as integer number (rounded toward zero).
230+
* @param bidSize bid size as integer number (rounded toward zero).
232231
*/
233232
public void setBidSize(long bidSize) {
234233
this.bidSize = bidSize;
@@ -312,17 +311,17 @@ public void setAskPrice(double askPrice) {
312311
}
313312

314313
/**
315-
* Returns ask size.
316-
* @return ask size.
314+
* Returns ask size as integer number (rounded toward zero).
315+
* @return ask size as integer number (rounded toward zero).
317316
*/
318317
@XmlTransient
319318
public long getAskSize() {
320319
return (long)askSize;
321320
}
322321

323322
/**
324-
* Changes ask size.
325-
* @param askSize ask size.
323+
* Changes ask size as integer number (rounded toward zero).
324+
* @param askSize ask size as integer number (rounded toward zero).
326325
*/
327326
public void setAskSize(long askSize) {
328327
this.askSize = askSize;

dxfeed-api/src/main/java/com/dxfeed/event/market/SpreadOrder.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import java.util.Collection;
1515
import javax.xml.bind.annotation.XmlRootElement;
1616

17+
import com.dxfeed.api.DXFeed;
1718
import com.dxfeed.api.DXPublisher;
1819
import com.dxfeed.model.AbstractIndexedEventModel;
1920
import com.dxfeed.model.IndexedEventModel;
@@ -34,8 +35,9 @@
3435
* multiple sources for the same market symbol and are distinguished by their
3536
* {@link #getIndex index}.
3637
* It is unique across all the sources of depth information for the symbol.
37-
* The event with {@link #getSize() size} of {@code 0} is a signal to remove
38-
* previously received order for the corresponding index.
38+
* The event with {@link #getSizeAsDouble() sizeAsDouble} either {@code 0} or {@link Double#NaN NaN}
39+
* is a signal to remove previously received order for the corresponding index.
40+
* The method {@link #hasSize() hasSize} is a convenient method to test for size presence.
3941
*
4042
* <h3>Properties</h3>
4143
*
@@ -50,7 +52,7 @@
5052
* <li>{@link #getTimeNanoPart() timeNanoPart} - microseconds and nanoseconds time part of this order;
5153
* <li>{@link #getSequence() sequence} - sequence of this order;
5254
* <li>{@link #getPrice() price} - price of this order;
53-
* <li>{@link #getSize() size} - size of this order;
55+
* <li>{@link #getSize() size} - size of this order as integer number (rounded toward zero);
5456
* <li>{@link #getSizeAsDouble() sizeAsDouble} - size of this order as floating number with fractions;
5557
* <li>{@link #getCount() count} - number of individual orders in this aggregate order;
5658
* <li>{@link #getExchangeCode() exchangeCode} - exchange code of this order;
@@ -89,7 +91,7 @@
8991
*
9092
* <h3>Limitations</h3>
9193
*
92-
* This event type cannot be used with {@link com.dxfeed.api.DXFeed#getLastEvent DXFeed.getLastEvent} method.
94+
* This event type cannot be used with {@link DXFeed#getLastEvent DXFeed.getLastEvent} method.
9395
*
9496
* <h3>Implementation details</h3>
9597
*

dxfeed-api/src/main/java/com/dxfeed/event/market/TimeAndSale.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
* {@link #getTime() time};
4545
* <li>{@link #getExchangeCode() exchangeCode} - exchange code of this time and sale event;
4646
* <li>{@link #getPrice() price} - price of this time and sale event;
47-
* <li>{@link #getSize() size} - size of this time and sale event;
47+
* <li>{@link #getSize() size} - size of this time and sale event as integer number (rounded toward zero);
4848
* <li>{@link #getSizeAsDouble() sizeAsDouble} - size of this time and sale event as floating number with fractions;
4949
* <li>{@link #getBidPrice() bidPrice} - the current bid price on the market when this time and sale event had occurred;
5050
* <li>{@link #getAskPrice() askPrice} - the current ask price on the market when this time and sale event had occurred;
@@ -328,17 +328,17 @@ public void setPrice(double price) {
328328
}
329329

330330
/**
331-
* Returns size of this time and sale event.
332-
* @return size of this time and sale event.
331+
* Returns size of this time and sale event as integer number (rounded toward zero).
332+
* @return size of this time and sale event as integer number (rounded toward zero).
333333
*/
334334
@XmlTransient
335335
public long getSize() {
336336
return (long)size;
337337
}
338338

339339
/**
340-
* Changes size of this time and sale event.
341-
* @param size size of this time and sale event.
340+
* Changes size of this time and sale event as integer number (rounded toward zero).
341+
* @param size size of this time and sale event as integer number (rounded toward zero).
342342
*/
343343
public void setSize(long size) {
344344
this.size = size;

dxfeed-api/src/main/java/com/dxfeed/event/market/Trade.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
/**
1717
* Trade event is a snapshot of the price and size of the last trade during regular trading hours
1818
* and an overall day volume and day turnover.
19-
* It represents the most recent information that is available about the regular last trade price on
20-
* the market at any given moment of time.
19+
* It represents the most recent information that is available about the regular last trade on the market
20+
* at any given moment of time.
2121
*
2222
* <h3>Properties</h3>
2323
*
@@ -30,9 +30,9 @@
3030
* <li>{@link #getSequence() sequence} - sequence of the last trade;
3131
* <li>{@link #getExchangeCode() exchangeCode} - exchange code of the last trade;
3232
* <li>{@link #getPrice() price} - price of the last trade;
33-
* <li>{@link #getSize() size} - size of the last trade;
33+
* <li>{@link #getSize() size} - size of the last trade as integer number (rounded toward zero);
3434
* <li>{@link #getSizeAsDouble() sizeAsDouble} - size of the last trade as floating number with fractions;
35-
* <li>{@link #getDayVolume() dayVolume} - total volume traded for a day;
35+
* <li>{@link #getDayVolume() dayVolume} - total volume traded for a day as integer number (rounded toward zero);
3636
* <li>{@link #getDayVolumeAsDouble() dayVolumeAsDouble} - total volume traded for a day as floating number with fractions;
3737
* <li>{@link #getDayTurnover() dayTurnover} - total turnover traded for a day;
3838
* <li>{@link #getTickDirection() tickDirection} - tick direction of the last trade;
@@ -43,15 +43,15 @@
4343
*
4444
* The {@code Trade} event defines last trade {@link #getPrice() price} as officially defined
4545
* by the corresponding exchange for its <b>regular trading hours</b> (RTH).
46-
* It also include an official exchange {@link #getDayVolume() dayVolume} and {@link #getDayTurnover() dayTurnover}
46+
* It also include an official exchange {@link #getDayVolumeAsDouble() dayVolumeAsDouble} and {@link #getDayTurnover() dayTurnover}
4747
* <b>for the whole trading day</b>. So, {@code Trade} event captures all the official numbers
4848
* that are typically reported by exchange.
4949
*
5050
* <p>Trades that happen in <b>extended trading hours</b> (ETH, pre-market and post-market trading sessions),
5151
* which are typically defined for stocks and ETFs, do not update last trade {@link #getTime() time},
52-
* {@link #getExchangeCode() exchangeCode}, {@link #getPrice() price}, {@link #getSize() size},
52+
* {@link #getExchangeCode() exchangeCode}, {@link #getPrice() price}, {@link #getSizeAsDouble() sizeAsDouble},
5353
* and {@link #getTickDirection() tickDirection} in the {@code Trade} event, but they do update
54-
* {@link #getDayVolume() dayVolume} and {@link #getDayTurnover() dayTurnover}.
54+
* {@link #getDayVolumeAsDouble() dayVolumeAsDouble} and {@link #getDayTurnover() dayTurnover}.
5555
*
5656
* <p>During extended trading hours a {@link TradeETH} event is generated on each trade with its
5757
* {@link TradeETH#isExtendedTradingHours() extendedTradingHours} property set to {@code true}.</p>
@@ -65,12 +65,12 @@
6565
* or lows are reached or other properties change.
6666
*
6767
* <p>Note that one can compute volume-weighted average price (VWAP) for a day by this formula:
68-
* <br><code>vwap = {@link #getDayTurnover() dayTurnover} / {@link #getDayVolume() dayVolume};</code>
68+
* <br><code>vwap = {@link #getDayTurnover() dayTurnover} / {@link #getDayVolumeAsDouble() dayVolumeAsDouble};</code>
6969
*
7070
* <h3>Daily reset</h3>
7171
*
7272
* Daily reset procedure that happens on a schedule during non-trading hours resets {@code Trade}
73-
* {@link #getDayVolume() dayVolume} to zero and {@link #getDayTurnover() dayTurnover} to {@link Double#NaN NaN}
73+
* {@link #getDayVolumeAsDouble() dayVolumeAsDouble} and {@link #getDayTurnover() dayTurnover} to {@link Double#NaN NaN}
7474
* in preparation to the next day's pre-market trading session
7575
* (or for regular trading if there is no pre-market) while leaving all other properties intact.
7676
* They reflect information about the last known RTH trade until the next RTH trade happens.

dxfeed-api/src/main/java/com/dxfeed/event/market/TradeBase.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
/**
2424
* Base class for common fields of {@link Trade} and {@link TradeETH} events.
25-
* Trade events represent the most recent information that is available about the last trade on
26-
* the market at any given moment of time.
25+
* Trade events represent the most recent information that is available about the last trade on the market
26+
* at any given moment of time.
2727
*
2828
* <p>{@link Trade} event represents last trade information for <b>regular trading hours</b>
2929
* (RTH) with an official volume <b>for the whole trading day</b>.
@@ -215,17 +215,17 @@ public void setPrice(double price) {
215215
}
216216

217217
/**
218-
* Returns size of the last trade.
219-
* @return size of the last trade.
218+
* Returns size of the last trade as integer number (rounded toward zero).
219+
* @return size of the last trade as integer number (rounded toward zero).
220220
*/
221221
@XmlTransient
222222
public long getSize() {
223223
return (long)size;
224224
}
225225

226226
/**
227-
* Changes size of the last trade.
228-
* @param size size of the last trade.
227+
* Changes size of the last trade as integer number (rounded toward zero).
228+
* @param size size of the last trade as integer number (rounded toward zero).
229229
*/
230230
public void setSize(long size) {
231231
this.size = size;
@@ -249,17 +249,17 @@ public void setSizeAsDouble(double size) {
249249
}
250250

251251
/**
252-
* Returns total volume traded for a day.
253-
* @return total volume traded for a day.
252+
* Returns total volume traded for a day as integer number (rounded toward zero).
253+
* @return total volume traded for a day as integer number (rounded toward zero).
254254
*/
255255
@XmlTransient
256256
public long getDayVolume() {
257257
return (long)dayVolume;
258258
}
259259

260260
/**
261-
* Changes total volume traded for a day.
262-
* @param dayVolume total volume traded for a day.
261+
* Changes total volume traded for a day as integer number (rounded toward zero).
262+
* @param dayVolume total volume traded for a day as integer number (rounded toward zero).
263263
*/
264264
public void setDayVolume(long dayVolume) {
265265
this.dayVolume = dayVolume;

0 commit comments

Comments
 (0)