diff --git a/README.md b/README.md
index dd2fb10..cb01019 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# Intrinio Java SDK for Real-Time Stock Prices
-SDK for working with Intrinio's realtime IEX, NASDAQ Basic, delayed SIP prices, and realtime/delayed [OPRA](https://www.opraplan.com/) options feeds.
+SDK for working with Intrinio's realtime IEX, NASDAQ Basic, CBOE One, delayed SIP prices, and realtime/delayed [OPRA](https://www.opraplan.com/) options feeds.
[Intrinio](https://intrinio.com/) provides real-time and delayed stock prices via a two-way WebSocket connection. To get started, [subscribe to a real-time data feed](https://docs.intrinio.com/tutorial/websocket) and follow the instructions below.
@@ -86,6 +86,7 @@ public record Trade(String symbol, SubProvider subProvider, char marketCenter, d
* **`OTC`** - OTC in the DELAYED_SIP provider.
* **`NASDAQ_BASIC`** - NASDAQ Basic in the NASDAQ_BASIC provider.
* **`IEX`** - From the IEX exchange in the REALTIME provider.
+ * **`CBOE_ONE`** - From the CBOE One exchanges provider.
* **marketCenter** - Provides the market center
* **price** - the price in USD
* **size** - the size of the last trade.
@@ -111,6 +112,7 @@ public record Quote(QuoteType type, String symbol, SubProvider subProvider, char
* **`OTC`** - OTC in the DELAYED_SIP provider.
* **`NASDAQ_BASIC`** - NASDAQ Basic in the NASDAQ_BASIC provider.
* **`IEX`** - From the IEX exchange in the REALTIME provider.
+ * **`CBOE_ONE`** - From the CBOE One exchanges provider.
* **marketCenter** - Provides the market center
* **symbol** - Ticker symbol.
* **price** - the price in USD
@@ -118,6 +120,102 @@ public record Quote(QuoteType type, String symbol, SubProvider subProvider, char
* **timestamp** - a Unix timestamp in nanoseconds since unix epoch.
* **conditions** - Provides the conditions
+### Equities Trade Conditions
+
+| Value | Description |
+|-------|---------------------------------------------------|
+| @ | Regular Sale |
+| A | Acquisition |
+| B | Bunched Trade |
+| C | Cash Sale |
+| D | Distribution |
+| E | Placeholder |
+| F | Intermarket Sweep |
+| G | Bunched Sold Trade |
+| H | Priced Variation Trade |
+| I | Odd Lot Trade |
+| K | Rule 155 Trade (AMEX) |
+| L | Sold Last |
+| M | Market Center Official Close |
+| N | Next Day |
+| O | Opening Prints |
+| P | Prior Reference Price |
+| Q | Market Center Official Open |
+| R | Seller |
+| S | Split Trade |
+| T | Form T |
+| U | Extended Trading Hours (Sold Out of Sequence) |
+| V | Contingent Trade |
+| W | Average Price Trade |
+| X | Cross/Periodic Auction Trade |
+| Y | Yellow Flag Regular Trade |
+| Z | Sold (Out of Sequence) |
+| 1 | Stopped Stock (Regular Trade) |
+| 4 | Derivatively Priced |
+| 5 | Re-Opening Prints |
+| 6 | Closing Prints |
+| 7 | Qualified Contingent Trade (QCT) |
+| 8 | Placeholder for 611 Exempt |
+| 9 | Corrected Consolidated Close (Per Listing Market) |
+
+
+### Equities Trade Conditions (CBOE One)
+Trade conditions for CBOE One are represented as the integer representation of a bit flag.
+
+None = 0,
+UpdateHighLowConsolidated = 1,
+UpdateLastConsolidated = 2,
+UpdateHighLowMarketCenter = 4,
+UpdateLastMarketCenter = 8,
+UpdateVolumeConsolidated = 16,
+OpenConsolidated = 32,
+OpenMarketCenter = 64,
+CloseConsolidated = 128,
+CloseMarketCenter = 256,
+UpdateVolumeMarketCenter = 512
+
+
+### Equities Quote Conditions
+
+| Value | Description |
+|-------|---------------------------------------------|
+| R | Regular |
+| A | Slow on Ask |
+| B | Slow on Bid |
+| C | Closing |
+| D | News Dissemination |
+| E | Slow on Bid (LRP or Gap Quote) |
+| F | Fast Trading |
+| G | Trading Range Indication |
+| H | Slow on Bid and Ask |
+| I | Order Imbalance |
+| J | Due to Related - News Dissemination |
+| K | Due to Related - News Pending |
+| O | Open |
+| L | Closed |
+| M | Volatility Trading Pause |
+| N | Non-Firm Quote |
+| O | Opening |
+| P | News Pending |
+| S | Due to Related |
+| T | Resume |
+| U | Slow on Bid and Ask (LRP or Gap Quote) |
+| V | In View of Common |
+| W | Slow on Bid and Ask (Non-Firm) |
+| X | Equipment Changeover |
+| Y | Sub-Penny Trading |
+| Z | No Open / No Resume |
+| 1 | Market Wide Circuit Breaker Level 1 |
+| 2 | Market Wide Circuit Breaker Level 2 |
+| 3 | Market Wide Circuit Breaker Level 3 |
+| 4 | On Demand Intraday Auction |
+| 45 | Additional Information Required (CTS) |
+| 46 | Regulatory Concern (CTS) |
+| 47 | Merger Effective |
+| 49 | Corporate Action (CTS) |
+| 50 | New Security Offering (CTS) |
+| 51 | Intraday Indicative Value Unavailable (CTS) |
+
### Options Trade Message
```java
@@ -289,7 +387,7 @@ client.leave()
```json
{
"apiKey": "",
- "provider": "REALTIME", //or DELAYED_SIP or NASDAQ_BASIC or MANUAL
+ "provider": "IEX", //or DELAYED_SIP or NASDAQ_BASIC or CBOE_ONE or MANUAL
"symbols": [ "AAPL", "MSFT", "GOOG" ], //This is a list of individual tickers to subscribe to, or "lobby" to subscribe to all at once (firehose).
"tradesOnly": true, //This indicates whether you only want trade events (true) or you want trade, ask, and bid events (false).
"numThreads": 4 //The number of threads to use for processing events.
diff --git a/pom.xml b/pom.xml
index ecb43ae..191acb0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,7 @@
4.0.0
com.intrinio
IntrinioRealtimeJavaSDK
- 7.1.2
+ 7.2.0
jar
IntrinioRealtimeJavaSDK
diff --git a/src/SampleApp/CompositeSampleApp.java b/src/SampleApp/CompositeSampleApp.java
index 1a16a1a..28d630a 100644
--- a/src/SampleApp/CompositeSampleApp.java
+++ b/src/SampleApp/CompositeSampleApp.java
@@ -21,7 +21,7 @@ public static void run(String[] args){
intrinio.realtime.equities.Config equitiesConfig = null;
try{
- equitiesConfig = new intrinio.realtime.equities.Config(apiKey, intrinio.realtime.equities.Provider.NASDAQ_BASIC, null, new String[]{"MSFT", "NVDA", "AAPL"}, true, 4);
+ equitiesConfig = new intrinio.realtime.equities.Config(apiKey, intrinio.realtime.equities.Provider.NASDAQ_BASIC, null, new String[]{"MSFT", "NVDA", "AAPL"}, true, 4, false);
}catch (Exception e){
System.out.println("Error parsing equities config: " + e.getMessage());
return;
diff --git a/src/intrinio/realtime/equities/Client.java b/src/intrinio/realtime/equities/Client.java
index 0666faa..4f76276 100644
--- a/src/intrinio/realtime/equities/Client.java
+++ b/src/intrinio/realtime/equities/Client.java
@@ -52,7 +52,7 @@ public class Client implements WebSocket.Listener {
private Thread[] processDataThreads;
private boolean isCancellationRequested = false;
private String HeaderClientInformationKey = "Client-Information";
- private String HeaderClientInformationValue = "IntrinioRealtimeJavaSDKv7.1";
+ private String HeaderClientInformationValue = "IntrinioRealtimeJavaSDKv7.2";
private String HeaderMessageVersionKey = "UseNewEquitiesFormat";
private String HeaderMessageVersionValue = "v2";
//endregion Data Members
@@ -119,10 +119,14 @@ private String getAuthUrl() throws Exception {
switch (config.getEquitiesProvider()) {
case REALTIME: authUrl = "https://realtime-mx.intrinio.com/auth?api_key=" + config.getEquitiesApiKey();
break;
+ case IEX: authUrl = "https://realtime-mx.intrinio.com/auth?api_key=" + config.getEquitiesApiKey();
+ break;
case DELAYED_SIP: authUrl = "https://realtime-delayed-sip.intrinio.com/auth?api_key=" + config.getEquitiesApiKey();
break;
case NASDAQ_BASIC: authUrl = "https://realtime-nasdaq-basic.intrinio.com/auth?api_key=" + config.getEquitiesApiKey();
break;
+ case CBOE_ONE: authUrl = "https://cboe-one.intrinio.com/auth?api_key=" + config.getEquitiesApiKey();
+ break;
case MANUAL: authUrl = "http://" + config.getEquitiesIpAddress() + "/auth?api_key=" + config.getEquitiesApiKey();
break;
default: throw new Exception("Provider not specified!");
@@ -132,14 +136,19 @@ private String getAuthUrl() throws Exception {
private String getWebSocketUrl (String token) throws Exception {
String wsUrl;
+ String delayedPart = config.isEquitiesDelayed() ? "&delayed=true" : "";
switch (config.getEquitiesProvider()) {
- case REALTIME: wsUrl = "wss://realtime-mx.intrinio.com/socket/websocket?vsn=1.0.0&token=" + token;
+ case REALTIME: wsUrl = "wss://realtime-mx.intrinio.com/socket/websocket?vsn=1.0.0&token=" + token + delayedPart;
+ break;
+ case IEX: wsUrl = "wss://realtime-mx.intrinio.com/socket/websocket?vsn=1.0.0&token=" + token + delayedPart;
+ break;
+ case DELAYED_SIP: wsUrl = "wss://realtime-delayed-sip.intrinio.com/socket/websocket?vsn=1.0.0&token=" + token + delayedPart;
break;
- case DELAYED_SIP: wsUrl = "wss://realtime-delayed-sip.intrinio.com/socket/websocket?vsn=1.0.0&token=" + token;
+ case NASDAQ_BASIC: wsUrl = "wss://realtime-nasdaq-basic.intrinio.com/socket/websocket?vsn=1.0.0&token=" + token + delayedPart;
break;
- case NASDAQ_BASIC: wsUrl = "wss://realtime-nasdaq-basic.intrinio.com/socket/websocket?vsn=1.0.0&token=" + token;
+ case CBOE_ONE: wsUrl = "wss://cboe-one.intrinio.com/socket/websocket?vsn=1.0.0&token=" + token + delayedPart;
break;
- case MANUAL: wsUrl = "ws://" + config.getEquitiesIpAddress() + "/socket/websocket?vsn=1.0.0&token=" + token;
+ case MANUAL: wsUrl = "ws://" + config.getEquitiesIpAddress() + "/socket/websocket?vsn=1.0.0&token=" + token + delayedPart;
break;
default: throw new Exception("Provider not specified!");
}
diff --git a/src/intrinio/realtime/equities/Config.java b/src/intrinio/realtime/equities/Config.java
index dd47742..a8874da 100644
--- a/src/intrinio/realtime/equities/Config.java
+++ b/src/intrinio/realtime/equities/Config.java
@@ -15,14 +15,16 @@ public class Config {
private String equitiesIpAddress;
private String[] equitiesSymbols;
private boolean equitiesTradesOnly = true;
+ private boolean equitiesDelayed = false;
private int equitiesNumThreads = 4;
- public Config(String equitiesApiKey, Provider equitiesProvider, String equitiesIpAddress, String[] equitiesSymbols, boolean equitiesTradesOnly, int equitiesNumThreads) throws Exception {
+ public Config(String equitiesApiKey, Provider equitiesProvider, String equitiesIpAddress, String[] equitiesSymbols, boolean equitiesTradesOnly, int equitiesNumThreads, boolean equitiesDelayed) throws Exception {
this.equitiesApiKey = equitiesApiKey;
this.equitiesProvider = equitiesProvider;
this.equitiesIpAddress = equitiesIpAddress;
this.equitiesSymbols = equitiesSymbols;
this.equitiesTradesOnly = equitiesTradesOnly;
+ this.equitiesDelayed = equitiesDelayed;
this.equitiesNumThreads = equitiesNumThreads;
if (this.equitiesApiKey.isBlank()) {
@@ -56,6 +58,10 @@ public boolean isEquitiesTradesOnly() {
return equitiesTradesOnly;
}
+ public boolean isEquitiesDelayed() {
+ return equitiesDelayed;
+ }
+
public int getEquitiesNumThreads() {
return equitiesNumThreads;
}
@@ -67,6 +73,7 @@ public String toString() {
this.equitiesIpAddress,
String.join(", ", this.equitiesSymbols),
this.equitiesTradesOnly,
+ this.equitiesDelayed,
this.equitiesNumThreads);
}
diff --git a/src/intrinio/realtime/equities/Provider.java b/src/intrinio/realtime/equities/Provider.java
index 3a6f171..a9a14d7 100644
--- a/src/intrinio/realtime/equities/Provider.java
+++ b/src/intrinio/realtime/equities/Provider.java
@@ -2,8 +2,10 @@
public enum Provider {
NONE,
- REALTIME,
+ REALTIME, //Equivalent to IEX
MANUAL,
DELAYED_SIP,
- NASDAQ_BASIC
+ NASDAQ_BASIC,
+ CBOE_ONE,
+ IEX
}
diff --git a/src/intrinio/realtime/equities/SubProvider.java b/src/intrinio/realtime/equities/SubProvider.java
index 5cf1cff..8f5253e 100644
--- a/src/intrinio/realtime/equities/SubProvider.java
+++ b/src/intrinio/realtime/equities/SubProvider.java
@@ -7,5 +7,6 @@ public enum SubProvider {
UTP,
OTC,
NASDAQ_BASIC,
- IEX
+ IEX,
+ CBOE_ONE
}
diff --git a/src/intrinio/realtime/equities/Trade.java b/src/intrinio/realtime/equities/Trade.java
index 0869252..4342f21 100644
--- a/src/intrinio/realtime/equities/Trade.java
+++ b/src/intrinio/realtime/equities/Trade.java
@@ -67,6 +67,8 @@ public static Trade parse(byte[] bytes) {
break;
case 6: subProvider = SubProvider.IEX;
break;
+ case 7: subProvider = SubProvider.CBOE_ONE;
+ break;
default: subProvider = SubProvider.IEX;
}
@@ -119,6 +121,8 @@ public static Trade parse(ByteBuffer bytes) {
break;
case 6: source = SubProvider.IEX;
break;
+ case 7: source = SubProvider.CBOE_ONE;
+ break;
default: source = SubProvider.IEX;
}
diff --git a/src/intrinio/realtime/equities/config.json b/src/intrinio/realtime/equities/config.json
index 8174b79..353250c 100644
--- a/src/intrinio/realtime/equities/config.json
+++ b/src/intrinio/realtime/equities/config.json
@@ -1,7 +1,8 @@
{
"equitiesApiKey": "",
- "equitiesProvider": "REALTIME",
+ "equitiesProvider": "IEX",
"equitiesSymbols": [ "GOOG", "MSFT", "AAPL" ],
"equitiesTradesOnly": false,
- "equitiesNumThreads": 2
+ "equitiesNumThreads": 2,
+ "equitiesDelayed": false
}
\ No newline at end of file
diff --git a/src/intrinio/realtime/options/Client.java b/src/intrinio/realtime/options/Client.java
index 2ae17ae..1db7980 100644
--- a/src/intrinio/realtime/options/Client.java
+++ b/src/intrinio/realtime/options/Client.java
@@ -35,7 +35,7 @@ public class Client implements WebSocket.Listener {
private final Lock dataBucketLock = new ReentrantLock();
private final LinkedBlockingDeque> dataBucket = new LinkedBlockingDeque>();
private final WebSocketState wsState = new WebSocketState();
- private final String Version = "IntrinioRealtimeOptionsJavaSDKv7.1";
+ private final String Version = "IntrinioRealtimeOptionsJavaSDKv7.2";
//endregion Final data members
//region Data Members