IntrinioRealTimeClient 7.0.0-alpha

This is a prerelease version of IntrinioRealTimeClient.
There is a newer version of this package available.
See the version list below for details.
dotnet add package IntrinioRealTimeClient --version 7.0.0-alpha                
NuGet\Install-Package IntrinioRealTimeClient -Version 7.0.0-alpha                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IntrinioRealTimeClient" Version="7.0.0-alpha" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IntrinioRealTimeClient --version 7.0.0-alpha                
#r "nuget: IntrinioRealTimeClient, 7.0.0-alpha"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install IntrinioRealTimeClient as a Cake Addin
#addin nuget:?package=IntrinioRealTimeClient&version=7.0.0-alpha&prerelease

// Install IntrinioRealTimeClient as a Cake Tool
#tool nuget:?package=IntrinioRealTimeClient&version=7.0.0-alpha&prerelease                

intrinio-realtime-dotnet-sdk

SDK for working with Intrinio's realtime Multi-Exchange, delayed SIP, or NASDAQ Basic prices feeds. 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.

Documentation for our legacy realtime client

Requirements

  • .NET 6+

Docker

Add your API key to the config.json file in IntrinioRealTimeSDK, then

docker compose build
docker compose run example

Installation

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

Sample Project

For a sample .NET project see: intrinio-realtime-options-dotnet-sdk Be sure to update config.json

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

static void Main(string[] _)
{
	Client.Log("Starting sample app");
	client = new Client(OnTrade, OnQuote);
	timer = new Timer(TimerCallback, client, 10000, 10000);
	client.Join(); //Load symbols from config.json
	//client.Join(new string[] { "AAPL", "GOOG", "MSFT" }, false); //Specify symbols at runtime
	Console.CancelKeyPress += new ConsoleCancelEventHandler(Cancel);
}

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

type [<Struct>] Trade =
    {
        Symbol : string
        Price : float
        Size : uint32
        TotalVolume : uint32
        Timestamp : DateTime
        SubProvider: SubProvider
        MarketCenter: char
        Condition: string
    }
  • Symbol - Ticker symbol.
  • 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
  • SubProvider - Denotes the detailed source within grouped sources.
    • NONE - No subtype specified.
    • CTA_A - CTA_A in the DELAYED_SIP provider.
    • CTA_B - CTA_B in the DELAYED_SIP provider.
    • UTP - UTP in the DELAYED_SIP provider.
    • 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.
  • MarketCenter - Provides the market center
  • Condition - Provides the condition

Quote Message

type [<Struct>] Quote =
    {
        Type : QuoteType 
        Symbol : string
        Price : float
        Size : uint32
        Timestamp : DateTime
        SubProvider: SubProvider
        MarketCenter: char
        Condition: string
    }
  • 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
  • SubProvider - Denotes the detailed source within grouped sources.
    • NONE - No subtype specified.
    • CTA_A - CTA_A in the DELAYED_SIP provider.
    • CTA_B - CTA_B in the DELAYED_SIP provider.
    • UTP - UTP in the DELAYED_SIP provider.
    • 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.
  • MarketCenter - Provides the market center
  • Condition - Provides the condition

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(OnTrade, OnQuote); - Creates a new instance of the Intrinio Real-Time client. The provided actions implement OnTrade and OnQuote, which handle what happens when the associated event happens.

  • Parameter onTrade: The Action accepting trades. This function will be invoked when a 'trade' has been received. The trade will be passed as an argument to the callback.
  • Parameter onQuote: Optional. The Action accepting quotes. 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

config.json

{
	"Config": {
		"ApiKey": "", //Your Intrinio API key.
		"NumThreads": 2, //The number of threads to use for processing events.
		"Provider": "REALTIME", //or DELAYED_SIP or NASDAQ_BASIC 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).
	},
	"Serilog": {
		"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ],
		"MinimumLevel": {
			"Default": "Information",
			"Override": {
				"Microsoft": "Warning",
				"System": "Warning"
			}
		},
		"WriteTo": [
			{ "Name": "Console" }
		]
	}
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
12.3.0 75 11/25/2024
12.2.0 50 11/22/2024
12.1.2 77 10/28/2024
12.1.1 51 10/28/2024
12.0.4 59 10/24/2024
11.0.4 60 10/14/2024
11.0.3 50 10/7/2024
11.0.2 54 10/7/2024
11.0.1 58 10/3/2024
11.0.0 59 10/3/2024
10.0.0 109 7/11/2024
9.2.0 135 3/14/2024
9.1.1 191 3/9/2024
9.1.0 122 3/9/2024
9.0.0 138 2/20/2024
8.3.2 241 10/30/2023
8.3.1 149 10/30/2023
8.3.0 147 10/30/2023
8.2.0 120 10/27/2023
8.1.2 130 10/16/2023
8.1.1 208 8/16/2023
8.0.1 176 7/23/2023
8.0.0 180 7/14/2023
7.0.0 155 5/25/2023
7.0.0-beta 200 5/9/2023
7.0.0-alpha 123 5/9/2023
6.2.1 184 4/20/2023
6.1.1 222 4/17/2023
6.0.1 242 3/10/2023
5.0.0 231 3/5/2023
4.3.1 261 3/4/2023
4.2.0 246 3/2/2023
4.1.1 297 1/25/2023
4.1.0 291 1/24/2023
4.0.0 463 4/25/2022
3.0.0 491 10/22/2021
2.2.0-rc 712 2/13/2019
2.1.0-rc 656 11/30/2018
2.0.0-rc 867 10/18/2017
1.0.0-rc 900 9/21/2017

Version 7.0.0-alpha release.