@ariva-mds/mds 2.49.0 → 2.51.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/lib/cjs/api/MdsConnection.js +79 -51
- package/lib/cjs/models/BidAskHistoryData.js +2 -2
- package/lib/cjs/models/TickHistoryData.js +2 -2
- package/lib/esm/api/MdsConnection.js +79 -51
- package/lib/esm/models/BidAskHistoryData.js +2 -2
- package/lib/esm/models/TickHistoryData.js +2 -2
- package/lib/types/api/MdsConnection.d.ts +5 -5
- package/lib/types/api/MdsConnection.d.ts.map +1 -1
- package/lib/types/models/BidAskHistoryData.d.ts +1 -1
- package/lib/types/models/BidAskHistoryData.d.ts.map +1 -1
- package/lib/types/models/TickHistoryData.d.ts +1 -1
- package/lib/types/models/TickHistoryData.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -89,52 +89,58 @@ class MdsConnection {
|
|
|
89
89
|
* create a hearbeat observable that can be subscribed to
|
|
90
90
|
*/
|
|
91
91
|
heartbeat() {
|
|
92
|
-
return this.observable({
|
|
92
|
+
return this.observable({ heartbeat: {} })
|
|
93
93
|
.pipe((0, rxjs_1.map)((x) => x.dataHeartbeat));
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* sets the priority for sources
|
|
97
97
|
*/
|
|
98
98
|
priority(sources) {
|
|
99
|
-
return this.promise({
|
|
99
|
+
return this.promise({ priority: { sources: sources } });
|
|
100
100
|
}
|
|
101
101
|
source(sourceId) {
|
|
102
102
|
if (this.sourceCache == undefined) {
|
|
103
103
|
const outer = this;
|
|
104
|
-
this.sourceCache = new lrucache_1.LruCache(sourceId => outer.promise({
|
|
104
|
+
this.sourceCache = new lrucache_1.LruCache(sourceId => outer.promise({ getSource: { sourceId: sourceId } }).then(state => (0, models_1.SourcedataFromJSON)(state.dataSource)), 3000);
|
|
105
105
|
}
|
|
106
106
|
return this.sourceCache.get(sourceId);
|
|
107
107
|
}
|
|
108
108
|
tradingtime(sourceId) {
|
|
109
109
|
if (this.tradingtimeCache == undefined) {
|
|
110
110
|
const outer = this;
|
|
111
|
-
this.tradingtimeCache = new lrucache_1.LruCache(sourceId => outer.promise({
|
|
111
|
+
this.tradingtimeCache = new lrucache_1.LruCache(sourceId => outer.promise({ getTradingtime: { sourceId: sourceId } }).then(state => (0, models_1.TradingtimeFromJSON)(state.dataTradingtime)), 3000);
|
|
112
112
|
}
|
|
113
113
|
return this.tradingtimeCache.get(sourceId);
|
|
114
114
|
}
|
|
115
115
|
tradingtimeAnalysis(sourceId, date) {
|
|
116
116
|
if (this.tradingtimeAnalysisCache == undefined) {
|
|
117
117
|
const outer = this;
|
|
118
|
-
this.tradingtimeAnalysisCache = new lrucache_1.LruCache(parameter => outer.promise({
|
|
118
|
+
this.tradingtimeAnalysisCache = new lrucache_1.LruCache(parameter => outer.promise({
|
|
119
|
+
getTradingtimeAnalysis: {
|
|
120
|
+
sourceId: parameter.sourceId,
|
|
121
|
+
date: parameter.date
|
|
122
|
+
}
|
|
123
|
+
}).then(state => (0, models_1.TradingtimeInfoReplyFromJSON)(state.dataTradingtimeAnalysis)), 3000);
|
|
119
124
|
}
|
|
120
125
|
return this.tradingtimeAnalysisCache.get({ sourceId: sourceId, date: date });
|
|
121
126
|
}
|
|
122
127
|
/**
|
|
123
128
|
* Returns a list or stream of the current trades from this source.
|
|
124
129
|
* */
|
|
125
|
-
tradeticker(sourceId,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
tradeticker(sourceId, quality, onlyWithTurnover, preloadSize) {
|
|
131
|
+
return this.observable({
|
|
132
|
+
subscribeSourceTradeticker: {
|
|
133
|
+
sourceId: sourceId,
|
|
134
|
+
preloadSize: preloadSize,
|
|
135
|
+
onlyWithTurnover: onlyWithTurnover,
|
|
136
|
+
quality: quality
|
|
137
|
+
}
|
|
138
|
+
}).pipe((0, rxjs_1.map)(state => (0, models_1.TradetickerEventFromJSON)(state.dataTradeticker)));
|
|
133
139
|
}
|
|
134
140
|
masterdata(instrumentId) {
|
|
135
141
|
if (this.masterdataCache == undefined) {
|
|
136
142
|
const outer = this;
|
|
137
|
-
this.masterdataCache = new lrucache_1.LruCache(instrumentId => outer.promise({
|
|
143
|
+
this.masterdataCache = new lrucache_1.LruCache(instrumentId => outer.promise({ getInstrumentMasterdata: { instrumentId: instrumentId } }).then(state => (0, models_1.MasterdataMergedSummaryWithIdFromJSON)(state.dataMasterdata)), 3000);
|
|
138
144
|
}
|
|
139
145
|
return this.masterdataCache.get(instrumentId);
|
|
140
146
|
}
|
|
@@ -142,13 +148,18 @@ class MdsConnection {
|
|
|
142
148
|
* Returns a list of all Listings for the Instrument
|
|
143
149
|
* */
|
|
144
150
|
instrumentsListings(instrumentId, sourceId) {
|
|
145
|
-
return this.observable({
|
|
151
|
+
return this.observable({
|
|
152
|
+
listInstrumentListings: {
|
|
153
|
+
instrumentId: instrumentId,
|
|
154
|
+
sourceId: sourceId
|
|
155
|
+
}
|
|
156
|
+
}).pipe((0, rxjs_1.map)(state => (0, models_1.ListingdataWithIdAndQualityFromJSON)(state.dataListing)));
|
|
146
157
|
}
|
|
147
158
|
/**
|
|
148
159
|
* Returns the AFU company profile
|
|
149
160
|
*/
|
|
150
161
|
afuCompanyProfile(instrumentId) {
|
|
151
|
-
return this.promise({
|
|
162
|
+
return this.promise({ getAfuCompanyProfile: { instrumentId: instrumentId } }).then(state => (0, models_1.AfuCompanyProfileFromJSON)(state.dataAfuCompanyProfile));
|
|
152
163
|
}
|
|
153
164
|
// #############################################################################################
|
|
154
165
|
/**
|
|
@@ -179,7 +190,7 @@ class MdsConnection {
|
|
|
179
190
|
* create a Marketstate observable that cn be subscribed to, contains only delta for every marketstate
|
|
180
191
|
*/
|
|
181
192
|
marketstateUpdates(marketstateQueries) {
|
|
182
|
-
return this.observable({
|
|
193
|
+
return this.observable({ subscribeMarketstates: { marketstateQueries: marketstateQueries } })
|
|
183
194
|
.pipe((0, rxjs_1.map)((x) => (0, models_1.MarketstateResponseSearchFromJSON)(x.dataMarketstate)));
|
|
184
195
|
}
|
|
185
196
|
/**
|
|
@@ -191,61 +202,78 @@ class MdsConnection {
|
|
|
191
202
|
/**
|
|
192
203
|
* Returns the Open-High-Low-Close Timeseries for the specified Instrument on the Source.
|
|
193
204
|
* */
|
|
194
|
-
timeseries(marketstateId, resolution, start
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
205
|
+
timeseries(marketstateId, resolution, start, end, cleanSplits, cleanDividends, cleanDistributions, cleanSubscriptions) {
|
|
206
|
+
return this.observable({
|
|
207
|
+
subscribeTimeseries: {
|
|
208
|
+
resolution: resolution,
|
|
209
|
+
marketstateId: marketstateId,
|
|
210
|
+
start: start instanceof Date ? start?.toISOString() : start,
|
|
211
|
+
end: end instanceof Date ? end?.toISOString() : end,
|
|
212
|
+
cleanSplits: cleanSplits,
|
|
213
|
+
cleanDividends: cleanDividends,
|
|
214
|
+
cleanDistributions: cleanDistributions,
|
|
215
|
+
cleanSubscriptions: cleanSubscriptions
|
|
216
|
+
}
|
|
217
|
+
}).pipe((0, rxjs_1.map)(state => (0, models_1.TimeseriesDataFromJSON)(state.dataTimeseries)));
|
|
202
218
|
}
|
|
203
219
|
/**
|
|
204
220
|
* Returns the Open-High-Low-Close Timeseries for the specified Instrument on the Source.
|
|
205
221
|
* */
|
|
206
|
-
timeseriesSnapshot(marketstateId, resolution, start
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
222
|
+
timeseriesSnapshot(marketstateId, resolution, start, end, cleanSplits, cleanDividends, cleanDistributions, cleanSubscriptions) {
|
|
223
|
+
return this.observable({
|
|
224
|
+
listTimeseries: {
|
|
225
|
+
resolution: resolution,
|
|
226
|
+
marketstateId: marketstateId,
|
|
227
|
+
start: start instanceof Date ? start?.toISOString() : start,
|
|
228
|
+
end: end instanceof Date ? end?.toISOString() : end,
|
|
229
|
+
cleanSplits: cleanSplits,
|
|
230
|
+
cleanDividends: cleanDividends,
|
|
231
|
+
cleanDistributions: cleanDistributions,
|
|
232
|
+
cleanSubscriptions: cleanSubscriptions
|
|
233
|
+
}
|
|
234
|
+
}).pipe((0, rxjs_1.map)(state => (0, models_1.TimeseriesDataFromJSON)(state.dataTimeseries)));
|
|
214
235
|
}
|
|
215
236
|
/**
|
|
216
237
|
* Returns the Orderbook for the specified Marketstate.
|
|
217
238
|
* */
|
|
218
239
|
marketdepth(marketstateId) {
|
|
219
|
-
return this.observable({
|
|
240
|
+
return this.observable({ subscribeMarketdepth: { marketstateId: marketstateId } }).pipe((0, rxjs_1.map)(state => (0, models_1.MarketdepthWithIdFromJSON)(state.dataMarketdepth)));
|
|
220
241
|
}
|
|
221
242
|
/**
|
|
222
243
|
* Returns the performance for a specified listing of an instrument.
|
|
223
244
|
*/
|
|
224
245
|
performance(marketstateId, ...timeRanges) {
|
|
225
|
-
return this.observable({
|
|
246
|
+
return this.observable({
|
|
247
|
+
listPerformance: {
|
|
248
|
+
marketstateId: marketstateId,
|
|
249
|
+
timeRange: timeRanges
|
|
250
|
+
}
|
|
251
|
+
}).pipe((0, rxjs_1.map)(state => (0, models_1.PerformanceDataForTimeRangeFromJSON)(state.dataPerformance)));
|
|
226
252
|
}
|
|
227
253
|
/**
|
|
228
254
|
* Returns the bid/ask history for the specified Instrument on the Source.
|
|
229
255
|
*/
|
|
230
|
-
bidAskHistory(marketstateId, start
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
256
|
+
bidAskHistory(marketstateId, start, end) {
|
|
257
|
+
return this.observable({
|
|
258
|
+
listBidAskHistory: {
|
|
259
|
+
marketstateId: marketstateId,
|
|
260
|
+
start: start instanceof Date ? start?.toISOString() : start,
|
|
261
|
+
end: end instanceof Date ? end?.toISOString() : end
|
|
262
|
+
}
|
|
263
|
+
}).pipe((0, rxjs_1.map)(state => (0, models_1.BidAskHistoryDataFromJSON)(state.dataBidAskHistory)));
|
|
237
264
|
}
|
|
238
265
|
/**
|
|
239
266
|
* Returns the tick history for the specified Instrument on the Source.
|
|
240
267
|
*/
|
|
241
|
-
tickHistory(marketstateId, start
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
268
|
+
tickHistory(marketstateId, start, end, hasVolume) {
|
|
269
|
+
return this.observable({
|
|
270
|
+
listTickHistory: {
|
|
271
|
+
marketstateId: marketstateId,
|
|
272
|
+
start: start instanceof Date ? start?.toISOString() : start,
|
|
273
|
+
end: end instanceof Date ? end?.toISOString() : end,
|
|
274
|
+
hasVolume: hasVolume
|
|
275
|
+
}
|
|
276
|
+
}).pipe((0, rxjs_1.map)(state => (0, models_1.TickHistoryDataFromJSON)(state.dataTickHistory)));
|
|
249
277
|
}
|
|
250
278
|
// #############################################################################################
|
|
251
279
|
updateExistingMarketstateWithDeltaUpdate(existingEntry, update) {
|
|
@@ -318,7 +346,7 @@ class MdsConnection {
|
|
|
318
346
|
if (runningRequest && runningRequest.observableSubscriber) {
|
|
319
347
|
outer.runningRequests.delete(requestId);
|
|
320
348
|
outer.websocket.send(JSON.stringify({
|
|
321
|
-
|
|
349
|
+
cancel: { requestId: requestId }
|
|
322
350
|
}));
|
|
323
351
|
}
|
|
324
352
|
};
|
|
@@ -33,7 +33,7 @@ function BidAskHistoryDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
33
|
}
|
|
34
34
|
return {
|
|
35
35
|
'time': !(0, runtime_1.exists)(json, 'time') ? undefined : json['time'],
|
|
36
|
-
'datetime': !(0, runtime_1.exists)(json, 'datetime') ? undefined : json['datetime'],
|
|
36
|
+
'datetime': !(0, runtime_1.exists)(json, 'datetime') ? undefined : new Date(json['datetime'].substring(0, 23) + 'Z'),
|
|
37
37
|
'bid': !(0, runtime_1.exists)(json, 'bid') ? undefined : json['bid'],
|
|
38
38
|
'bidQuantity': !(0, runtime_1.exists)(json, 'bidQuantity') ? undefined : json['bidQuantity'],
|
|
39
39
|
'ask': !(0, runtime_1.exists)(json, 'ask') ? undefined : json['ask'],
|
|
@@ -50,7 +50,7 @@ function BidAskHistoryDataToJSON(value) {
|
|
|
50
50
|
}
|
|
51
51
|
return {
|
|
52
52
|
'time': value.time,
|
|
53
|
-
'datetime': value.datetime,
|
|
53
|
+
'datetime': value.datetime === undefined ? undefined : (value.datetime.toISOString()),
|
|
54
54
|
'bid': value.bid,
|
|
55
55
|
'bidQuantity': value.bidQuantity,
|
|
56
56
|
'ask': value.ask,
|
|
@@ -33,7 +33,7 @@ function TickHistoryDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
33
|
}
|
|
34
34
|
return {
|
|
35
35
|
'time': !(0, runtime_1.exists)(json, 'time') ? undefined : json['time'],
|
|
36
|
-
'datetime': !(0, runtime_1.exists)(json, 'datetime') ? undefined : json['datetime'],
|
|
36
|
+
'datetime': !(0, runtime_1.exists)(json, 'datetime') ? undefined : new Date(json['datetime']),
|
|
37
37
|
'value': !(0, runtime_1.exists)(json, 'value') ? undefined : json['value'],
|
|
38
38
|
'quantity': !(0, runtime_1.exists)(json, 'quantity') ? undefined : json['quantity'],
|
|
39
39
|
};
|
|
@@ -48,7 +48,7 @@ function TickHistoryDataToJSON(value) {
|
|
|
48
48
|
}
|
|
49
49
|
return {
|
|
50
50
|
'time': value.time,
|
|
51
|
-
'datetime': value.datetime,
|
|
51
|
+
'datetime': value.datetime === undefined ? undefined : (value.datetime.toISOString()),
|
|
52
52
|
'value': value.value,
|
|
53
53
|
'quantity': value.quantity,
|
|
54
54
|
};
|
|
@@ -83,52 +83,58 @@ export class MdsConnection {
|
|
|
83
83
|
* create a hearbeat observable that can be subscribed to
|
|
84
84
|
*/
|
|
85
85
|
heartbeat() {
|
|
86
|
-
return this.observable({
|
|
86
|
+
return this.observable({ heartbeat: {} })
|
|
87
87
|
.pipe(map((x) => x.dataHeartbeat));
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* sets the priority for sources
|
|
91
91
|
*/
|
|
92
92
|
priority(sources) {
|
|
93
|
-
return this.promise({
|
|
93
|
+
return this.promise({ priority: { sources: sources } });
|
|
94
94
|
}
|
|
95
95
|
source(sourceId) {
|
|
96
96
|
if (this.sourceCache == undefined) {
|
|
97
97
|
const outer = this;
|
|
98
|
-
this.sourceCache = new LruCache(sourceId => outer.promise({
|
|
98
|
+
this.sourceCache = new LruCache(sourceId => outer.promise({ getSource: { sourceId: sourceId } }).then(state => SourcedataFromJSON(state.dataSource)), 3000);
|
|
99
99
|
}
|
|
100
100
|
return this.sourceCache.get(sourceId);
|
|
101
101
|
}
|
|
102
102
|
tradingtime(sourceId) {
|
|
103
103
|
if (this.tradingtimeCache == undefined) {
|
|
104
104
|
const outer = this;
|
|
105
|
-
this.tradingtimeCache = new LruCache(sourceId => outer.promise({
|
|
105
|
+
this.tradingtimeCache = new LruCache(sourceId => outer.promise({ getTradingtime: { sourceId: sourceId } }).then(state => TradingtimeFromJSON(state.dataTradingtime)), 3000);
|
|
106
106
|
}
|
|
107
107
|
return this.tradingtimeCache.get(sourceId);
|
|
108
108
|
}
|
|
109
109
|
tradingtimeAnalysis(sourceId, date) {
|
|
110
110
|
if (this.tradingtimeAnalysisCache == undefined) {
|
|
111
111
|
const outer = this;
|
|
112
|
-
this.tradingtimeAnalysisCache = new LruCache(parameter => outer.promise({
|
|
112
|
+
this.tradingtimeAnalysisCache = new LruCache(parameter => outer.promise({
|
|
113
|
+
getTradingtimeAnalysis: {
|
|
114
|
+
sourceId: parameter.sourceId,
|
|
115
|
+
date: parameter.date
|
|
116
|
+
}
|
|
117
|
+
}).then(state => TradingtimeInfoReplyFromJSON(state.dataTradingtimeAnalysis)), 3000);
|
|
113
118
|
}
|
|
114
119
|
return this.tradingtimeAnalysisCache.get({ sourceId: sourceId, date: date });
|
|
115
120
|
}
|
|
116
121
|
/**
|
|
117
122
|
* Returns a list or stream of the current trades from this source.
|
|
118
123
|
* */
|
|
119
|
-
tradeticker(sourceId,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
tradeticker(sourceId, quality, onlyWithTurnover, preloadSize) {
|
|
125
|
+
return this.observable({
|
|
126
|
+
subscribeSourceTradeticker: {
|
|
127
|
+
sourceId: sourceId,
|
|
128
|
+
preloadSize: preloadSize,
|
|
129
|
+
onlyWithTurnover: onlyWithTurnover,
|
|
130
|
+
quality: quality
|
|
131
|
+
}
|
|
132
|
+
}).pipe(map(state => TradetickerEventFromJSON(state.dataTradeticker)));
|
|
127
133
|
}
|
|
128
134
|
masterdata(instrumentId) {
|
|
129
135
|
if (this.masterdataCache == undefined) {
|
|
130
136
|
const outer = this;
|
|
131
|
-
this.masterdataCache = new LruCache(instrumentId => outer.promise({
|
|
137
|
+
this.masterdataCache = new LruCache(instrumentId => outer.promise({ getInstrumentMasterdata: { instrumentId: instrumentId } }).then(state => MasterdataMergedSummaryWithIdFromJSON(state.dataMasterdata)), 3000);
|
|
132
138
|
}
|
|
133
139
|
return this.masterdataCache.get(instrumentId);
|
|
134
140
|
}
|
|
@@ -136,13 +142,18 @@ export class MdsConnection {
|
|
|
136
142
|
* Returns a list of all Listings for the Instrument
|
|
137
143
|
* */
|
|
138
144
|
instrumentsListings(instrumentId, sourceId) {
|
|
139
|
-
return this.observable({
|
|
145
|
+
return this.observable({
|
|
146
|
+
listInstrumentListings: {
|
|
147
|
+
instrumentId: instrumentId,
|
|
148
|
+
sourceId: sourceId
|
|
149
|
+
}
|
|
150
|
+
}).pipe(map(state => ListingdataWithIdAndQualityFromJSON(state.dataListing)));
|
|
140
151
|
}
|
|
141
152
|
/**
|
|
142
153
|
* Returns the AFU company profile
|
|
143
154
|
*/
|
|
144
155
|
afuCompanyProfile(instrumentId) {
|
|
145
|
-
return this.promise({
|
|
156
|
+
return this.promise({ getAfuCompanyProfile: { instrumentId: instrumentId } }).then(state => AfuCompanyProfileFromJSON(state.dataAfuCompanyProfile));
|
|
146
157
|
}
|
|
147
158
|
// #############################################################################################
|
|
148
159
|
/**
|
|
@@ -173,7 +184,7 @@ export class MdsConnection {
|
|
|
173
184
|
* create a Marketstate observable that cn be subscribed to, contains only delta for every marketstate
|
|
174
185
|
*/
|
|
175
186
|
marketstateUpdates(marketstateQueries) {
|
|
176
|
-
return this.observable({
|
|
187
|
+
return this.observable({ subscribeMarketstates: { marketstateQueries: marketstateQueries } })
|
|
177
188
|
.pipe(map((x) => MarketstateResponseSearchFromJSON(x.dataMarketstate)));
|
|
178
189
|
}
|
|
179
190
|
/**
|
|
@@ -185,61 +196,78 @@ export class MdsConnection {
|
|
|
185
196
|
/**
|
|
186
197
|
* Returns the Open-High-Low-Close Timeseries for the specified Instrument on the Source.
|
|
187
198
|
* */
|
|
188
|
-
timeseries(marketstateId, resolution, start
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
199
|
+
timeseries(marketstateId, resolution, start, end, cleanSplits, cleanDividends, cleanDistributions, cleanSubscriptions) {
|
|
200
|
+
return this.observable({
|
|
201
|
+
subscribeTimeseries: {
|
|
202
|
+
resolution: resolution,
|
|
203
|
+
marketstateId: marketstateId,
|
|
204
|
+
start: start instanceof Date ? start?.toISOString() : start,
|
|
205
|
+
end: end instanceof Date ? end?.toISOString() : end,
|
|
206
|
+
cleanSplits: cleanSplits,
|
|
207
|
+
cleanDividends: cleanDividends,
|
|
208
|
+
cleanDistributions: cleanDistributions,
|
|
209
|
+
cleanSubscriptions: cleanSubscriptions
|
|
210
|
+
}
|
|
211
|
+
}).pipe(map(state => TimeseriesDataFromJSON(state.dataTimeseries)));
|
|
196
212
|
}
|
|
197
213
|
/**
|
|
198
214
|
* Returns the Open-High-Low-Close Timeseries for the specified Instrument on the Source.
|
|
199
215
|
* */
|
|
200
|
-
timeseriesSnapshot(marketstateId, resolution, start
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
216
|
+
timeseriesSnapshot(marketstateId, resolution, start, end, cleanSplits, cleanDividends, cleanDistributions, cleanSubscriptions) {
|
|
217
|
+
return this.observable({
|
|
218
|
+
listTimeseries: {
|
|
219
|
+
resolution: resolution,
|
|
220
|
+
marketstateId: marketstateId,
|
|
221
|
+
start: start instanceof Date ? start?.toISOString() : start,
|
|
222
|
+
end: end instanceof Date ? end?.toISOString() : end,
|
|
223
|
+
cleanSplits: cleanSplits,
|
|
224
|
+
cleanDividends: cleanDividends,
|
|
225
|
+
cleanDistributions: cleanDistributions,
|
|
226
|
+
cleanSubscriptions: cleanSubscriptions
|
|
227
|
+
}
|
|
228
|
+
}).pipe(map(state => TimeseriesDataFromJSON(state.dataTimeseries)));
|
|
208
229
|
}
|
|
209
230
|
/**
|
|
210
231
|
* Returns the Orderbook for the specified Marketstate.
|
|
211
232
|
* */
|
|
212
233
|
marketdepth(marketstateId) {
|
|
213
|
-
return this.observable({
|
|
234
|
+
return this.observable({ subscribeMarketdepth: { marketstateId: marketstateId } }).pipe(map(state => MarketdepthWithIdFromJSON(state.dataMarketdepth)));
|
|
214
235
|
}
|
|
215
236
|
/**
|
|
216
237
|
* Returns the performance for a specified listing of an instrument.
|
|
217
238
|
*/
|
|
218
239
|
performance(marketstateId, ...timeRanges) {
|
|
219
|
-
return this.observable({
|
|
240
|
+
return this.observable({
|
|
241
|
+
listPerformance: {
|
|
242
|
+
marketstateId: marketstateId,
|
|
243
|
+
timeRange: timeRanges
|
|
244
|
+
}
|
|
245
|
+
}).pipe(map(state => PerformanceDataForTimeRangeFromJSON(state.dataPerformance)));
|
|
220
246
|
}
|
|
221
247
|
/**
|
|
222
248
|
* Returns the bid/ask history for the specified Instrument on the Source.
|
|
223
249
|
*/
|
|
224
|
-
bidAskHistory(marketstateId, start
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
250
|
+
bidAskHistory(marketstateId, start, end) {
|
|
251
|
+
return this.observable({
|
|
252
|
+
listBidAskHistory: {
|
|
253
|
+
marketstateId: marketstateId,
|
|
254
|
+
start: start instanceof Date ? start?.toISOString() : start,
|
|
255
|
+
end: end instanceof Date ? end?.toISOString() : end
|
|
256
|
+
}
|
|
257
|
+
}).pipe(map(state => BidAskHistoryDataFromJSON(state.dataBidAskHistory)));
|
|
231
258
|
}
|
|
232
259
|
/**
|
|
233
260
|
* Returns the tick history for the specified Instrument on the Source.
|
|
234
261
|
*/
|
|
235
|
-
tickHistory(marketstateId, start
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
262
|
+
tickHistory(marketstateId, start, end, hasVolume) {
|
|
263
|
+
return this.observable({
|
|
264
|
+
listTickHistory: {
|
|
265
|
+
marketstateId: marketstateId,
|
|
266
|
+
start: start instanceof Date ? start?.toISOString() : start,
|
|
267
|
+
end: end instanceof Date ? end?.toISOString() : end,
|
|
268
|
+
hasVolume: hasVolume
|
|
269
|
+
}
|
|
270
|
+
}).pipe(map(state => TickHistoryDataFromJSON(state.dataTickHistory)));
|
|
243
271
|
}
|
|
244
272
|
// #############################################################################################
|
|
245
273
|
updateExistingMarketstateWithDeltaUpdate(existingEntry, update) {
|
|
@@ -312,7 +340,7 @@ export class MdsConnection {
|
|
|
312
340
|
if (runningRequest && runningRequest.observableSubscriber) {
|
|
313
341
|
outer.runningRequests.delete(requestId);
|
|
314
342
|
outer.websocket.send(JSON.stringify({
|
|
315
|
-
|
|
343
|
+
cancel: { requestId: requestId }
|
|
316
344
|
}));
|
|
317
345
|
}
|
|
318
346
|
};
|
|
@@ -28,7 +28,7 @@ export function BidAskHistoryDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
28
28
|
}
|
|
29
29
|
return {
|
|
30
30
|
'time': !exists(json, 'time') ? undefined : json['time'],
|
|
31
|
-
'datetime': !exists(json, 'datetime') ? undefined : json['datetime'],
|
|
31
|
+
'datetime': !exists(json, 'datetime') ? undefined : new Date(json['datetime'].substring(0, 23) + 'Z'),
|
|
32
32
|
'bid': !exists(json, 'bid') ? undefined : json['bid'],
|
|
33
33
|
'bidQuantity': !exists(json, 'bidQuantity') ? undefined : json['bidQuantity'],
|
|
34
34
|
'ask': !exists(json, 'ask') ? undefined : json['ask'],
|
|
@@ -44,7 +44,7 @@ export function BidAskHistoryDataToJSON(value) {
|
|
|
44
44
|
}
|
|
45
45
|
return {
|
|
46
46
|
'time': value.time,
|
|
47
|
-
'datetime': value.datetime,
|
|
47
|
+
'datetime': value.datetime === undefined ? undefined : (value.datetime.toISOString()),
|
|
48
48
|
'bid': value.bid,
|
|
49
49
|
'bidQuantity': value.bidQuantity,
|
|
50
50
|
'ask': value.ask,
|
|
@@ -28,7 +28,7 @@ export function TickHistoryDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
28
28
|
}
|
|
29
29
|
return {
|
|
30
30
|
'time': !exists(json, 'time') ? undefined : json['time'],
|
|
31
|
-
'datetime': !exists(json, 'datetime') ? undefined : json['datetime'],
|
|
31
|
+
'datetime': !exists(json, 'datetime') ? undefined : new Date(json['datetime']),
|
|
32
32
|
'value': !exists(json, 'value') ? undefined : json['value'],
|
|
33
33
|
'quantity': !exists(json, 'quantity') ? undefined : json['quantity'],
|
|
34
34
|
};
|
|
@@ -42,7 +42,7 @@ export function TickHistoryDataToJSON(value) {
|
|
|
42
42
|
}
|
|
43
43
|
return {
|
|
44
44
|
'time': value.time,
|
|
45
|
-
'datetime': value.datetime,
|
|
45
|
+
'datetime': value.datetime === undefined ? undefined : (value.datetime.toISOString()),
|
|
46
46
|
'value': value.value,
|
|
47
47
|
'quantity': value.quantity,
|
|
48
48
|
};
|
|
@@ -48,7 +48,7 @@ export declare class MdsConnection {
|
|
|
48
48
|
/**
|
|
49
49
|
* Returns a list or stream of the current trades from this source.
|
|
50
50
|
* */
|
|
51
|
-
tradeticker(sourceId: string,
|
|
51
|
+
tradeticker(sourceId: string, quality: Quality, onlyWithTurnover: boolean, preloadSize?: number): Observable<TradetickerEvent>;
|
|
52
52
|
/**
|
|
53
53
|
* Instruments
|
|
54
54
|
* information about instruments, access to other data that is linked to an instrument
|
|
@@ -85,11 +85,11 @@ export declare class MdsConnection {
|
|
|
85
85
|
/**
|
|
86
86
|
* Returns the Open-High-Low-Close Timeseries for the specified Instrument on the Source.
|
|
87
87
|
* */
|
|
88
|
-
timeseries(marketstateId: string, resolution: Resolution, start?: Date | string
|
|
88
|
+
timeseries(marketstateId: string, resolution: Resolution, start?: Date | string, end?: Date | string, cleanSplits?: boolean, cleanDividends?: boolean, cleanDistributions?: boolean, cleanSubscriptions?: boolean): Observable<TimeseriesData>;
|
|
89
89
|
/**
|
|
90
90
|
* Returns the Open-High-Low-Close Timeseries for the specified Instrument on the Source.
|
|
91
91
|
* */
|
|
92
|
-
timeseriesSnapshot(marketstateId: string, resolution: Resolution, start?: Date | string
|
|
92
|
+
timeseriesSnapshot(marketstateId: string, resolution: Resolution, start?: Date | string, end?: Date | string, cleanSplits?: boolean, cleanDividends?: boolean, cleanDistributions?: boolean, cleanSubscriptions?: boolean): Observable<TimeseriesData>;
|
|
93
93
|
/**
|
|
94
94
|
* Returns the Orderbook for the specified Marketstate.
|
|
95
95
|
* */
|
|
@@ -101,11 +101,11 @@ export declare class MdsConnection {
|
|
|
101
101
|
/**
|
|
102
102
|
* Returns the bid/ask history for the specified Instrument on the Source.
|
|
103
103
|
*/
|
|
104
|
-
bidAskHistory(marketstateId: string, start?: Date | string
|
|
104
|
+
bidAskHistory(marketstateId: string, start?: Date | string, end?: Date | string): Observable<BidAskHistoryData>;
|
|
105
105
|
/**
|
|
106
106
|
* Returns the tick history for the specified Instrument on the Source.
|
|
107
107
|
*/
|
|
108
|
-
tickHistory(marketstateId: string, start?: Date | string
|
|
108
|
+
tickHistory(marketstateId: string, start?: Date | string, end?: Date | string, hasVolume?: boolean): Observable<TickHistoryData>;
|
|
109
109
|
private updateExistingMarketstateWithDeltaUpdate;
|
|
110
110
|
private sendAsSoonAsAuthenticationPermits;
|
|
111
111
|
private stayAuthenticated;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MdsConnection.d.ts","sourceRoot":"","sources":["../../../src/api/MdsConnection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAsB,MAAM,MAAM,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACH,iBAAiB,EAEjB,iBAAiB,EAEjB,2BAA2B,EAE3B,iBAAiB,EAEjB,yBAAyB,EAGzB,6BAA6B,EAE7B,2BAA2B,EAE3B,OAAO,EACP,UAAU,EACV,UAAU,EAEV,eAAe,EAEf,SAAS,EACT,cAAc,EAEd,gBAAgB,EAEhB,WAAW,EAEX,oBAAoB,
|
|
1
|
+
{"version":3,"file":"MdsConnection.d.ts","sourceRoot":"","sources":["../../../src/api/MdsConnection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAsB,MAAM,MAAM,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACH,iBAAiB,EAEjB,iBAAiB,EAEjB,2BAA2B,EAE3B,iBAAiB,EAEjB,yBAAyB,EAGzB,6BAA6B,EAE7B,2BAA2B,EAE3B,OAAO,EACP,UAAU,EACV,UAAU,EAEV,eAAe,EAEf,SAAS,EACT,cA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kB,CAAC,EAAE,OAAO,EAC5B,kBAAkB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC;IAiB7D;;QAEI;IACG,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAMxE;;OAEG;IACI,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC,2BAA2B,CAAC;IAU9G;;OAEG;IACI,aAAa,CAChB,aAAa,EAAE,MAAM,EACrB,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,EACrB,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAWvD;;OAEG;IACI,WAAW,CACd,aAAa,EAAE,MAAM,EACrB,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,EACrB,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,EACnB,SAAS,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,eAAe,CAAC;IAcrD,OAAO,CAAC,wCAAwC;IAWhD,OAAO,CAAC,iCAAiC;IAQzC,OAAO,CAAC,iBAAiB;IA4CzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,UAAU;IAwBlB,OAAO,CAAC,OAAO;IAaf,OAAO,CAAC,4BAA4B;IAmCpC,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,KAAK;CAGhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BidAskHistoryData.d.ts","sourceRoot":"","sources":["../../../src/models/BidAskHistoryData.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"BidAskHistoryData.d.ts","sourceRoot":"","sources":["../../../src/models/BidAskHistoryData.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIlE;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,GAAG,GAAG,iBAAiB,CAEtE;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,iBAAiB,CAazG;AAED,wBAAgB,uBAAuB,CAAC,KAAK,CAAC,EAAE,iBAAiB,GAAG,IAAI,GAAG,GAAG,CAgB7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TickHistoryData.d.ts","sourceRoot":"","sources":["../../../src/models/TickHistoryData.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC5B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"TickHistoryData.d.ts","sourceRoot":"","sources":["../../../src/models/TickHistoryData.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC5B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIhE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,GAAG,GAAG,eAAe,CAElE;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,eAAe,CAWrG;AAED,wBAAgB,qBAAqB,CAAC,KAAK,CAAC,EAAE,eAAe,GAAG,IAAI,GAAG,GAAG,CAczE"}
|