@quotemedia.com/streamer 2.49.0 → 2.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,158 +1,3 @@
1
- # Quotemedia Streaming Data Service JavaScript Client
1
+ JavaScript streaming client that provides easy-to-use client APIs to connect and subscribe to QuoteMedia's market data streaming services.
2
2
 
3
- Javascript library responsible to connect to the Quotemedia Streaming Service.
4
-
5
- ### Requirements
6
-
7
- ````
8
- 1. Quotemedia Credentials
9
- ````
10
-
11
- ### Usage
12
- Include the javascript file (qmci-streamer-2.49.0.min.js) in your html page.
13
-
14
- ````
15
- <script src="qmci-streamer-2.49.0.min.js"></script>
16
- ````
17
-
18
- After this, you should be able to use the Streamer object. It will allow you to authenticate, subscribe and unsubscribe
19
- symbols. More details in the enduser-example.html, enterprise-token-example.html, wmid-example.html and subscription-example.html.
20
-
21
- ### Authentication
22
-
23
- ````
24
- Streamer.login({
25
- host: 'https://app.quotemedia.com/auth',
26
- credentials: {
27
- wmid: "YourWebmasterID",
28
- username: "YourUsername",
29
- password: "YourPassword"
30
- }
31
- }
32
- ````
33
- When using the login method this will generate a SID which then can be used to open a Streamer connection. You can also authenticate using different methods like:
34
- - Credentials
35
- - SID Token
36
- - Enterprise token
37
- - Webmaster ID
38
- - Datatool token
39
-
40
-
41
-
42
- ### Open
43
-
44
- Set rejectExcessiveConnection:true to reject new connections when limit is reached. If not specified or value is false,
45
- first open connection will be closed instead.
46
-
47
- If needed, there is ability to specify conflation value per connection. When conflation value is null
48
- or not specified, default conflation is used.
49
-
50
- Set format value to 'application/qitch' to use this binary protocol.
51
- Please note that although QITCH protocol uses less bandwidth it can cause significant performance degradation.
52
- In case if no format was specified JSON will be used by default.
53
-
54
- if and SID was previously generated using the login() funtion, it will be used to open the connection, otherwise a WMID and/or token will be required for opening (please see the wmid-example.html and the enterprise-token.html)
55
-
56
- ````
57
- Streamer.open({
58
- host: 'https://app.quotemedia.com/cache',
59
- cors: true,
60
- rejectExcessiveConnection: false,
61
- conflation: null,
62
- format: 'application/json',
63
- credentials: { sid: sid }
64
- }, then(function(stream) {
65
- // After successfully opening the stream,
66
- // listen for its events.
67
- ...
68
- }));
69
- ````
70
-
71
- After a connection was open, make sure to add the different event listeners required for the different events that the streamer object may trigger (please see more of this events on any of the examples).
72
-
73
- ### Subscription
74
-
75
- The different subscriptionTypes that you can subscribe to are:
76
- - Streamer.subscriptionTypes.QUOTE
77
- - Streamer.subscriptionTypes.PRICEDATA
78
- - Streamer.subscriptionTypes.TRADE
79
- - Streamer.subscriptionTypes.MMQUOTE
80
- - Streamer.subscriptionTypes.ORDERBOOK
81
- - Streamer.subscriptionTypes.INTERVAL
82
- - Streamer.subscriptionTypes.NETHOUSEPOSITION
83
- - Streamer.subscriptionTypes.LASTSALE
84
- - Streamer.subscriptionTypes.LIMITUPLIMITDOWN
85
- - Streamer.subscriptionTypes.IVGREEKS
86
- - Streamer.subscriptionTypes.IMBALANCESTATUS
87
-
88
- Some of this subscriptionTypes required different entitlements so make sure that you do have entitlements for the required datatype.
89
-
90
- Then the different market data response types that can be received from the server are:
91
- - Streamer.marketDataTypes.QUOTE
92
- - Streamer.marketDataTypes.PRICEDATA
93
- - Streamer.marketDataTypes.TRADE
94
- - Streamer.marketDataTypes.INTERVAL
95
- - Streamer.marketDataTypes.NETHOUSEPOSITION
96
- - Streamer.marketDataTypes.MMQUOTE
97
- - Streamer.marketDataTypes.BOOKORDER
98
- - Streamer.marketDataTypes.PURGEBOOK
99
- - Streamer.marketDataTypes.BOOKDELETE
100
- - Streamer.marketDataTypes.SYMBOLINFO
101
- - Streamer.marketDataTypes.SYMBOLSTATUS
102
- - Streamer.marketDataTypes.DERIVATIVEINFO
103
- - Streamer.marketDataTypes.LASTSALE
104
- - Streamer.marketDataTypes.LIMITUPLIMITDOWN
105
- - Streamer.marketDataTypes.IVGREEKS
106
- - Streamer.marketDataTypes.IMBALANCESTATUS
107
- - Streamer.marketDataTypes.ALERT
108
- - Streamer.marketDataTypes.NEWS
109
- - Streamer.marketDataTypes.TRADENOTIFICATION
110
- - Streamer.marketDataTypes.NEWSCMDFILTER
111
- - Streamer.marketDataTypes.NEWSERROR
112
- - Streamer.marketDataTypes.DIVIDEND
113
-
114
- You can check which types of market data message you are receiving by using the method:
115
- ``Streamer.marketDataTypes.get(msg)``
116
-
117
- An optional options object can also be passed in. Current available options include:
118
- - skipHeavyInitialLoad: whether to skip initial heavy loads (e.g., previous trades and intervals), defaults to false.
119
- - conflation: Override default connection conflation, default to null. A matching conflation must be supplied when unsubscribing.
120
-
121
- ````
122
- stream.subscribe(["GOOG"], [Streamer.dataTypes.PRICEDATA], { skipHeavyInitialLoad: false }, then(function(result) {
123
- ...
124
- }
125
- ````
126
-
127
- The subscription result will include the successful subscriptions as well as the unentitled and rejected subscriptions and invalid symbols.
128
-
129
- ### Exchange subscription
130
- ##### NOTE:
131
- This type of subscription will only work if you are entitled to exchange subscription data.
132
- Subscription to an exchange to receive stock status messages containing data such as halt, resume, regSHO.
133
-
134
- ````
135
- stream.subscribeExchange("NYE", then(function(result) {
136
- ...
137
- }
138
- ````
139
-
140
- ### Unsubscription
141
- ````
142
- stream.unsubscribe(["GOOG"], [Streamer.dataTypes.PRICEDATA], {}, then(function(result) {
143
- ...
144
- }
145
- ````
146
-
147
- Unsubscribe for symbols and data types. These can be either single strings or arrays of strings. An optional options object can also be passed in. Current available options include:
148
- - conflation: Override default connection conflation, default to null. Should match a subscribe conflation.
149
-
150
- ### Retrieve available number of symbols and connections, number of currently open connections and subscribed symbols.
151
- ````
152
- stream.getSessionStats();
153
- ...
154
- }
155
- ````
156
-
157
- ## Quotemedia Contact
158
- https://www.quotemedia.com/
3
+ https://quotemedia.com/
@@ -1,7 +1,7 @@
1
1
  <html>
2
2
 
3
3
  <head>
4
- <script src="qmci-streamer-2.49.0.min.js"></script>
4
+ <script src="qmci-streamer-2.50.0.min.js"></script>
5
5
  </head>
6
6
 
7
7
  <body>
@@ -1,7 +1,7 @@
1
1
  <html>
2
2
 
3
3
  <head>
4
- <script src="qmci-streamer-2.49.0.min.js"></script>
4
+ <script src="qmci-streamer-2.50.0.min.js"></script>
5
5
  </head>
6
6
 
7
7
  <body>
@@ -1,7 +1,7 @@
1
1
  <html>
2
2
 
3
3
  <head>
4
- <script src="qmci-streamer-2.49.0.min.js"></script>
4
+ <script src="qmci-streamer-2.50.0.min.js"></script>
5
5
  </head>
6
6
 
7
7
  <body>
@@ -2,7 +2,7 @@
2
2
  <html lang="en">
3
3
 
4
4
  <head>
5
- <script src="qmci-streamer-2.49.0.min.js"></script>
5
+ <script src="qmci-streamer-2.50.0.min.js"></script>
6
6
  <script src="https://cdnjs.cloudflare.com/ajax/libs/stomp.js/2.3.3/stomp.min.js"></script>
7
7
  </head>
8
8
 
@@ -1,7 +1,7 @@
1
1
  <html>
2
2
 
3
3
  <head>
4
- <script src="qmci-streamer-2.49.0.min.js"></script>
4
+ <script src="qmci-streamer-2.50.0.min.js"></script>
5
5
  </head>
6
6
 
7
7
  <body>
@@ -1,7 +1,7 @@
1
1
  <html>
2
2
 
3
3
  <head>
4
- <script src="qmci-streamer-2.49.0.min.js"></script>
4
+ <script src="qmci-streamer-2.50.0.min.js"></script>
5
5
  </head>
6
6
 
7
7
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quotemedia.com/streamer",
3
- "version": "2.49.0",
3
+ "version": "2.50.0",
4
4
  "description": "A JavaScript client for QuoteMedia's streaming data service.",
5
5
  "main": "lib/index.js",
6
6
  "author": "QuoteMedia",
@@ -11044,7 +11044,7 @@ var LastSaleDecoder = function () {
11044
11044
  out.locateCode = _Qitch2["default"].locatecode(src, offset + def.SYMBOL_OFFSET);
11045
11045
  out.last = _Qitch2["default"].dec8double(src, offset + def.LAST_OFFSET);
11046
11046
  out.previousClose = _Qitch2["default"].dec8double(src, offset + def.PREVCLOSE_OFFSET);
11047
- out.accumulatedVolume = _Qitch2["default"].int64(src, offset + def.ACCUMULATEDVOLUME_OFFSET);
11047
+ out.accumulatedVolume = _Qitch2["default"].dec8double(src, offset + def.DECIMALACCUMULATEDVOLUME_OFFSET);
11048
11048
  out.tick = _Qitch2["default"].tick(src, offset + def.TICK_OFFSET);
11049
11049
  out.change = this._change(out);
11050
11050
  out.percentChange = this._percentChange(out);
@@ -11576,7 +11576,7 @@ var TradeDecoder = function () {
11576
11576
  resultingMessage.size = _Qitch2["default"].dec8double(src, offset + def.DECIMALSIZE_OFFSET);
11577
11577
  resultingMessage.indicator = _Qitch2["default"].asciichar(src, offset + def.INDICATOR_OFFSET);
11578
11578
  resultingMessage.tick = _Qitch2["default"].tick(src, offset + def.TICK_OFFSET);
11579
- resultingMessage.accumulatedVolume = _Qitch2["default"].int64(src, offset + def.ACCUMULATEDVOLUME_OFFSET);
11579
+ resultingMessage.accumulatedVolume = _Qitch2["default"].dec8double(src, offset + def.DECIMALACCUMULATEDVOLUME_OFFSET);
11580
11580
  resultingMessage.sequenceNumber = _Qitch2["default"].int32(src, offset + def.SEQUENCENUMBER_OFFSET);
11581
11581
  resultingMessage.flags = _Qitch2["default"].int32(src, offset + def.FLAGS_OFFSET);
11582
11582
  resultingMessage.buyerID = _Qitch2["default"].mmid(src, offset + def.BUYERMMID_OFFSET);
@@ -12224,10 +12224,12 @@ var LENGTH = exports.LENGTH = PERIODMS_OFFSET + _QitchConstants.INT_LENGTH;
12224
12224
  "use strict";
12225
12225
 
12226
12226
  exports.__esModule = true;
12227
- exports.LENGTH = exports.LASTTRADE_EXCODE_OFFSET = exports.TICK_OFFSET = exports.ACCUMULATEDVOLUME_OFFSET = exports.PREVCLOSE_OFFSET = exports.LAST_OFFSET = exports.SYMBOL_OFFSET = exports.TIMESTAMP_OFFSET = exports.TYPEID = undefined;
12227
+ exports.LENGTH = exports.DECIMALACCUMULATEDVOLUME_OFFSET = exports.LASTTRADE_EXCODE_OFFSET = exports.TICK_OFFSET = exports.ACCUMULATEDVOLUME_OFFSET = exports.PREVCLOSE_OFFSET = exports.LAST_OFFSET = exports.SYMBOL_OFFSET = exports.TIMESTAMP_OFFSET = exports.TYPEID = undefined;
12228
12228
 
12229
12229
  var _QitchConstants = require("../QitchConstants");
12230
12230
 
12231
+ var _TradeDef = require("./TradeDef");
12232
+
12231
12233
  var TYPEID = exports.TYPEID = 13;
12232
12234
 
12233
12235
  var TIMESTAMP_OFFSET = exports.TIMESTAMP_OFFSET = 0;
@@ -12237,9 +12239,10 @@ var PREVCLOSE_OFFSET = exports.PREVCLOSE_OFFSET = LAST_OFFSET + _QitchConstants.
12237
12239
  var ACCUMULATEDVOLUME_OFFSET = exports.ACCUMULATEDVOLUME_OFFSET = PREVCLOSE_OFFSET + _QitchConstants.DOUBLE_LENGTH;
12238
12240
  var TICK_OFFSET = exports.TICK_OFFSET = ACCUMULATEDVOLUME_OFFSET + _QitchConstants.LONG_LENGTH;
12239
12241
  var LASTTRADE_EXCODE_OFFSET = exports.LASTTRADE_EXCODE_OFFSET = TICK_OFFSET + _QitchConstants.TICK_LENGTH;
12240
- var LENGTH = exports.LENGTH = LASTTRADE_EXCODE_OFFSET + _QitchConstants.EXCODE_LENGTH;
12242
+ var DECIMALACCUMULATEDVOLUME_OFFSET = exports.DECIMALACCUMULATEDVOLUME_OFFSET = LASTTRADE_EXCODE_OFFSET + _QitchConstants.EXCODE_LENGTH;
12243
+ var LENGTH = exports.LENGTH = DECIMALACCUMULATEDVOLUME_OFFSET + _QitchConstants.DOUBLE_LENGTH;
12241
12244
  }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],require("timers").setImmediate,require("timers").clearImmediate,"/lib/qitch/marketDataDefinition/LastSaleDef.js","/lib/qitch/marketDataDefinition")
12242
- },{"../QitchConstants":26,"_process":131,"buffer":121,"timers":152}],90:[function(require,module,exports){
12245
+ },{"../QitchConstants":26,"./TradeDef":98,"_process":131,"buffer":121,"timers":152}],90:[function(require,module,exports){
12243
12246
  (function (process,global,Buffer,__argument0,__argument1,__argument2,__argument3,setImmediate,clearImmediate,__filename,__dirname){
12244
12247
  "use strict";
12245
12248
 
@@ -12496,7 +12499,7 @@ var LENGTH = exports.LENGTH = SYMBOL_OFFSET + _QitchConstants.SYMBOL_LENGTH;
12496
12499
  "use strict";
12497
12500
 
12498
12501
  exports.__esModule = true;
12499
- exports.TradeFlags = exports.LENGTH = exports.DECIMALSIZE_OFFSET = exports.EXCODE_OFFSET = exports.VWAP_OFFSET = exports.MATCHID_OFFSET = exports.RANGEINDICATOR_OFFSET = exports.SELLERMMID_OFFSET = exports.BUYERMMID_OFFSET = exports.FLAGS_OFFSET = exports.SEQUENCENUMBER_OFFSET = exports.ACCUMULATEDVOLUME_OFFSET = exports.TICK_OFFSET = exports.INDICATOR_OFFSET = exports.SIZE_OFFSET = exports.PRICE_OFFSET = exports.SYMBOL_OFFSET = exports.TIMESTAMP_OFFSET = exports.TYPEID = undefined;
12502
+ exports.TradeFlags = exports.LENGTH = exports.DECIMALACCUMULATEDVOLUME_OFFSET = exports.DECIMALSIZE_OFFSET = exports.EXCODE_OFFSET = exports.VWAP_OFFSET = exports.MATCHID_OFFSET = exports.RANGEINDICATOR_OFFSET = exports.SELLERMMID_OFFSET = exports.BUYERMMID_OFFSET = exports.FLAGS_OFFSET = exports.SEQUENCENUMBER_OFFSET = exports.ACCUMULATEDVOLUME_OFFSET = exports.TICK_OFFSET = exports.INDICATOR_OFFSET = exports.SIZE_OFFSET = exports.PRICE_OFFSET = exports.SYMBOL_OFFSET = exports.TIMESTAMP_OFFSET = exports.TYPEID = undefined;
12500
12503
 
12501
12504
  var _QitchConstants = require("../QitchConstants");
12502
12505
 
@@ -12520,7 +12523,8 @@ var MATCHID_OFFSET = exports.MATCHID_OFFSET = RANGEINDICATOR_OFFSET + _QitchCons
12520
12523
  var VWAP_OFFSET = exports.VWAP_OFFSET = MATCHID_OFFSET + _QitchConstants.LONG_LENGTH;
12521
12524
  var EXCODE_OFFSET = exports.EXCODE_OFFSET = VWAP_OFFSET + _QitchConstants.DOUBLE_LENGTH;
12522
12525
  var DECIMALSIZE_OFFSET = exports.DECIMALSIZE_OFFSET = EXCODE_OFFSET + _QitchConstants.EXCODE_LENGTH;
12523
- var LENGTH = exports.LENGTH = DECIMALSIZE_OFFSET + _QitchConstants.DOUBLE_LENGTH;
12526
+ var DECIMALACCUMULATEDVOLUME_OFFSET = exports.DECIMALACCUMULATEDVOLUME_OFFSET = DECIMALSIZE_OFFSET + _QitchConstants.DOUBLE_LENGTH;
12527
+ var LENGTH = exports.LENGTH = DECIMALACCUMULATEDVOLUME_OFFSET + _QitchConstants.DOUBLE_LENGTH;
12524
12528
 
12525
12529
  var TradeFlags = exports.TradeFlags = function () {
12526
12530
  function TradeFlags() {
@@ -15457,7 +15461,7 @@ exports.__esModule = true;
15457
15461
  */
15458
15462
 
15459
15463
  var LIBRARY_NAME = exports.LIBRARY_NAME = "JavaScript";
15460
- var VERSION = exports.VERSION = "2.49.0";
15464
+ var VERSION = exports.VERSION = "2.50.0";
15461
15465
 
15462
15466
  /**
15463
15467
  * Streamer message api namespace.