Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Intrinio Java SDK for Real-Time Stock Prices
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.
SDK for working with Intrinio's realtime IEX, NASDAQ Basic, CBOE One, delayed SIP prices, and realtime/delayed [OPRA](https://www.opraplan.com/) and Options Edge 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.

Expand Down Expand Up @@ -87,6 +87,7 @@ public record Trade(String symbol, SubProvider subProvider, char marketCenter, d
* **`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.
* **`EQUITIES_EDGE`** - From the Equities Edge provider.
* **marketCenter** - Provides the market center
* **price** - the price in USD
* **size** - the size of the last trade.
Expand All @@ -113,6 +114,7 @@ public record Quote(QuoteType type, String symbol, SubProvider subProvider, char
* **`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.
* **`EQUITIES_EDGE`** - From the Equities Edge provider.
* **marketCenter** - Provides the market center
* **symbol** - Ticker symbol.
* **price** - the price in USD
Expand Down Expand Up @@ -387,7 +389,7 @@ client.leave()
```json
{
"apiKey": "",
"provider": "IEX", //or DELAYED_SIP or NASDAQ_BASIC or CBOE_ONE or MANUAL
"provider": "IEX", //or DELAYED_SIP or NASDAQ_BASIC or CBOE_ONE or EQUITIES_EDGE 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.
Expand Down Expand Up @@ -447,7 +449,7 @@ If a subscription has already been created with one of the `join` methods, data
```json
{
"apiKey": "",
"provider": "OPRA", //OPRA
"provider": "OPRA", //OPRA, OPTIONS_EDGE
"symbols": [ "GOOG__210917C01040000", "MSFT", "AAPL__210917C00130000", "SPY" ], //Individual contracts, or option chains to subscribe to all contracts under a symbol.
"numThreads": 4, //The number of threads to use for processing events.
"delayed": false //If you have realtime access but want to force 15minute delayed, set this to true.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.intrinio</groupId>
<artifactId>IntrinioRealtimeJavaSDK</artifactId>
<version>7.2.0</version>
<version>8.0.0</version>
<packaging>jar</packaging>
<name>IntrinioRealtimeJavaSDK</name>
<build>
Expand Down
4 changes: 2 additions & 2 deletions src/SampleApp/CompositeSampleApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static void run(String[] args){
}

//store the most recent values in a simple non-transactional cache that gives contextual information with the event.
intrinio.realtime.composite.DataCache currentDataCache = new CurrentDataCache();
intrinio.realtime.composite.DataCache currentDataCache = DataCacheFactory.create();

//Initialize Options Client and wire it to the cache
//intrinio.realtime.options.OnUnusualActivity optionsUnusualActivityHandler = null;
Expand All @@ -44,7 +44,7 @@ public static void run(String[] args){
intrinio.realtime.equities.Client equitiesClient = new intrinio.realtime.equities.Client(equitiesTradeHandler, equitiesQuoteHandler, equitiesConfig);

//Display trade events with context
currentDataCache.setOnEquitiesTradeUpdated((SecurityData securityData, DataCache dataCache) -> {
currentDataCache.setEquitiesTradeUpdatedCallback((SecurityData securityData, DataCache dataCache, intrinio.realtime.equities.Trade trade) -> {
intrinio.realtime.equities.Client.Log(securityData.getTickerSymbol() + " had a trade and also has " + securityData.getAllOptionsContractData().size() + " active contracts");
});

Expand Down
334 changes: 141 additions & 193 deletions src/intrinio/realtime/composite/BlackScholesGreekCalculator.java

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/intrinio/realtime/composite/CalculateNewGreek.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package intrinio.realtime.composite;

@FunctionalInterface
public interface CalculateNewGreek {
void calculateNewGreek(OptionsContractData optionsContractData, SecurityData securityData, DataCache dataCache);
}
Loading
Loading