npm install intrinio-realtime --save
var IntrinioRealtime =// Create an IntrinioRealtime instancevar ir =username: "INTRINIO_API_USERNAME"password: "INTRINIO_API_PASSWORD"// Listen for quotesir// Join channelsir
type: 'ask'timestamp: 14934095093932788ticker: 'GE'size: 13750price: 2897
last- represents the last traded price
bid- represents the top-of-book bid price
ask- represents the top-of-book ask price
lasttrade, or total volume of orders at the top-of-book
To receive price quotes from the Intrinio Real-Time API, you need to instruct the client to "join" a channel. A channel can be
$lobby) where all price quotes for all securities are posted
$lobby_last_price) where only last price quotes for all securities are posted
Special access is required for both lobby channeles. Contact us for more information.
constructor(options) - Creates a new instance of the IntrinioRealtime client.
options: An object with a
passwordproperty corresponding to your Intrinio API Username and Password.
var ir =username: "INTRINIO_API_USERNAME"password: "INTRINIO_API_PASSWORD"
destroy() - Closes the WebSocket, stops the self-healing and heartbeat intervals. You MUST call this to dispose of the client.
onError(callback) - Invokes the given callback when a fatal error is encountered. If no callback has been registered and no
error event listener has been registered, the error will be thrown.
callback- The callback to invoke. The error will be passed as an argument to the callback.
onQuote(callback) - Invokes the given callback when a quote has been received.
callback- The callback to invoke. The quote will be passed as an argument to the callback.
join(...channels) - 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.
channels- An argument list or array of channels to join. See Channels section above for more details.
leave(...channels) - Leaves the given channels.
channels- An argument list or array of channels to leave.
leaveAll() - Leaves all joined channels.
listConnectedChannels() - Returns the list of joined channels. Recently joined channels may not appear in this list immediately.
connect - Emitted when connected to the websocket successfully.
quote - Emitted when a new quote has been received.
error - Emitted when a fatal error is encountered. If no
onError callback has been registered and no event listener has been registered, the error will be thrown.