Skip to content

Commit

Permalink
Add Delayed SIP as a new source
Browse files Browse the repository at this point in the history
  • Loading branch information
ssnyder-intrinio committed Jan 25, 2023
1 parent 8a0be36 commit 2588743
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 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 Multi-Exchange prices feed. Intrinio’s Multi-Exchange feed bridges the gap by merging real-time equity pricing from the IEX and MEMX exchanges. Get a comprehensive view with increased market volume and enjoy no exchange fees, no per-user requirements, no permissions or authorizations, and little to no paperwork.
SDK for working with Intrinio's realtime Multi-Exchange or delayed SIP prices feed. Intrinio’s Multi-Exchange feed bridges the gap by merging real-time equity pricing from the IEX and MEMX exchanges. Get a comprehensive view with increased market volume and enjoy no exchange fees, no per-user requirements, no permissions or authorizations, and little to no paperwork.

[Intrinio](https://intrinio.com/) provides real-time stock prices via a two-way WebSocket connection. To get started, [subscribe to a real-time data feed](https://intrinio.com/real-time-multi-exchange) and follow the instructions below.

Expand Down Expand Up @@ -111,7 +111,7 @@ client.leave()
```json
{
"apiKey": "",
"provider": "REALTIME",
"provider": "REALTIME", //or DELAYED_SIP
"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
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>IntrinioRealtimeJavaSDK</groupId>
<artifactId>IntrinioRealtimeJavaSDK</artifactId>
<version>4.0.0</version>
<version>4.1.0</version>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
Expand Down
6 changes: 5 additions & 1 deletion src/intrinio/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ private String getAuthUrl() throws Exception {
switch (config.getProvider()) {
case REALTIME: authUrl = "https://realtime-mx.intrinio.com/auth?api_key=" + config.getApiKey();
break;
case DELAYED_SIP: authUrl = "https://realtime-delayed-sip.intrinio.com/auth?api_key=" + config.getApiKey();
break;
case MANUAL: authUrl = "http://" + config.getIpAddress() + "/auth?api_key=" + config.getApiKey();
break;
default: throw new Exception("Provider not specified!");
Expand All @@ -230,6 +232,8 @@ private String getWebSocketUrl (String token) throws Exception {
switch (config.getProvider()) {
case REALTIME: wsUrl = "wss://realtime-mx.intrinio.com/socket/websocket?vsn=1.0.0&token=" + token;
break;
case DELAYED_SIP: wsUrl = "wss://realtime-delayed-sip.intrinio.com/socket/websocket?vsn=1.0.0&token=" + token;
break;
case MANUAL: wsUrl = "ws://" + config.getIpAddress() + "/socket/websocket?vsn=1.0.0&token=" + token;
break;
default: throw new Exception("Provider not specified!");
Expand Down Expand Up @@ -270,7 +274,7 @@ private void doBackoff(BooleanSupplier callback) {
HttpURLConnection con;
try {
con = (HttpURLConnection) url.openConnection();
con.setRequestProperty("Client-Information", "IntrinioRealtimeJavaSDKv4.0");
con.setRequestProperty("Client-Information", "IntrinioRealtimeJavaSDKv4.1");
} catch (IOException e) {
Client.Log("Authorization Failure. Please check your network connection. " + e.getMessage());
return false;
Expand Down
3 changes: 2 additions & 1 deletion src/intrinio/Provider.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
public enum Provider {
NONE,
REALTIME,
MANUAL
MANUAL,
DELAYED_SIP
}

0 comments on commit 2588743

Please sign in to comment.