All Projects β†’ intrinio β†’ intrinio-realtime-java-sdk

intrinio / intrinio-realtime-java-sdk

Licence: GPL-3.0 license
Intrinio Java SDK for Real-Time Stock Prices

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to intrinio-realtime-java-sdk

intrinio-realtime-python-sdk
Intrinio Python SDK for Real-Time Stock Prices
Stars: ✭ 79 (+259.09%)
Mutual labels:  realtime, exchange, fintech, stock-market, market-data, stocks, stock-data, stock-prices, stock-market-data
robinhood.tools
πŸ“ˆπŸ€‘πŸ’° Advanced trading tools and resources for Robinhood Web.
Stars: ✭ 27 (+22.73%)
Mutual labels:  forex, exchange, stock-market, market-data, stocks, stock-data
Sumzerotrading
A Java API for Developing Automated Trading Applications for the Equity, Futures, and Currency Markets
Stars: ✭ 128 (+481.82%)
Mutual labels:  stock-market, market-data, stocks, stock-data
TerminalStocks
Pure terminal stock ticker for Windows.
Stars: ✭ 88 (+300%)
Mutual labels:  stock-market, stocks, stock-data, stock-prices
Iex Api
The IEX API provides any individual or academic, public or private institution looking to develop applications that require stock market data to access near real-time quote and trade data for all stocks trading on IEX.
Stars: ✭ 683 (+3004.55%)
Mutual labels:  fintech, stock-market, market-data, stocks
dukascopy-tools
✨ Download historical price tick data for Crypto, Stocks, ETFs, CFDs, Forex via CLI and Node.js ✨
Stars: ✭ 128 (+481.82%)
Mutual labels:  forex, market-data, stock-data, stock-prices
Stonks
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal. See how fast your stonks will crash.
Stars: ✭ 405 (+1740.91%)
Mutual labels:  stock-market, stocks, stock-data
Ystockquote
Fetch stock quote data from Yahoo Finance
Stars: ✭ 502 (+2181.82%)
Mutual labels:  stock-market, market-data, stock-data
Robinhood
Unofficial Documentation of Robinhood Trade's Private API
Stars: ✭ 1,569 (+7031.82%)
Mutual labels:  stock-market, stocks, stock-data
Td Ameritrade Client
TD Ameritrade Java Client
Stars: ✭ 35 (+59.09%)
Mutual labels:  forex, stock-market, stocks
stocktwits-sentiment
Stocktwits market sentiment analysis in Python with Keras and TensorFlow.
Stars: ✭ 23 (+4.55%)
Mutual labels:  stock-market, stocks, stock-data
Simplestockanalysispython
Stock Analysis Tutorial in Python
Stars: ✭ 126 (+472.73%)
Mutual labels:  stock-market, stocks, stock-data
Pytse Client
work with Tehran stock exchange data in Python
Stars: ✭ 130 (+490.91%)
Mutual labels:  stock-market, market-data, stocks
Pyex
Python interface to IEX and IEX cloud APIs
Stars: ✭ 311 (+1313.64%)
Mutual labels:  stock-market, stocks, stock-data
Algobot
A C++ stock market algorithmic trading bot
Stars: ✭ 78 (+254.55%)
Mutual labels:  stock-market, stocks, stock-data
Yahooquery
Python wrapper for an unofficial Yahoo Finance API
Stars: ✭ 288 (+1209.09%)
Mutual labels:  stock-market, market-data, stock-data
StockScreener
A handy tool for screening stocks based on certain criteria from several markets around the world. The list can then be delivered to your email address (one-off or regularly via crontab).
Stars: ✭ 51 (+131.82%)
Mutual labels:  stock-market, stock-data, stock-prices
Intrinio Realtime Node Sdk
Intrinio NodeJS SDK for Real-Time Stock & Crypto Prices
Stars: ✭ 30 (+36.36%)
Mutual labels:  fintech, stock-market, stock-data
Tushare
TuShare is a utility for crawling historical data of China stocks
Stars: ✭ 11,288 (+51209.09%)
Mutual labels:  fintech, stock-market, stock-data
Ta Rs
Technical analysis library for Rust language
Stars: ✭ 248 (+1027.27%)
Mutual labels:  stock-market, market-data, stocks

