@quotemedia.com/streamer v2.56.0
Overview
JavaScript streaming client that provides easy-to-use client APIs to connect and subscribe to QuoteMedia's market data streaming services.
Getting Started
The Javascript streaming client is a library that contains all the necessary dependencies to run not only in the browser, but also in Node.js environments.
Browser Usage
To use the library in your browser project simply include the library file in your HTML page as a script.
Node.js Usage
Since the window object is not available in Node.js, it will need to be mocked before we import the library.
1. Mock the window object before importing the library:
```javascriptif (typeof global.window === 'undefined') { var window = { navigator: { userAgent: "atmosphere.js" }, document: {}, location: { protocol: 'https:'}, JSON: JSON };
window.WebSocket = require("ws");
window.EventSource = require("eventsource");
window.XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
global.window = window;
global.location = window.location;
global.WebSocket = window.WebSocket;
global.EventSource = window.EventSource;
global.navigator = window.navigator;
global.document = window.document;}
- Then import the library with require syntax:
var Streamer = require("<path to the library>"); - The library is ready for use in your
Node.jsproject.
Examples
- Enterprise Example An example showing how to configure, create a stream, and subscribe to market data with tokens.
- Enduser Example: An example showing how to configure, create a stream, and subscribe to market data with enduser credentials.
- WMID Example: An example showing how to configure, create a stream, and subscribe to market data with a webmaster ID.
- Stomp Example: An example showing how to subscribe and unsubscribe to market data using the Stomp protocol.
- Reconnect Example: An example showing how configure and setup automatic reconnection.
- Subscription Example: An example showing how to subscribe to the trade data market type.
9 months ago
8 months ago
7 months ago
6 months ago
12 months ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
5 years ago
7 years ago
7 years ago