@ariva-mds/mds 2.29.0 → 2.37.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/index.js +61 -8
- package/lib/cjs/lrucache.js +31 -0
- package/lib/cjs/models/ReferenceOption.js +52 -0
- package/lib/cjs/models/ReferenceTable.js +58 -0
- package/lib/cjs/models/ReferencesGet200Response.js +51 -0
- package/lib/cjs/models/Resolution.js +42 -0
- package/lib/cjs/models/WebSocketCommandListInstrumentListings.js +2 -0
- package/lib/cjs/models/WebSocketCommandListTimeseries.js +68 -0
- package/lib/cjs/models/WebSocketCommandSubscribeTimeseries.js +68 -0
- package/lib/cjs/models/WebSocketRequest.js +6 -0
- package/lib/cjs/models/index.js +6 -0
- package/lib/cjs/types/index.d.ts +23 -2
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/cjs/types/lrucache.d.ts +8 -0
- package/lib/cjs/types/lrucache.d.ts.map +1 -0
- package/lib/cjs/types/models/ReferenceOption.d.ts +40 -0
- package/lib/cjs/types/models/ReferenceOption.d.ts.map +1 -0
- package/lib/cjs/types/models/ReferenceTable.d.ts +53 -0
- package/lib/cjs/types/models/ReferenceTable.d.ts.map +1 -0
- package/lib/cjs/types/models/ReferencesGet200Response.d.ts +33 -0
- package/lib/cjs/types/models/ReferencesGet200Response.d.ts.map +1 -0
- package/lib/cjs/types/models/Resolution.d.ts +30 -0
- package/lib/cjs/types/models/Resolution.d.ts.map +1 -0
- package/lib/cjs/types/models/WebSocketCommandListInstrumentListings.d.ts +6 -0
- package/lib/cjs/types/models/WebSocketCommandListInstrumentListings.d.ts.map +1 -1
- package/lib/cjs/types/models/WebSocketCommandListTimeseries.d.ts +83 -0
- package/lib/cjs/types/models/WebSocketCommandListTimeseries.d.ts.map +1 -0
- package/lib/cjs/types/models/WebSocketCommandSubscribeTimeseries.d.ts +83 -0
- package/lib/cjs/types/models/WebSocketCommandSubscribeTimeseries.d.ts.map +1 -0
- package/lib/cjs/types/models/WebSocketRequest.d.ts +14 -0
- package/lib/cjs/types/models/WebSocketRequest.d.ts.map +1 -1
- package/lib/cjs/types/models/index.d.ts +6 -0
- package/lib/cjs/types/models/index.d.ts.map +1 -1
- package/lib/esm/index.mjs +62 -9
- package/lib/esm/lrucache.js +27 -0
- package/lib/esm/models/ReferenceOption.js +45 -0
- package/lib/esm/models/ReferenceTable.js +51 -0
- package/lib/esm/models/ReferencesGet200Response.js +44 -0
- package/lib/esm/models/Resolution.js +36 -0
- package/lib/esm/models/WebSocketCommandListInstrumentListings.js +2 -0
- package/lib/esm/models/WebSocketCommandListTimeseries.js +61 -0
- package/lib/esm/models/WebSocketCommandSubscribeTimeseries.js +61 -0
- package/lib/esm/models/WebSocketRequest.js +6 -0
- package/lib/esm/models/index.js +6 -0
- package/lib/esm/types/index.d.ts +23 -2
- package/lib/esm/types/index.d.ts.map +1 -1
- package/lib/esm/types/lrucache.d.ts +8 -0
- package/lib/esm/types/lrucache.d.ts.map +1 -0
- package/lib/esm/types/models/ReferenceOption.d.ts +40 -0
- package/lib/esm/types/models/ReferenceOption.d.ts.map +1 -0
- package/lib/esm/types/models/ReferenceTable.d.ts +53 -0
- package/lib/esm/types/models/ReferenceTable.d.ts.map +1 -0
- package/lib/esm/types/models/ReferencesGet200Response.d.ts +33 -0
- package/lib/esm/types/models/ReferencesGet200Response.d.ts.map +1 -0
- package/lib/esm/types/models/Resolution.d.ts +30 -0
- package/lib/esm/types/models/Resolution.d.ts.map +1 -0
- package/lib/esm/types/models/WebSocketCommandListInstrumentListings.d.ts +6 -0
- package/lib/esm/types/models/WebSocketCommandListInstrumentListings.d.ts.map +1 -1
- package/lib/esm/types/models/WebSocketCommandListTimeseries.d.ts +83 -0
- package/lib/esm/types/models/WebSocketCommandListTimeseries.d.ts.map +1 -0
- package/lib/esm/types/models/WebSocketCommandSubscribeTimeseries.d.ts +83 -0
- package/lib/esm/types/models/WebSocketCommandSubscribeTimeseries.d.ts.map +1 -0
- package/lib/esm/types/models/WebSocketRequest.d.ts +14 -0
- package/lib/esm/types/models/WebSocketRequest.d.ts.map +1 -1
- package/lib/esm/types/models/index.d.ts +6 -0
- package/lib/esm/types/models/index.d.ts.map +1 -1
- package/package.json +8 -6
package/lib/cjs/index.js
CHANGED
|
@@ -9,8 +9,12 @@ const rxjs_1 = require("rxjs");
|
|
|
9
9
|
const operators_1 = require("rxjs/operators");
|
|
10
10
|
const Sourcedata_1 = require("./models/Sourcedata");
|
|
11
11
|
const Tradingtime_1 = require("./models/Tradingtime");
|
|
12
|
+
const TimeseriesData_1 = require("./models/TimeseriesData");
|
|
12
13
|
const TradingtimeInfoReply_1 = require("./models/TradingtimeInfoReply");
|
|
13
14
|
const models_1 = require("./models");
|
|
15
|
+
const MasterdataMergedSummaryWithId_1 = require("./models/MasterdataMergedSummaryWithId");
|
|
16
|
+
const lrucache_1 = require("./lrucache");
|
|
17
|
+
const dedupa = require('dedup-async');
|
|
14
18
|
class MdsAuthdata {
|
|
15
19
|
constructor(token) {
|
|
16
20
|
this.token = token;
|
|
@@ -83,13 +87,17 @@ class MdsConnection {
|
|
|
83
87
|
this.runningRequests = new Map();
|
|
84
88
|
this.isDebug = false;
|
|
85
89
|
this.reconnectTimer = undefined;
|
|
90
|
+
/**
|
|
91
|
+
* gets the basic information about a source
|
|
92
|
+
*/
|
|
93
|
+
this.masterdataCache = new lrucache_1.LruCache(3000);
|
|
86
94
|
this.authdataCallback = authdataCallback;
|
|
87
95
|
this.isDebug = options.debug ? true : false;
|
|
88
96
|
this.websocket = new reconnecting_websocket_1.default(websocketUrl, [], options.wsOptions);
|
|
89
97
|
const outer = this;
|
|
90
98
|
// open-handler -> resend open requests from previous connection
|
|
91
99
|
this.websocket.onopen = function () {
|
|
92
|
-
outer.debug(
|
|
100
|
+
outer.debug(`websocket open, resending ${outer.waitingForReconnect.length} items`);
|
|
93
101
|
outer.state.connectionOpened();
|
|
94
102
|
// @ts-ignore
|
|
95
103
|
for (const request of outer.waitingForReconnect) {
|
|
@@ -98,7 +106,7 @@ class MdsConnection {
|
|
|
98
106
|
};
|
|
99
107
|
// close handler -> store open requests for resending on reconnect
|
|
100
108
|
this.websocket.onclose = function () {
|
|
101
|
-
outer.debug(
|
|
109
|
+
outer.debug(`websocket closed, queuing ${outer.waitingForReconnect.length} items`);
|
|
102
110
|
outer.state.connectionClosed();
|
|
103
111
|
outer.waitingForReconnect = Array.from(outer.runningRequests.values());
|
|
104
112
|
};
|
|
@@ -124,7 +132,7 @@ class MdsConnection {
|
|
|
124
132
|
* create a hearbeat observable that can be subscribed to
|
|
125
133
|
*/
|
|
126
134
|
heartbeat() {
|
|
127
|
-
return this.observable({ 'heartbeat': {} }
|
|
135
|
+
return this.observable({ 'heartbeat': {} })
|
|
128
136
|
.pipe((0, operators_1.map)((x) => x.dataHeartbeat));
|
|
129
137
|
}
|
|
130
138
|
/**
|
|
@@ -152,7 +160,7 @@ class MdsConnection {
|
|
|
152
160
|
* create a Marketstate observable that can be subscribed to, contains only delta for every marketstate
|
|
153
161
|
*/
|
|
154
162
|
marketstateUpdates(marketstateQueries) {
|
|
155
|
-
return this.observable({ 'subscribeMarketstates': { 'marketstateQueries': marketstateQueries } }
|
|
163
|
+
return this.observable({ 'subscribeMarketstates': { 'marketstateQueries': marketstateQueries } })
|
|
156
164
|
.pipe((0, operators_1.map)((x) => (0, models_1.MarketstateResponseSearchFromJSON)(x.dataMarketstate)));
|
|
157
165
|
}
|
|
158
166
|
/**
|
|
@@ -173,6 +181,21 @@ class MdsConnection {
|
|
|
173
181
|
source(source) {
|
|
174
182
|
return this.promise({ 'getSource': { 'sourceId': source } }).then(state => (0, Sourcedata_1.SourcedataFromJSON)(state.dataSource));
|
|
175
183
|
}
|
|
184
|
+
masterdata(instrumentId) {
|
|
185
|
+
var res = this.masterdataCache.get(instrumentId);
|
|
186
|
+
if (res != null) {
|
|
187
|
+
return res;
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
res = this.promise({ 'getInstrumentMasterdata': { 'instrumentId': instrumentId } }).then(state => (0, MasterdataMergedSummaryWithId_1.MasterdataMergedSummaryWithIdFromJSON)(state.dataMasterdata));
|
|
191
|
+
// res = dedupa(res);
|
|
192
|
+
if (res != undefined) {
|
|
193
|
+
this.masterdataCache.put(instrumentId, res);
|
|
194
|
+
return res;
|
|
195
|
+
}
|
|
196
|
+
return Promise.reject();
|
|
197
|
+
}
|
|
198
|
+
}
|
|
176
199
|
/**
|
|
177
200
|
* gets the tradingtime for a source
|
|
178
201
|
* */
|
|
@@ -191,6 +214,32 @@ class MdsConnection {
|
|
|
191
214
|
instrumentsListings(instrumentId, sourceId) {
|
|
192
215
|
return this.observable({ 'listInstrumentListings': { 'instrumentId': instrumentId, 'sourceId': sourceId } }).pipe((0, operators_1.map)(state => (0, models_1.ListingdataWithIdAndQualityFromJSON)(state.dataListing)));
|
|
193
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* Returns a list of all Trades for the Instrument
|
|
219
|
+
* */
|
|
220
|
+
timeseries(marketstateId, resolution, start = undefined, end = undefined) {
|
|
221
|
+
var args = { resolution: resolution, marketstateId: marketstateId };
|
|
222
|
+
if (start != undefined) {
|
|
223
|
+
args.start = start;
|
|
224
|
+
}
|
|
225
|
+
if (end != undefined) {
|
|
226
|
+
args.end = end;
|
|
227
|
+
}
|
|
228
|
+
return this.observable({ 'subscribeTimeseries': args }).pipe((0, operators_1.map)(state => (0, TimeseriesData_1.TimeseriesDataFromJSON)(state.timeseries)));
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Returns a list of all Trades for the Instrument
|
|
232
|
+
* */
|
|
233
|
+
timeseriesSnapshot(marketstateId, resolution, start = undefined, end = undefined) {
|
|
234
|
+
var args = { resolution: resolution, marketstateId: marketstateId };
|
|
235
|
+
if (start != undefined) {
|
|
236
|
+
args.start = start;
|
|
237
|
+
}
|
|
238
|
+
if (end != undefined) {
|
|
239
|
+
args.end = end;
|
|
240
|
+
}
|
|
241
|
+
return this.observable({ 'listTimeseries': args }).pipe((0, operators_1.map)(state => (0, TimeseriesData_1.TimeseriesDataFromJSON)(state.timeseries)));
|
|
242
|
+
}
|
|
194
243
|
updateExistingMarketstateWithDeltaUpdate(existingEntry, update) {
|
|
195
244
|
const existingJson = (0, models_1.MarketstateResponseSearchToJSON)(existingEntry);
|
|
196
245
|
const updateJson = (0, models_1.MarketstateResponseSearchToJSON)(update);
|
|
@@ -213,7 +262,7 @@ class MdsConnection {
|
|
|
213
262
|
stayAuthenticated() {
|
|
214
263
|
const outer = this;
|
|
215
264
|
new rxjs_1.Observable((subscriber) => {
|
|
216
|
-
this.authdataCallback().then((mdsAuthdata) => outer.observable({ 'subscribeAuthentication': mdsAuthdata }
|
|
265
|
+
this.authdataCallback().then((mdsAuthdata) => outer.observable({ 'subscribeAuthentication': mdsAuthdata })).then((observable) => observable.subscribe({
|
|
217
266
|
next(x) {
|
|
218
267
|
if (x.dataAuthentication.secondsToLive > 30) {
|
|
219
268
|
subscriber.next(x);
|
|
@@ -236,13 +285,17 @@ class MdsConnection {
|
|
|
236
285
|
outer.state.authenticationEnded();
|
|
237
286
|
subscriber.error(error);
|
|
238
287
|
});
|
|
239
|
-
}).pipe((0, operators_1.
|
|
240
|
-
.subscribe(
|
|
288
|
+
}).pipe((0, operators_1.retry)({ delay: 2000 }), (0, operators_1.repeatWhen)(x => x.pipe((0, operators_1.delay)(2000))))
|
|
289
|
+
.subscribe({
|
|
290
|
+
next(n) { outer.debug(`auth outer ${JSON.stringify(n)}`); },
|
|
291
|
+
error(e) { outer.debug(`auth error ${JSON.stringify(e)}`); },
|
|
292
|
+
complete() { outer.debug("auth completed"); }
|
|
293
|
+
});
|
|
241
294
|
}
|
|
242
295
|
generateNextRequestId() {
|
|
243
296
|
return "request-" + this.nextGeneratedRequestId++;
|
|
244
297
|
}
|
|
245
|
-
observable(req
|
|
298
|
+
observable(req) {
|
|
246
299
|
const requestId = this.generateNextRequestId();
|
|
247
300
|
req.requestId = requestId;
|
|
248
301
|
const outer = this;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LruCache = void 0;
|
|
4
|
+
class LruCache {
|
|
5
|
+
constructor(maxEntries) {
|
|
6
|
+
this.values = new Map();
|
|
7
|
+
this.maxEntries = 200;
|
|
8
|
+
this.maxEntries = maxEntries;
|
|
9
|
+
}
|
|
10
|
+
get(key) {
|
|
11
|
+
const hasKey = this.values.has(key);
|
|
12
|
+
if (hasKey) {
|
|
13
|
+
// peek the entry, re-insert for LRU strategy
|
|
14
|
+
let entry = this.values.get(key);
|
|
15
|
+
this.values.delete(key);
|
|
16
|
+
if (entry != undefined) {
|
|
17
|
+
this.values.set(key, entry);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
put(key, value) {
|
|
23
|
+
if (this.values.size >= this.maxEntries) {
|
|
24
|
+
// least-recently used cache eviction strategy
|
|
25
|
+
const keyToDelete = this.values.keys().next().value;
|
|
26
|
+
this.values.delete(keyToDelete);
|
|
27
|
+
}
|
|
28
|
+
this.values.set(key, value);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.LruCache = LruCache;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MDS API
|
|
6
|
+
* Please note the following definitions used throughout this API.<p> **Source**: A source can be any kind of marketplace (exchange) or an entity that calculates prices/values for instruments. <p> **Instrument**: An instrument is e.g. a stock, a bond, an index, a currency-pair or a specific future/option contract. An instrument is identified by an InstrumentId. Some information in MDS is linked to instruments: Masterdata (names, instrument types, ...), Fundamental stock data, News, ... <p> **Listing**: An instrument can be traded/calculated on multiple Sources. Some sources even support multiple listings of the same instrument (for example in different currencies). A listing is identified by a MarketstateId. Most information in MDS is linked to listings: Marketstate (prices/quotes), Tickdata (price/quote history), Performance data, ... <p> **Instrument** **vs** **Listing**: The Microsoft stock is an Instrument identified by the InstrumentId \"US5949181045\". It is listed and traded on many exchanges. Each of these Listings is identified by a unique MarketstateId, i.e. \"US5949181045@GAT\" (listing on Tradegate) or \"US5949181045,USD@SIX\" (USD-listing on SIX) or \"US5949181045,CHF@SIX\" (CHF-listing on SIX). **Marketstate** defines the current state of an instrument listed on a source. In our case besides open, close, post and pre market also latest trade und quote informations ... **MarketstateQuery**: When you request a price/quote in MDS, you have to select the Listing(s) you wish to receive them for. Most API calls use a MarketstateQuery as a parameter to express a filter for one or more Marketstates. The query often takes the form of \"DE0007100000@ETR\" and can also utilize wildcards like \"*\" or \"?\". See here for a full specification <a href=\"#model-MarketstateQuery\">MarketstateQuery</a> **Timestamps**: Most events covered in MDS have a known instant they refer to. A trade on an exchange usually has an exact time when it was executed. However depending on Source and context some events can refer to a whole trading day without specifying a time of day. E.g. ECB currency rates are determined for the whole day. In other cases an exact time is not part of the licensed data, e.g. when looking at the end-of-day quality of some exchanges. If an exact time is known, this is transmitted in a field \"datetime\". If only a date is given the field \"date\" is used. I you see \"00:00:00.000\" in a datetime field, this actually means something happened exactly at midnight, it is not a a special value indicating \\\"no date available\\\". **SSE-NOTE**: Many endpoints support Server Sent Events (SSE) to get pushed updates. To receive SSE the client needs to request the content-type \"text/event-stream\" via the \"accept\" http request-header. <br>Unfortunately the swagger-ui does not support SSE! To test SSE on an endpoint use the curl command shown in the snapshot response and modify the \"accept\" http request-header as described above.<p> **CURL-NOTE**: When use curl use the option -i to see the response headers. If the return status is 401 then you have to reauthorize. Otherwise you do not see whether the token is expired and wondering that there is no response.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.9
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ReferenceOptionToJSON = exports.ReferenceOptionFromJSONTyped = exports.ReferenceOptionFromJSON = exports.instanceOfReferenceOption = void 0;
|
|
17
|
+
const runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the ReferenceOption interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfReferenceOption(value) {
|
|
22
|
+
let isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfReferenceOption = instanceOfReferenceOption;
|
|
26
|
+
function ReferenceOptionFromJSON(json) {
|
|
27
|
+
return ReferenceOptionFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.ReferenceOptionFromJSON = ReferenceOptionFromJSON;
|
|
30
|
+
function ReferenceOptionFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
|
|
36
|
+
'nameTranslated': !(0, runtime_1.exists)(json, 'nameTranslated') ? undefined : json['nameTranslated'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
exports.ReferenceOptionFromJSONTyped = ReferenceOptionFromJSONTyped;
|
|
40
|
+
function ReferenceOptionToJSON(value) {
|
|
41
|
+
if (value === undefined) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (value === null) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'name': value.name,
|
|
49
|
+
'nameTranslated': value.nameTranslated,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
exports.ReferenceOptionToJSON = ReferenceOptionToJSON;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MDS API
|
|
6
|
+
* Please note the following definitions used throughout this API.<p> **Source**: A source can be any kind of marketplace (exchange) or an entity that calculates prices/values for instruments. <p> **Instrument**: An instrument is e.g. a stock, a bond, an index, a currency-pair or a specific future/option contract. An instrument is identified by an InstrumentId. Some information in MDS is linked to instruments: Masterdata (names, instrument types, ...), Fundamental stock data, News, ... <p> **Listing**: An instrument can be traded/calculated on multiple Sources. Some sources even support multiple listings of the same instrument (for example in different currencies). A listing is identified by a MarketstateId. Most information in MDS is linked to listings: Marketstate (prices/quotes), Tickdata (price/quote history), Performance data, ... <p> **Instrument** **vs** **Listing**: The Microsoft stock is an Instrument identified by the InstrumentId \"US5949181045\". It is listed and traded on many exchanges. Each of these Listings is identified by a unique MarketstateId, i.e. \"US5949181045@GAT\" (listing on Tradegate) or \"US5949181045,USD@SIX\" (USD-listing on SIX) or \"US5949181045,CHF@SIX\" (CHF-listing on SIX). **Marketstate** defines the current state of an instrument listed on a source. In our case besides open, close, post and pre market also latest trade und quote informations ... **MarketstateQuery**: When you request a price/quote in MDS, you have to select the Listing(s) you wish to receive them for. Most API calls use a MarketstateQuery as a parameter to express a filter for one or more Marketstates. The query often takes the form of \"DE0007100000@ETR\" and can also utilize wildcards like \"*\" or \"?\". See here for a full specification <a href=\"#model-MarketstateQuery\">MarketstateQuery</a> **Timestamps**: Most events covered in MDS have a known instant they refer to. A trade on an exchange usually has an exact time when it was executed. However depending on Source and context some events can refer to a whole trading day without specifying a time of day. E.g. ECB currency rates are determined for the whole day. In other cases an exact time is not part of the licensed data, e.g. when looking at the end-of-day quality of some exchanges. If an exact time is known, this is transmitted in a field \"datetime\". If only a date is given the field \"date\" is used. I you see \"00:00:00.000\" in a datetime field, this actually means something happened exactly at midnight, it is not a a special value indicating \\\"no date available\\\". **SSE-NOTE**: Many endpoints support Server Sent Events (SSE) to get pushed updates. To receive SSE the client needs to request the content-type \"text/event-stream\" via the \"accept\" http request-header. <br>Unfortunately the swagger-ui does not support SSE! To test SSE on an endpoint use the curl command shown in the snapshot response and modify the \"accept\" http request-header as described above.<p> **CURL-NOTE**: When use curl use the option -i to see the response headers. If the return status is 401 then you have to reauthorize. Otherwise you do not see whether the token is expired and wondering that there is no response.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.9
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ReferenceTableToJSON = exports.ReferenceTableFromJSONTyped = exports.ReferenceTableFromJSON = exports.instanceOfReferenceTable = void 0;
|
|
17
|
+
const runtime_1 = require("../runtime");
|
|
18
|
+
const ReferenceOption_1 = require("./ReferenceOption");
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the ReferenceTable interface.
|
|
21
|
+
*/
|
|
22
|
+
function instanceOfReferenceTable(value) {
|
|
23
|
+
let isInstance = true;
|
|
24
|
+
isInstance = isInstance && "referenceId" in value;
|
|
25
|
+
return isInstance;
|
|
26
|
+
}
|
|
27
|
+
exports.instanceOfReferenceTable = instanceOfReferenceTable;
|
|
28
|
+
function ReferenceTableFromJSON(json) {
|
|
29
|
+
return ReferenceTableFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
exports.ReferenceTableFromJSON = ReferenceTableFromJSON;
|
|
32
|
+
function ReferenceTableFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if ((json === undefined) || (json === null)) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'referenceId': json['referenceId'],
|
|
38
|
+
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
|
|
39
|
+
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
40
|
+
'options': !(0, runtime_1.exists)(json, 'options') ? undefined : ((0, runtime_1.mapValues)(json['options'], ReferenceOption_1.ReferenceOptionFromJSON)),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
exports.ReferenceTableFromJSONTyped = ReferenceTableFromJSONTyped;
|
|
44
|
+
function ReferenceTableToJSON(value) {
|
|
45
|
+
if (value === undefined) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
if (value === null) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'referenceId': value.referenceId,
|
|
53
|
+
'name': value.name,
|
|
54
|
+
'description': value.description,
|
|
55
|
+
'options': value.options === undefined ? undefined : ((0, runtime_1.mapValues)(value.options, ReferenceOption_1.ReferenceOptionToJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
exports.ReferenceTableToJSON = ReferenceTableToJSON;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MDS API
|
|
6
|
+
* Please note the following definitions used throughout this API.<p> **Source**: A source can be any kind of marketplace (exchange) or an entity that calculates prices/values for instruments. <p> **Instrument**: An instrument is e.g. a stock, a bond, an index, a currency-pair or a specific future/option contract. An instrument is identified by an InstrumentId. Some information in MDS is linked to instruments: Masterdata (names, instrument types, ...), Fundamental stock data, News, ... <p> **Listing**: An instrument can be traded/calculated on multiple Sources. Some sources even support multiple listings of the same instrument (for example in different currencies). A listing is identified by a MarketstateId. Most information in MDS is linked to listings: Marketstate (prices/quotes), Tickdata (price/quote history), Performance data, ... <p> **Instrument** **vs** **Listing**: The Microsoft stock is an Instrument identified by the InstrumentId \"US5949181045\". It is listed and traded on many exchanges. Each of these Listings is identified by a unique MarketstateId, i.e. \"US5949181045@GAT\" (listing on Tradegate) or \"US5949181045,USD@SIX\" (USD-listing on SIX) or \"US5949181045,CHF@SIX\" (CHF-listing on SIX). **Marketstate** defines the current state of an instrument listed on a source. In our case besides open, close, post and pre market also latest trade und quote informations ... **MarketstateQuery**: When you request a price/quote in MDS, you have to select the Listing(s) you wish to receive them for. Most API calls use a MarketstateQuery as a parameter to express a filter for one or more Marketstates. The query often takes the form of \"DE0007100000@ETR\" and can also utilize wildcards like \"*\" or \"?\". See here for a full specification <a href=\"#model-MarketstateQuery\">MarketstateQuery</a> **Timestamps**: Most events covered in MDS have a known instant they refer to. A trade on an exchange usually has an exact time when it was executed. However depending on Source and context some events can refer to a whole trading day without specifying a time of day. E.g. ECB currency rates are determined for the whole day. In other cases an exact time is not part of the licensed data, e.g. when looking at the end-of-day quality of some exchanges. If an exact time is known, this is transmitted in a field \"datetime\". If only a date is given the field \"date\" is used. I you see \"00:00:00.000\" in a datetime field, this actually means something happened exactly at midnight, it is not a a special value indicating \\\"no date available\\\". **SSE-NOTE**: Many endpoints support Server Sent Events (SSE) to get pushed updates. To receive SSE the client needs to request the content-type \"text/event-stream\" via the \"accept\" http request-header. <br>Unfortunately the swagger-ui does not support SSE! To test SSE on an endpoint use the curl command shown in the snapshot response and modify the \"accept\" http request-header as described above.<p> **CURL-NOTE**: When use curl use the option -i to see the response headers. If the return status is 401 then you have to reauthorize. Otherwise you do not see whether the token is expired and wondering that there is no response.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.9
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ReferencesGet200ResponseToJSON = exports.ReferencesGet200ResponseFromJSONTyped = exports.ReferencesGet200ResponseFromJSON = exports.instanceOfReferencesGet200Response = void 0;
|
|
17
|
+
const runtime_1 = require("../runtime");
|
|
18
|
+
const ReferenceTable_1 = require("./ReferenceTable");
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the ReferencesGet200Response interface.
|
|
21
|
+
*/
|
|
22
|
+
function instanceOfReferencesGet200Response(value) {
|
|
23
|
+
let isInstance = true;
|
|
24
|
+
return isInstance;
|
|
25
|
+
}
|
|
26
|
+
exports.instanceOfReferencesGet200Response = instanceOfReferencesGet200Response;
|
|
27
|
+
function ReferencesGet200ResponseFromJSON(json) {
|
|
28
|
+
return ReferencesGet200ResponseFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
exports.ReferencesGet200ResponseFromJSON = ReferencesGet200ResponseFromJSON;
|
|
31
|
+
function ReferencesGet200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if ((json === undefined) || (json === null)) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'items': !(0, runtime_1.exists)(json, 'items') ? undefined : (json['items'].map(ReferenceTable_1.ReferenceTableFromJSON)),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
exports.ReferencesGet200ResponseFromJSONTyped = ReferencesGet200ResponseFromJSONTyped;
|
|
40
|
+
function ReferencesGet200ResponseToJSON(value) {
|
|
41
|
+
if (value === undefined) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (value === null) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'items': value.items === undefined ? undefined : (value.items.map(ReferenceTable_1.ReferenceTableToJSON)),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
exports.ReferencesGet200ResponseToJSON = ReferencesGet200ResponseToJSON;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MDS API
|
|
6
|
+
* Please note the following definitions used throughout this API.<p> **Source**: A source can be any kind of marketplace (exchange) or an entity that calculates prices/values for instruments. <p> **Instrument**: An instrument is e.g. a stock, a bond, an index, a currency-pair or a specific future/option contract. An instrument is identified by an InstrumentId. Some information in MDS is linked to instruments: Masterdata (names, instrument types, ...), Fundamental stock data, News, ... <p> **Listing**: An instrument can be traded/calculated on multiple Sources. Some sources even support multiple listings of the same instrument (for example in different currencies). A listing is identified by a MarketstateId. Most information in MDS is linked to listings: Marketstate (prices/quotes), Tickdata (price/quote history), Performance data, ... <p> **Instrument** **vs** **Listing**: The Microsoft stock is an Instrument identified by the InstrumentId \"US5949181045\". It is listed and traded on many exchanges. Each of these Listings is identified by a unique MarketstateId, i.e. \"US5949181045@GAT\" (listing on Tradegate) or \"US5949181045,USD@SIX\" (USD-listing on SIX) or \"US5949181045,CHF@SIX\" (CHF-listing on SIX). **Marketstate** defines the current state of an instrument listed on a source. In our case besides open, close, post and pre market also latest trade und quote informations ... **MarketstateQuery**: When you request a price/quote in MDS, you have to select the Listing(s) you wish to receive them for. Most API calls use a MarketstateQuery as a parameter to express a filter for one or more Marketstates. The query often takes the form of \"DE0007100000@ETR\" and can also utilize wildcards like \"*\" or \"?\". See here for a full specification <a href=\"#model-MarketstateQuery\">MarketstateQuery</a> **Timestamps**: Most events covered in MDS have a known instant they refer to. A trade on an exchange usually has an exact time when it was executed. However depending on Source and context some events can refer to a whole trading day without specifying a time of day. E.g. ECB currency rates are determined for the whole day. In other cases an exact time is not part of the licensed data, e.g. when looking at the end-of-day quality of some exchanges. If an exact time is known, this is transmitted in a field \"datetime\". If only a date is given the field \"date\" is used. I you see \"00:00:00.000\" in a datetime field, this actually means something happened exactly at midnight, it is not a a special value indicating \\\"no date available\\\". **SSE-NOTE**: Many endpoints support Server Sent Events (SSE) to get pushed updates. To receive SSE the client needs to request the content-type \"text/event-stream\" via the \"accept\" http request-header. <br>Unfortunately the swagger-ui does not support SSE! To test SSE on an endpoint use the curl command shown in the snapshot response and modify the \"accept\" http request-header as described above.<p> **CURL-NOTE**: When use curl use the option -i to see the response headers. If the return status is 401 then you have to reauthorize. Otherwise you do not see whether the token is expired and wondering that there is no response.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.9
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ResolutionToJSON = exports.ResolutionFromJSONTyped = exports.ResolutionFromJSON = exports.Resolution = void 0;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
exports.Resolution = {
|
|
22
|
+
_1M: '1M',
|
|
23
|
+
_5M: '5M',
|
|
24
|
+
_15M: '15M',
|
|
25
|
+
_1H: '1H',
|
|
26
|
+
_1D: '1D',
|
|
27
|
+
_1W: '1W',
|
|
28
|
+
_3Mo: '3MO',
|
|
29
|
+
_1Y: '1Y'
|
|
30
|
+
};
|
|
31
|
+
function ResolutionFromJSON(json) {
|
|
32
|
+
return ResolutionFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
exports.ResolutionFromJSON = ResolutionFromJSON;
|
|
35
|
+
function ResolutionFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
exports.ResolutionFromJSONTyped = ResolutionFromJSONTyped;
|
|
39
|
+
function ResolutionToJSON(value) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
exports.ResolutionToJSON = ResolutionToJSON;
|
|
@@ -32,6 +32,7 @@ function WebSocketCommandListInstrumentListingsFromJSONTyped(json, ignoreDiscrim
|
|
|
32
32
|
return json;
|
|
33
33
|
}
|
|
34
34
|
return {
|
|
35
|
+
'sourceId': !(0, runtime_1.exists)(json, 'sourceId') ? undefined : json['sourceId'],
|
|
35
36
|
'instrumentId': !(0, runtime_1.exists)(json, 'instrumentId') ? undefined : json['instrumentId'],
|
|
36
37
|
};
|
|
37
38
|
}
|
|
@@ -44,6 +45,7 @@ function WebSocketCommandListInstrumentListingsToJSON(value) {
|
|
|
44
45
|
return null;
|
|
45
46
|
}
|
|
46
47
|
return {
|
|
48
|
+
'sourceId': value.sourceId,
|
|
47
49
|
'instrumentId': value.instrumentId,
|
|
48
50
|
};
|
|
49
51
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MDS API
|
|
6
|
+
* Please note the following definitions used throughout this API.<p> **Source**: A source can be any kind of marketplace (exchange) or an entity that calculates prices/values for instruments. <p> **Instrument**: An instrument is e.g. a stock, a bond, an index, a currency-pair or a specific future/option contract. An instrument is identified by an InstrumentId. Some information in MDS is linked to instruments: Masterdata (names, instrument types, ...), Fundamental stock data, News, ... <p> **Listing**: An instrument can be traded/calculated on multiple Sources. Some sources even support multiple listings of the same instrument (for example in different currencies). A listing is identified by a MarketstateId. Most information in MDS is linked to listings: Marketstate (prices/quotes), Tickdata (price/quote history), Performance data, ... <p> **Instrument** **vs** **Listing**: The Microsoft stock is an Instrument identified by the InstrumentId \"US5949181045\". It is listed and traded on many exchanges. Each of these Listings is identified by a unique MarketstateId, i.e. \"US5949181045@GAT\" (listing on Tradegate) or \"US5949181045,USD@SIX\" (USD-listing on SIX) or \"US5949181045,CHF@SIX\" (CHF-listing on SIX). **Marketstate** defines the current state of an instrument listed on a source. In our case besides open, close, post and pre market also latest trade und quote informations ... **MarketstateQuery**: When you request a price/quote in MDS, you have to select the Listing(s) you wish to receive them for. Most API calls use a MarketstateQuery as a parameter to express a filter for one or more Marketstates. The query often takes the form of \"DE0007100000@ETR\" and can also utilize wildcards like \"*\" or \"?\". See here for a full specification <a href=\"#model-MarketstateQuery\">MarketstateQuery</a> **Timestamps**: Most events covered in MDS have a known instant they refer to. A trade on an exchange usually has an exact time when it was executed. However depending on Source and context some events can refer to a whole trading day without specifying a time of day. E.g. ECB currency rates are determined for the whole day. In other cases an exact time is not part of the licensed data, e.g. when looking at the end-of-day quality of some exchanges. If an exact time is known, this is transmitted in a field \"datetime\". If only a date is given the field \"date\" is used. I you see \"00:00:00.000\" in a datetime field, this actually means something happened exactly at midnight, it is not a a special value indicating \\\"no date available\\\". **SSE-NOTE**: Many endpoints support Server Sent Events (SSE) to get pushed updates. To receive SSE the client needs to request the content-type \"text/event-stream\" via the \"accept\" http request-header. <br>Unfortunately the swagger-ui does not support SSE! To test SSE on an endpoint use the curl command shown in the snapshot response and modify the \"accept\" http request-header as described above.<p> **CURL-NOTE**: When use curl use the option -i to see the response headers. If the return status is 401 then you have to reauthorize. Otherwise you do not see whether the token is expired and wondering that there is no response.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.9
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.WebSocketCommandListTimeseriesToJSON = exports.WebSocketCommandListTimeseriesFromJSONTyped = exports.WebSocketCommandListTimeseriesFromJSON = exports.instanceOfWebSocketCommandListTimeseries = void 0;
|
|
17
|
+
const runtime_1 = require("../runtime");
|
|
18
|
+
const Quality_1 = require("./Quality");
|
|
19
|
+
const Resolution_1 = require("./Resolution");
|
|
20
|
+
/**
|
|
21
|
+
* Check if a given object implements the WebSocketCommandListTimeseries interface.
|
|
22
|
+
*/
|
|
23
|
+
function instanceOfWebSocketCommandListTimeseries(value) {
|
|
24
|
+
let isInstance = true;
|
|
25
|
+
return isInstance;
|
|
26
|
+
}
|
|
27
|
+
exports.instanceOfWebSocketCommandListTimeseries = instanceOfWebSocketCommandListTimeseries;
|
|
28
|
+
function WebSocketCommandListTimeseriesFromJSON(json) {
|
|
29
|
+
return WebSocketCommandListTimeseriesFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
exports.WebSocketCommandListTimeseriesFromJSON = WebSocketCommandListTimeseriesFromJSON;
|
|
32
|
+
function WebSocketCommandListTimeseriesFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if ((json === undefined) || (json === null)) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'marketstateId': !(0, runtime_1.exists)(json, 'marketstateId') ? undefined : json['marketstateId'],
|
|
38
|
+
'quality': !(0, runtime_1.exists)(json, 'quality') ? undefined : (0, Quality_1.QualityFromJSON)(json['quality']),
|
|
39
|
+
'cleanSplits': !(0, runtime_1.exists)(json, 'cleanSplits') ? undefined : json['cleanSplits'],
|
|
40
|
+
'cleanDividends': !(0, runtime_1.exists)(json, 'cleanDividends') ? undefined : json['cleanDividends'],
|
|
41
|
+
'cleanDistributions': !(0, runtime_1.exists)(json, 'cleanDistributions') ? undefined : json['cleanDistributions'],
|
|
42
|
+
'cleanSubscriptions': !(0, runtime_1.exists)(json, 'cleanSubscriptions') ? undefined : json['cleanSubscriptions'],
|
|
43
|
+
'start': !(0, runtime_1.exists)(json, 'start') ? undefined : json['start'],
|
|
44
|
+
'end': !(0, runtime_1.exists)(json, 'end') ? undefined : json['end'],
|
|
45
|
+
'resolution': !(0, runtime_1.exists)(json, 'resolution') ? undefined : (0, Resolution_1.ResolutionFromJSON)(json['resolution']),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
exports.WebSocketCommandListTimeseriesFromJSONTyped = WebSocketCommandListTimeseriesFromJSONTyped;
|
|
49
|
+
function WebSocketCommandListTimeseriesToJSON(value) {
|
|
50
|
+
if (value === undefined) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
if (value === null) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'marketstateId': value.marketstateId,
|
|
58
|
+
'quality': (0, Quality_1.QualityToJSON)(value.quality),
|
|
59
|
+
'cleanSplits': value.cleanSplits,
|
|
60
|
+
'cleanDividends': value.cleanDividends,
|
|
61
|
+
'cleanDistributions': value.cleanDistributions,
|
|
62
|
+
'cleanSubscriptions': value.cleanSubscriptions,
|
|
63
|
+
'start': value.start,
|
|
64
|
+
'end': value.end,
|
|
65
|
+
'resolution': (0, Resolution_1.ResolutionToJSON)(value.resolution),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
exports.WebSocketCommandListTimeseriesToJSON = WebSocketCommandListTimeseriesToJSON;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MDS API
|
|
6
|
+
* Please note the following definitions used throughout this API.<p> **Source**: A source can be any kind of marketplace (exchange) or an entity that calculates prices/values for instruments. <p> **Instrument**: An instrument is e.g. a stock, a bond, an index, a currency-pair or a specific future/option contract. An instrument is identified by an InstrumentId. Some information in MDS is linked to instruments: Masterdata (names, instrument types, ...), Fundamental stock data, News, ... <p> **Listing**: An instrument can be traded/calculated on multiple Sources. Some sources even support multiple listings of the same instrument (for example in different currencies). A listing is identified by a MarketstateId. Most information in MDS is linked to listings: Marketstate (prices/quotes), Tickdata (price/quote history), Performance data, ... <p> **Instrument** **vs** **Listing**: The Microsoft stock is an Instrument identified by the InstrumentId \"US5949181045\". It is listed and traded on many exchanges. Each of these Listings is identified by a unique MarketstateId, i.e. \"US5949181045@GAT\" (listing on Tradegate) or \"US5949181045,USD@SIX\" (USD-listing on SIX) or \"US5949181045,CHF@SIX\" (CHF-listing on SIX). **Marketstate** defines the current state of an instrument listed on a source. In our case besides open, close, post and pre market also latest trade und quote informations ... **MarketstateQuery**: When you request a price/quote in MDS, you have to select the Listing(s) you wish to receive them for. Most API calls use a MarketstateQuery as a parameter to express a filter for one or more Marketstates. The query often takes the form of \"DE0007100000@ETR\" and can also utilize wildcards like \"*\" or \"?\". See here for a full specification <a href=\"#model-MarketstateQuery\">MarketstateQuery</a> **Timestamps**: Most events covered in MDS have a known instant they refer to. A trade on an exchange usually has an exact time when it was executed. However depending on Source and context some events can refer to a whole trading day without specifying a time of day. E.g. ECB currency rates are determined for the whole day. In other cases an exact time is not part of the licensed data, e.g. when looking at the end-of-day quality of some exchanges. If an exact time is known, this is transmitted in a field \"datetime\". If only a date is given the field \"date\" is used. I you see \"00:00:00.000\" in a datetime field, this actually means something happened exactly at midnight, it is not a a special value indicating \\\"no date available\\\". **SSE-NOTE**: Many endpoints support Server Sent Events (SSE) to get pushed updates. To receive SSE the client needs to request the content-type \"text/event-stream\" via the \"accept\" http request-header. <br>Unfortunately the swagger-ui does not support SSE! To test SSE on an endpoint use the curl command shown in the snapshot response and modify the \"accept\" http request-header as described above.<p> **CURL-NOTE**: When use curl use the option -i to see the response headers. If the return status is 401 then you have to reauthorize. Otherwise you do not see whether the token is expired and wondering that there is no response.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.9
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.WebSocketCommandSubscribeTimeseriesToJSON = exports.WebSocketCommandSubscribeTimeseriesFromJSONTyped = exports.WebSocketCommandSubscribeTimeseriesFromJSON = exports.instanceOfWebSocketCommandSubscribeTimeseries = void 0;
|
|
17
|
+
const runtime_1 = require("../runtime");
|
|
18
|
+
const Quality_1 = require("./Quality");
|
|
19
|
+
const Resolution_1 = require("./Resolution");
|
|
20
|
+
/**
|
|
21
|
+
* Check if a given object implements the WebSocketCommandSubscribeTimeseries interface.
|
|
22
|
+
*/
|
|
23
|
+
function instanceOfWebSocketCommandSubscribeTimeseries(value) {
|
|
24
|
+
let isInstance = true;
|
|
25
|
+
return isInstance;
|
|
26
|
+
}
|
|
27
|
+
exports.instanceOfWebSocketCommandSubscribeTimeseries = instanceOfWebSocketCommandSubscribeTimeseries;
|
|
28
|
+
function WebSocketCommandSubscribeTimeseriesFromJSON(json) {
|
|
29
|
+
return WebSocketCommandSubscribeTimeseriesFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
exports.WebSocketCommandSubscribeTimeseriesFromJSON = WebSocketCommandSubscribeTimeseriesFromJSON;
|
|
32
|
+
function WebSocketCommandSubscribeTimeseriesFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if ((json === undefined) || (json === null)) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'marketstateId': !(0, runtime_1.exists)(json, 'marketstateId') ? undefined : json['marketstateId'],
|
|
38
|
+
'quality': !(0, runtime_1.exists)(json, 'quality') ? undefined : (0, Quality_1.QualityFromJSON)(json['quality']),
|
|
39
|
+
'cleanSplits': !(0, runtime_1.exists)(json, 'cleanSplits') ? undefined : json['cleanSplits'],
|
|
40
|
+
'cleanDividends': !(0, runtime_1.exists)(json, 'cleanDividends') ? undefined : json['cleanDividends'],
|
|
41
|
+
'cleanDistributions': !(0, runtime_1.exists)(json, 'cleanDistributions') ? undefined : json['cleanDistributions'],
|
|
42
|
+
'cleanSubscriptions': !(0, runtime_1.exists)(json, 'cleanSubscriptions') ? undefined : json['cleanSubscriptions'],
|
|
43
|
+
'start': !(0, runtime_1.exists)(json, 'start') ? undefined : json['start'],
|
|
44
|
+
'end': !(0, runtime_1.exists)(json, 'end') ? undefined : json['end'],
|
|
45
|
+
'resolution': !(0, runtime_1.exists)(json, 'resolution') ? undefined : (0, Resolution_1.ResolutionFromJSON)(json['resolution']),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
exports.WebSocketCommandSubscribeTimeseriesFromJSONTyped = WebSocketCommandSubscribeTimeseriesFromJSONTyped;
|
|
49
|
+
function WebSocketCommandSubscribeTimeseriesToJSON(value) {
|
|
50
|
+
if (value === undefined) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
if (value === null) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'marketstateId': value.marketstateId,
|
|
58
|
+
'quality': (0, Quality_1.QualityToJSON)(value.quality),
|
|
59
|
+
'cleanSplits': value.cleanSplits,
|
|
60
|
+
'cleanDividends': value.cleanDividends,
|
|
61
|
+
'cleanDistributions': value.cleanDistributions,
|
|
62
|
+
'cleanSubscriptions': value.cleanSubscriptions,
|
|
63
|
+
'start': value.start,
|
|
64
|
+
'end': value.end,
|
|
65
|
+
'resolution': (0, Resolution_1.ResolutionToJSON)(value.resolution),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
exports.WebSocketCommandSubscribeTimeseriesToJSON = WebSocketCommandSubscribeTimeseriesToJSON;
|
|
@@ -23,10 +23,12 @@ const WebSocketCommandGetTradingtime_1 = require("./WebSocketCommandGetTradingti
|
|
|
23
23
|
const WebSocketCommandGetTradingtimeAnalysis_1 = require("./WebSocketCommandGetTradingtimeAnalysis");
|
|
24
24
|
const WebSocketCommandHeartbeat_1 = require("./WebSocketCommandHeartbeat");
|
|
25
25
|
const WebSocketCommandListInstrumentListings_1 = require("./WebSocketCommandListInstrumentListings");
|
|
26
|
+
const WebSocketCommandListTimeseries_1 = require("./WebSocketCommandListTimeseries");
|
|
26
27
|
const WebSocketCommandPriority_1 = require("./WebSocketCommandPriority");
|
|
27
28
|
const WebSocketCommandSubscribeListTopflop_1 = require("./WebSocketCommandSubscribeListTopflop");
|
|
28
29
|
const WebSocketCommandSubscribeMarketstates_1 = require("./WebSocketCommandSubscribeMarketstates");
|
|
29
30
|
const WebSocketCommandSubscribeSourceTradeticker_1 = require("./WebSocketCommandSubscribeSourceTradeticker");
|
|
31
|
+
const WebSocketCommandSubscribeTimeseries_1 = require("./WebSocketCommandSubscribeTimeseries");
|
|
30
32
|
/**
|
|
31
33
|
* Check if a given object implements the WebSocketRequest interface.
|
|
32
34
|
*/
|
|
@@ -52,6 +54,8 @@ function WebSocketRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
52
54
|
'subscribeAuthentication': !(0, runtime_1.exists)(json, 'subscribeAuthentication') ? undefined : (0, WebSocketCommandAuthenticate_1.WebSocketCommandAuthenticateFromJSON)(json['subscribeAuthentication']),
|
|
53
55
|
'subscribeMarketstates': !(0, runtime_1.exists)(json, 'subscribeMarketstates') ? undefined : (0, WebSocketCommandSubscribeMarketstates_1.WebSocketCommandSubscribeMarketstatesFromJSON)(json['subscribeMarketstates']),
|
|
54
56
|
'listInstrumentListings': !(0, runtime_1.exists)(json, 'listInstrumentListings') ? undefined : (0, WebSocketCommandListInstrumentListings_1.WebSocketCommandListInstrumentListingsFromJSON)(json['listInstrumentListings']),
|
|
57
|
+
'listTimeseries': !(0, runtime_1.exists)(json, 'listTimeseries') ? undefined : (0, WebSocketCommandListTimeseries_1.WebSocketCommandListTimeseriesFromJSON)(json['listTimeseries']),
|
|
58
|
+
'subscribeTimeseries': !(0, runtime_1.exists)(json, 'subscribeTimeseries') ? undefined : (0, WebSocketCommandSubscribeTimeseries_1.WebSocketCommandSubscribeTimeseriesFromJSON)(json['subscribeTimeseries']),
|
|
55
59
|
'getInstrumentMasterdata': !(0, runtime_1.exists)(json, 'getInstrumentMasterdata') ? undefined : (0, WebSocketCommandGetInstrumentMasterdata_1.WebSocketCommandGetInstrumentMasterdataFromJSON)(json['getInstrumentMasterdata']),
|
|
56
60
|
'getSource': !(0, runtime_1.exists)(json, 'getSource') ? undefined : (0, WebSocketCommandGetSource_1.WebSocketCommandGetSourceFromJSON)(json['getSource']),
|
|
57
61
|
'getTradingtime': !(0, runtime_1.exists)(json, 'getTradingtime') ? undefined : (0, WebSocketCommandGetTradingtime_1.WebSocketCommandGetTradingtimeFromJSON)(json['getTradingtime']),
|
|
@@ -77,6 +81,8 @@ function WebSocketRequestToJSON(value) {
|
|
|
77
81
|
'subscribeAuthentication': (0, WebSocketCommandAuthenticate_1.WebSocketCommandAuthenticateToJSON)(value.subscribeAuthentication),
|
|
78
82
|
'subscribeMarketstates': (0, WebSocketCommandSubscribeMarketstates_1.WebSocketCommandSubscribeMarketstatesToJSON)(value.subscribeMarketstates),
|
|
79
83
|
'listInstrumentListings': (0, WebSocketCommandListInstrumentListings_1.WebSocketCommandListInstrumentListingsToJSON)(value.listInstrumentListings),
|
|
84
|
+
'listTimeseries': (0, WebSocketCommandListTimeseries_1.WebSocketCommandListTimeseriesToJSON)(value.listTimeseries),
|
|
85
|
+
'subscribeTimeseries': (0, WebSocketCommandSubscribeTimeseries_1.WebSocketCommandSubscribeTimeseriesToJSON)(value.subscribeTimeseries),
|
|
80
86
|
'getInstrumentMasterdata': (0, WebSocketCommandGetInstrumentMasterdata_1.WebSocketCommandGetInstrumentMasterdataToJSON)(value.getInstrumentMasterdata),
|
|
81
87
|
'getSource': (0, WebSocketCommandGetSource_1.WebSocketCommandGetSourceToJSON)(value.getSource),
|
|
82
88
|
'getTradingtime': (0, WebSocketCommandGetTradingtime_1.WebSocketCommandGetTradingtimeToJSON)(value.getTradingtime),
|
package/lib/cjs/models/index.js
CHANGED
|
@@ -85,6 +85,10 @@ __exportStar(require("./PerformanceDataAllOf"), exports);
|
|
|
85
85
|
__exportStar(require("./PerformanceDataForTimeRange"), exports);
|
|
86
86
|
__exportStar(require("./Quality"), exports);
|
|
87
87
|
__exportStar(require("./QuotationType"), exports);
|
|
88
|
+
__exportStar(require("./ReferenceOption"), exports);
|
|
89
|
+
__exportStar(require("./ReferenceTable"), exports);
|
|
90
|
+
__exportStar(require("./ReferencesGet200Response"), exports);
|
|
91
|
+
__exportStar(require("./Resolution"), exports);
|
|
88
92
|
__exportStar(require("./SomethingWithOfficialSymbols"), exports);
|
|
89
93
|
__exportStar(require("./Sourcedata"), exports);
|
|
90
94
|
__exportStar(require("./SourcesGet200Response"), exports);
|
|
@@ -122,9 +126,11 @@ __exportStar(require("./WebSocketCommandGetTradingtime"), exports);
|
|
|
122
126
|
__exportStar(require("./WebSocketCommandGetTradingtimeAnalysis"), exports);
|
|
123
127
|
__exportStar(require("./WebSocketCommandHeartbeat"), exports);
|
|
124
128
|
__exportStar(require("./WebSocketCommandListInstrumentListings"), exports);
|
|
129
|
+
__exportStar(require("./WebSocketCommandListTimeseries"), exports);
|
|
125
130
|
__exportStar(require("./WebSocketCommandPriority"), exports);
|
|
126
131
|
__exportStar(require("./WebSocketCommandSubscribeListTopflop"), exports);
|
|
127
132
|
__exportStar(require("./WebSocketCommandSubscribeMarketstates"), exports);
|
|
128
133
|
__exportStar(require("./WebSocketCommandSubscribeSourceTradeticker"), exports);
|
|
134
|
+
__exportStar(require("./WebSocketCommandSubscribeTimeseries"), exports);
|
|
129
135
|
__exportStar(require("./WebSocketMessage"), exports);
|
|
130
136
|
__exportStar(require("./WebSocketRequest"), exports);
|