Intrinio Java SDK for Real-Time Stock Prices

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 provides real-time stock prices via a two-way WebSocket connection. To get started, subscribe to a real-time data feed and follow the instructions below.

Requirements

  • Java 14+

Installation

Go to Release, download the JAR, reference it in your project. The JAR contains dependencies necessary to the SDK.

Sample Project

For a sample Java project see: intrinio-realtime-java-sdk

Features

  • Receive streaming, real-time price quotes (last trade, bid, ask)
  • Subscribe to updates from individual securities
  • Subscribe to updates for all securities

Example Usage

public static void main(String[] args) {
		Client.Log("Starting sample app");
		TradeHandler tradeHandler = new TradeHandler();
		QuoteHandler quoteHandler = new QuoteHandler();
		Client client = new Client(tradeHandler, quoteHandler);
		Timer timer = new Timer();
		TimerTask task = new TimerTask() {
			public void run() {
				Client.Log(client.getStats());
				tradeHandler.tryLog();
				quoteHandler.tryLog();
			}
		};
		timer.schedule(task, 10000, 10000);
		client.join(); //Load symbols from config.json
		//client.join(new String[] {"AAPL", "GOOG", "MSFT"}, false); //specify symbols at runtime
	}

Handling Quotes

There are thousands of securities, each with their own feed of activity. We highly encourage you to make your trade and quote handlers has short as possible and follow a queue pattern so your app can handle the volume of activity.

Data Format

Trade Message

public record Trade(String symbol, double price, long size, long timestamp, long totalVolume)
  • symbol - Ticker symbole.
  • price - the price in USD
  • size - the size of the last trade.
  • totalVolume - The number of stocks traded so far today for this symbol.
  • timestamp - a Unix timestamp in nanoseconds since unix epoch.

Quote Message

public record Quote(QuoteType type, String symbol, double price, long size, long timestamp)
  • type - the quote type
    • ask - represents an ask type
    • bid - represents a bid type
  • symbol - Ticker symbol.
  • price - the price in USD
  • size - the size of the last ask or bid).
  • timestamp - a Unix timestamp in nanoseconds since unix epoch.

API Keys

You will receive your Intrinio API Key after creating an account. You will need a subscription to a realtime data feed as well.

Methods

Client client = new Client(tradeHandler, quoteHandler) - Creates an Intrinio Real-Time client. The provided handlers implement OnTrade and OnQuote, which handle what happens when the associated event happens.

  • Parameter tradeHandler: The handler for trade events. This function will be invoked when a 'trade' has been received. The trade will be passed as an argument to the callback.
  • Parameter quoteHandler: Optional. The handler for quote events. This function will be invoked when a 'quote' has been received. The quote will be passed as an argument to the callback. If 'onQuote' is not provided, the client will NOT request to receive quote updates from the server.

client.join(symbols, tradesOnly); - Joins the given channels. This can be called at any time. The client will automatically register joined channels and establish the proper subscriptions with the WebSocket connection. If no arguments are provided, this function joins channel(s) configured in config.json.

  • Parameter symbols - Optional. A string representing a single ticker symbol (e.g. "AAPL") or an array of ticker symbols (e.g. ["AAPL", "MSFT", "GOOG"]) to join. You can also use the special symbol, "lobby" to join the firehose channel and recieved updates for all ticker symbols. You must have a valid "firehose" subscription.
  • Parameter tradesOnly - Optional (default: false). A boolean value indicating whether the server should return trade data only (as opposed to trade and quote data).
client.join(["AAPL", "MSFT", "GOOG"])
client.join("GE", true)
client.join("lobby") //must have a valid 'firehose' subscription

client.leave(symbols) - Leaves the given channels.

  • Parameter symbols - Optional (default = all channels). A string representing a single ticker symbol (e.g. "AAPL") or an array of ticker symbols (e.g. ["AAPL", "MSFT", "GOOG"]) to leave. If not provided, all subscribed channels will be unsubscribed.
client.leave(["AAPL", "MSFT", "GOOG"])
client.leave("GE")
client.leave("lobby")
client.leave()

client.stop() - Closes the WebSocket, stops the self-healing and heartbeat intervals. Call this to properly dispose of the client.

Configuration

config.json

{
	"apiKey": "",
	"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.
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].