@brokerize/client 1.10.0 → 1.12.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 +45 -0
- package/dist/apiCtx.d.ts +10 -2
- package/dist/apiCtx.js +4 -4
- package/dist/authorizedApiContext.d.ts +5 -0
- package/dist/authorizedApiContext.js +12 -4
- package/dist/cjs/apiCtx.d.ts +10 -2
- package/dist/cjs/apiCtx.js +4 -4
- package/dist/cjs/authorizedApiContext.d.ts +5 -0
- package/dist/cjs/authorizedApiContext.js +11 -3
- package/dist/cjs/errors.d.ts +74 -0
- package/dist/cjs/errors.js +95 -1
- package/dist/cjs/index.d.ts +4 -4
- package/dist/cjs/index.js +6 -4
- package/dist/cjs/modelExports.d.ts +3 -0
- package/dist/cjs/modelExports.js +5 -1
- package/dist/cjs/swagger/models/BrokerClientCfg.d.ts +7 -0
- package/dist/cjs/swagger/models/BrokerClientCfg.js +5 -0
- package/dist/cjs/swagger/models/BrokerMeta.d.ts +15 -0
- package/dist/cjs/swagger/models/BrokerMeta.js +2 -0
- package/dist/cjs/swagger/models/ClientConfigUpdateOAuthLoginForm.d.ts +12 -1
- package/dist/cjs/swagger/models/ClientConfigUpdateOAuthLoginForm.js +2 -0
- package/dist/cjs/swagger/models/OAuthLoginFormConfig.d.ts +12 -1
- package/dist/cjs/swagger/models/OAuthLoginFormConfig.js +2 -0
- package/dist/cjs/swagger/models/Order.d.ts +9 -1
- package/dist/cjs/swagger/models/OrderCreate.d.ts +2 -1
- package/dist/cjs/swagger/models/PortfolioOrderDetailsSyncInfo.d.ts +60 -0
- package/dist/cjs/swagger/models/PortfolioOrderDetailsSyncInfo.js +51 -0
- package/dist/cjs/swagger/models/PortfolioOrderDetailsSyncInfoStatus.d.ts +22 -0
- package/dist/cjs/swagger/models/PortfolioOrderDetailsSyncInfoStatus.js +35 -0
- package/dist/cjs/swagger/models/PortfolioSyncInfoComplete.d.ts +7 -0
- package/dist/cjs/swagger/models/PortfolioSyncInfoComplete.js +6 -0
- package/dist/cjs/swagger/models/PortfolioSyncInfoCompleteSpecifics.d.ts +7 -0
- package/dist/cjs/swagger/models/PortfolioSyncInfoCompleteSpecifics.js +5 -0
- package/dist/cjs/swagger/models/PortfolioSyncInfoIncomplete.d.ts +7 -0
- package/dist/cjs/swagger/models/PortfolioSyncInfoIncomplete.js +6 -0
- package/dist/cjs/swagger/models/PortfolioSyncInfoIncompleteSpecifics.d.ts +7 -0
- package/dist/cjs/swagger/models/PortfolioSyncInfoIncompleteSpecifics.js +5 -0
- package/dist/cjs/swagger/models/SmartbrokerClientCfg.d.ts +27 -0
- package/dist/cjs/swagger/models/SmartbrokerClientCfg.js +46 -0
- package/dist/cjs/swagger/models/SummarizedTrade.d.ts +14 -0
- package/dist/cjs/swagger/models/SummarizedTrade.js +4 -0
- package/dist/cjs/swagger/models/TradeWarning.d.ts +31 -1
- package/dist/cjs/swagger/models/TradeWarning.js +13 -0
- package/dist/cjs/swagger/models/TradeWarningReason.d.ts +46 -0
- package/dist/cjs/swagger/models/TradeWarningReason.js +59 -0
- package/dist/cjs/swagger/models/index.d.ts +4 -0
- package/dist/cjs/swagger/models/index.js +4 -0
- package/dist/cjs/websocketClient.d.ts +109 -2
- package/dist/cjs/websocketClient.js +416 -74
- package/dist/cjs/websocketTypes.d.ts +10 -0
- package/dist/client.d.ts +437 -61
- package/dist/errors.d.ts +74 -0
- package/dist/errors.js +89 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -5
- package/dist/modelExports.d.ts +3 -0
- package/dist/modelExports.js +2 -0
- package/dist/swagger/models/BrokerClientCfg.d.ts +7 -0
- package/dist/swagger/models/BrokerClientCfg.js +5 -0
- package/dist/swagger/models/BrokerMeta.d.ts +15 -0
- package/dist/swagger/models/BrokerMeta.js +2 -0
- package/dist/swagger/models/ClientConfigUpdateOAuthLoginForm.d.ts +12 -1
- package/dist/swagger/models/ClientConfigUpdateOAuthLoginForm.js +2 -0
- package/dist/swagger/models/OAuthLoginFormConfig.d.ts +12 -1
- package/dist/swagger/models/OAuthLoginFormConfig.js +2 -0
- package/dist/swagger/models/Order.d.ts +9 -1
- package/dist/swagger/models/OrderCreate.d.ts +2 -1
- package/dist/swagger/models/PortfolioOrderDetailsSyncInfo.d.ts +60 -0
- package/dist/swagger/models/PortfolioOrderDetailsSyncInfo.js +45 -0
- package/dist/swagger/models/PortfolioOrderDetailsSyncInfoStatus.d.ts +22 -0
- package/dist/swagger/models/PortfolioOrderDetailsSyncInfoStatus.js +29 -0
- package/dist/swagger/models/PortfolioSyncInfoComplete.d.ts +7 -0
- package/dist/swagger/models/PortfolioSyncInfoComplete.js +6 -0
- package/dist/swagger/models/PortfolioSyncInfoCompleteSpecifics.d.ts +7 -0
- package/dist/swagger/models/PortfolioSyncInfoCompleteSpecifics.js +5 -0
- package/dist/swagger/models/PortfolioSyncInfoIncomplete.d.ts +7 -0
- package/dist/swagger/models/PortfolioSyncInfoIncomplete.js +6 -0
- package/dist/swagger/models/PortfolioSyncInfoIncompleteSpecifics.d.ts +7 -0
- package/dist/swagger/models/PortfolioSyncInfoIncompleteSpecifics.js +5 -0
- package/dist/swagger/models/SmartbrokerClientCfg.d.ts +27 -0
- package/dist/swagger/models/SmartbrokerClientCfg.js +40 -0
- package/dist/swagger/models/SummarizedTrade.d.ts +14 -0
- package/dist/swagger/models/SummarizedTrade.js +4 -0
- package/dist/swagger/models/TradeWarning.d.ts +31 -1
- package/dist/swagger/models/TradeWarning.js +13 -0
- package/dist/swagger/models/TradeWarningReason.d.ts +46 -0
- package/dist/swagger/models/TradeWarningReason.js +53 -0
- package/dist/swagger/models/index.d.ts +4 -0
- package/dist/swagger/models/index.js +4 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/websocketClient.d.ts +109 -2
- package/dist/websocketClient.js +416 -74
- package/dist/websocketTypes.d.ts +10 -0
- package/package.json +11 -10
|
@@ -38,6 +38,7 @@ function BrokerMetaFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
38
38
|
loginForm: !(0, runtime_1.exists)(json, "loginForm")
|
|
39
39
|
? undefined
|
|
40
40
|
: (0, BrokerLoginForm_1.BrokerLoginFormFromJSON)(json["loginForm"]),
|
|
41
|
+
supportedExchangeIds: json["supportedExchangeIds"],
|
|
41
42
|
supportsOAuthLogin: !(0, runtime_1.exists)(json, "supportsOAuthLogin")
|
|
42
43
|
? undefined
|
|
43
44
|
: json["supportsOAuthLogin"],
|
|
@@ -58,6 +59,7 @@ function BrokerMetaToJSONRecursive(value, ignoreParent = false) {
|
|
|
58
59
|
features: (0, BrokerMetaFeatures_1.BrokerMetaFeaturesToJSON)(value.features),
|
|
59
60
|
images: (0, BrokerMetaImages_1.BrokerMetaImagesToJSON)(value.images),
|
|
60
61
|
loginForm: (0, BrokerLoginForm_1.BrokerLoginFormToJSON)(value.loginForm),
|
|
62
|
+
supportedExchangeIds: value.supportedExchangeIds,
|
|
61
63
|
supportsOAuthLogin: value.supportsOAuthLogin,
|
|
62
64
|
};
|
|
63
65
|
}
|
|
@@ -33,13 +33,22 @@ export interface ClientConfigUpdateOAuthLoginForm {
|
|
|
33
33
|
*/
|
|
34
34
|
logoUrlLight?: string;
|
|
35
35
|
/**
|
|
36
|
+
* How the browser is sent back to the `returnTo` URL after a successful broker login.
|
|
36
37
|
*
|
|
38
|
+
* `meta`, `js` and `link` render the interstitial callback screen and redirect from there (via a
|
|
39
|
+
* meta refresh, via JavaScript, or by revealing a link the user clicks). `http` skips the screen
|
|
40
|
+
* and answers the callback with a plain HTTP 302 instead.
|
|
41
|
+
*
|
|
42
|
+
* `http` only applies to `http`/`https` `returnTo` URLs. A `returnTo` in a custom app scheme
|
|
43
|
+
* still gets the interstitial, because browsers handle a 302 into an app scheme inconsistently.
|
|
44
|
+
*
|
|
45
|
+
* Default is `meta`.
|
|
37
46
|
* @type {string}
|
|
38
47
|
* @memberof ClientConfigUpdateOAuthLoginForm
|
|
39
48
|
*/
|
|
40
49
|
redirectStyle?: ClientConfigUpdateOAuthLoginFormRedirectStyleEnum;
|
|
41
50
|
/**
|
|
42
|
-
*
|
|
51
|
+
* Overrides `redirectStyle` for logins at bitpanda.
|
|
43
52
|
* @type {string}
|
|
44
53
|
* @memberof ClientConfigUpdateOAuthLoginForm
|
|
45
54
|
*/
|
|
@@ -52,6 +61,7 @@ export declare const ClientConfigUpdateOAuthLoginFormRedirectStyleEnum: {
|
|
|
52
61
|
readonly Meta: "meta";
|
|
53
62
|
readonly Js: "js";
|
|
54
63
|
readonly Link: "link";
|
|
64
|
+
readonly Http: "http";
|
|
55
65
|
};
|
|
56
66
|
export type ClientConfigUpdateOAuthLoginFormRedirectStyleEnum = (typeof ClientConfigUpdateOAuthLoginFormRedirectStyleEnum)[keyof typeof ClientConfigUpdateOAuthLoginFormRedirectStyleEnum];
|
|
57
67
|
/**
|
|
@@ -61,6 +71,7 @@ export declare const ClientConfigUpdateOAuthLoginFormRedirectStyleBitpandaEnum:
|
|
|
61
71
|
readonly Meta: "meta";
|
|
62
72
|
readonly Js: "js";
|
|
63
73
|
readonly Link: "link";
|
|
74
|
+
readonly Http: "http";
|
|
64
75
|
};
|
|
65
76
|
export type ClientConfigUpdateOAuthLoginFormRedirectStyleBitpandaEnum = (typeof ClientConfigUpdateOAuthLoginFormRedirectStyleBitpandaEnum)[keyof typeof ClientConfigUpdateOAuthLoginFormRedirectStyleBitpandaEnum];
|
|
66
77
|
export declare function ClientConfigUpdateOAuthLoginFormFromJSON(json: any): ClientConfigUpdateOAuthLoginForm;
|
|
@@ -25,6 +25,7 @@ exports.ClientConfigUpdateOAuthLoginFormRedirectStyleEnum = {
|
|
|
25
25
|
Meta: "meta",
|
|
26
26
|
Js: "js",
|
|
27
27
|
Link: "link",
|
|
28
|
+
Http: "http",
|
|
28
29
|
};
|
|
29
30
|
/**
|
|
30
31
|
* @export
|
|
@@ -33,6 +34,7 @@ exports.ClientConfigUpdateOAuthLoginFormRedirectStyleBitpandaEnum = {
|
|
|
33
34
|
Meta: "meta",
|
|
34
35
|
Js: "js",
|
|
35
36
|
Link: "link",
|
|
37
|
+
Http: "http",
|
|
36
38
|
};
|
|
37
39
|
function ClientConfigUpdateOAuthLoginFormFromJSON(json) {
|
|
38
40
|
return ClientConfigUpdateOAuthLoginFormFromJSONTyped(json, false);
|
|
@@ -33,13 +33,22 @@ export interface OAuthLoginFormConfig {
|
|
|
33
33
|
*/
|
|
34
34
|
logoUrlLight?: string;
|
|
35
35
|
/**
|
|
36
|
+
* How the browser is sent back to the `returnTo` URL after a successful broker login.
|
|
36
37
|
*
|
|
38
|
+
* `meta`, `js` and `link` render the interstitial callback screen and redirect from there (via a
|
|
39
|
+
* meta refresh, via JavaScript, or by revealing a link the user clicks). `http` skips the screen
|
|
40
|
+
* and answers the callback with a plain HTTP 302 instead.
|
|
41
|
+
*
|
|
42
|
+
* `http` only applies to `http`/`https` `returnTo` URLs. A `returnTo` in a custom app scheme
|
|
43
|
+
* still gets the interstitial, because browsers handle a 302 into an app scheme inconsistently.
|
|
44
|
+
*
|
|
45
|
+
* Default is `meta`.
|
|
37
46
|
* @type {string}
|
|
38
47
|
* @memberof OAuthLoginFormConfig
|
|
39
48
|
*/
|
|
40
49
|
redirectStyle?: OAuthLoginFormConfigRedirectStyleEnum;
|
|
41
50
|
/**
|
|
42
|
-
*
|
|
51
|
+
* Overrides `redirectStyle` for logins at bitpanda.
|
|
43
52
|
* @type {string}
|
|
44
53
|
* @memberof OAuthLoginFormConfig
|
|
45
54
|
*/
|
|
@@ -52,6 +61,7 @@ export declare const OAuthLoginFormConfigRedirectStyleEnum: {
|
|
|
52
61
|
readonly Meta: "meta";
|
|
53
62
|
readonly Js: "js";
|
|
54
63
|
readonly Link: "link";
|
|
64
|
+
readonly Http: "http";
|
|
55
65
|
};
|
|
56
66
|
export type OAuthLoginFormConfigRedirectStyleEnum = (typeof OAuthLoginFormConfigRedirectStyleEnum)[keyof typeof OAuthLoginFormConfigRedirectStyleEnum];
|
|
57
67
|
/**
|
|
@@ -61,6 +71,7 @@ export declare const OAuthLoginFormConfigRedirectStyleBitpandaEnum: {
|
|
|
61
71
|
readonly Meta: "meta";
|
|
62
72
|
readonly Js: "js";
|
|
63
73
|
readonly Link: "link";
|
|
74
|
+
readonly Http: "http";
|
|
64
75
|
};
|
|
65
76
|
export type OAuthLoginFormConfigRedirectStyleBitpandaEnum = (typeof OAuthLoginFormConfigRedirectStyleBitpandaEnum)[keyof typeof OAuthLoginFormConfigRedirectStyleBitpandaEnum];
|
|
66
77
|
export declare function OAuthLoginFormConfigFromJSON(json: any): OAuthLoginFormConfig;
|
|
@@ -25,6 +25,7 @@ exports.OAuthLoginFormConfigRedirectStyleEnum = {
|
|
|
25
25
|
Meta: "meta",
|
|
26
26
|
Js: "js",
|
|
27
27
|
Link: "link",
|
|
28
|
+
Http: "http",
|
|
28
29
|
};
|
|
29
30
|
/**
|
|
30
31
|
* @export
|
|
@@ -33,6 +34,7 @@ exports.OAuthLoginFormConfigRedirectStyleBitpandaEnum = {
|
|
|
33
34
|
Meta: "meta",
|
|
34
35
|
Js: "js",
|
|
35
36
|
Link: "link",
|
|
37
|
+
Http: "http",
|
|
36
38
|
};
|
|
37
39
|
function OAuthLoginFormConfigFromJSON(json) {
|
|
38
40
|
return OAuthLoginFormConfigFromJSONTyped(json, false);
|
|
@@ -92,7 +92,14 @@ export interface Order {
|
|
|
92
92
|
*/
|
|
93
93
|
bondCurrencyIso?: string;
|
|
94
94
|
/**
|
|
95
|
+
* The id of the exchange, as defined by the *broker*.
|
|
95
96
|
*
|
|
97
|
+
* When reading an order this **can be an empty string**: not every order is traded on an exchange -- a securities
|
|
98
|
+
* account transfer, for example, is booked into or out of the custody account and has no trading venue, so the
|
|
99
|
+
* broker reports no exchange for it. Clients must handle the empty string.
|
|
100
|
+
*
|
|
101
|
+
* Note that this field will become optional in a future version of the API, so clients should not rely on it
|
|
102
|
+
* being present at all. For creating an order it stays required, see `OrderCreate`.
|
|
96
103
|
* @type {string}
|
|
97
104
|
* @memberof Order
|
|
98
105
|
*/
|
|
@@ -176,7 +183,8 @@ export interface Order {
|
|
|
176
183
|
*/
|
|
177
184
|
exchangeName?: string;
|
|
178
185
|
/**
|
|
179
|
-
* For
|
|
186
|
+
* For orders with at least one execution (`executed`, `open_executed`, `canceled_executed`):
|
|
187
|
+
* the timestamp of the *latest* execution.
|
|
180
188
|
* @type {Date}
|
|
181
189
|
* @memberof Order
|
|
182
190
|
*/
|
|
@@ -21,7 +21,8 @@ import { TrailingDistance } from "./TrailingDistance";
|
|
|
21
21
|
*/
|
|
22
22
|
export interface OrderCreate {
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* The id of the exchange, as defined by the *broker*. Always required to create an order, and never empty --
|
|
25
|
+
* unlike when reading an order, where the broker may report no exchange (see `OrderBase.brokerExchangeId`).
|
|
25
26
|
* @type {string}
|
|
26
27
|
* @memberof OrderCreate
|
|
27
28
|
*/
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brokerize
|
|
3
|
+
* The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
|
+
* https://openapi-generator.tech
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*/
|
|
11
|
+
import { PortfolioOrderDetailsSyncInfoStatus } from "./PortfolioOrderDetailsSyncInfoStatus";
|
|
12
|
+
/**
|
|
13
|
+
* Whether the *details* of the synced orders are already known — the executions, and with them the
|
|
14
|
+
* execution prices and the fees.
|
|
15
|
+
*
|
|
16
|
+
* This is a second, independent axis next to the sync status: a portfolio counts as `COMPLETE` as
|
|
17
|
+
* soon as every order has been loaded, but some brokers (flatex) report an order's executions only
|
|
18
|
+
* when that single order is fetched individually, which happens during the sync for recent orders
|
|
19
|
+
* only. The remaining ones are fetched in the background afterwards.
|
|
20
|
+
*
|
|
21
|
+
* It matters because every evaluation that reconstructs the past — the trade list, the trade
|
|
22
|
+
* statistics, the value history — is built from executions alone. An order whose details are still
|
|
23
|
+
* missing contributes nothing at all to them.
|
|
24
|
+
*
|
|
25
|
+
* Not reported on every endpoint; absent means "no statement", not "complete".
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PortfolioOrderDetailsSyncInfo
|
|
28
|
+
*/
|
|
29
|
+
export interface PortfolioOrderDetailsSyncInfo {
|
|
30
|
+
/**
|
|
31
|
+
* Set while `status` is `PENDING`, absent once it is `COMPLETE`.
|
|
32
|
+
*
|
|
33
|
+
* Evaluations are complete for everything that happened after this point in time; before it,
|
|
34
|
+
* executions may still be missing. It is the timestamp of the newest order whose details are
|
|
35
|
+
* still outstanding — and it is that order, not the oldest one, because the reconstruction is
|
|
36
|
+
* anchored at the current holdings and works backwards: a gap only affects what lies before it.
|
|
37
|
+
*
|
|
38
|
+
* The boundary moves backwards as the background fetch works through the backlog, newest first.
|
|
39
|
+
* It is not a progress bar for the *amount* that is still missing: details fetched out of order
|
|
40
|
+
* (a user opening an old order in the app fetches it right away) close a gap behind the
|
|
41
|
+
* boundary and leave it where it is.
|
|
42
|
+
*
|
|
43
|
+
* Caveat: for an order whose details are missing, the broker has usually only told us when it
|
|
44
|
+
* was *created*, not when it executed — an order that executed considerably later than it was
|
|
45
|
+
* created can therefore sit slightly after this boundary.
|
|
46
|
+
* @type {Date}
|
|
47
|
+
* @memberof PortfolioOrderDetailsSyncInfo
|
|
48
|
+
*/
|
|
49
|
+
completeFrom?: Date;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {PortfolioOrderDetailsSyncInfoStatus}
|
|
53
|
+
* @memberof PortfolioOrderDetailsSyncInfo
|
|
54
|
+
*/
|
|
55
|
+
status: PortfolioOrderDetailsSyncInfoStatus;
|
|
56
|
+
}
|
|
57
|
+
export declare function PortfolioOrderDetailsSyncInfoFromJSON(json: any): PortfolioOrderDetailsSyncInfo;
|
|
58
|
+
export declare function PortfolioOrderDetailsSyncInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortfolioOrderDetailsSyncInfo;
|
|
59
|
+
export declare function PortfolioOrderDetailsSyncInfoToJSONRecursive(value?: PortfolioOrderDetailsSyncInfo | null, ignoreParent?: boolean): any;
|
|
60
|
+
export declare function PortfolioOrderDetailsSyncInfoToJSON(value?: PortfolioOrderDetailsSyncInfo | null): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* brokerize
|
|
6
|
+
* The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.PortfolioOrderDetailsSyncInfoFromJSON = PortfolioOrderDetailsSyncInfoFromJSON;
|
|
16
|
+
exports.PortfolioOrderDetailsSyncInfoFromJSONTyped = PortfolioOrderDetailsSyncInfoFromJSONTyped;
|
|
17
|
+
exports.PortfolioOrderDetailsSyncInfoToJSONRecursive = PortfolioOrderDetailsSyncInfoToJSONRecursive;
|
|
18
|
+
exports.PortfolioOrderDetailsSyncInfoToJSON = PortfolioOrderDetailsSyncInfoToJSON;
|
|
19
|
+
const runtime_1 = require("../runtime");
|
|
20
|
+
const PortfolioOrderDetailsSyncInfoStatus_1 = require("./PortfolioOrderDetailsSyncInfoStatus");
|
|
21
|
+
function PortfolioOrderDetailsSyncInfoFromJSON(json) {
|
|
22
|
+
return PortfolioOrderDetailsSyncInfoFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
function PortfolioOrderDetailsSyncInfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json === undefined || json === null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
completeFrom: !(0, runtime_1.exists)(json, "completeFrom")
|
|
30
|
+
? undefined
|
|
31
|
+
: new Date(json["completeFrom"]),
|
|
32
|
+
status: (0, PortfolioOrderDetailsSyncInfoStatus_1.PortfolioOrderDetailsSyncInfoStatusFromJSON)(json["status"]),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function PortfolioOrderDetailsSyncInfoToJSONRecursive(value, ignoreParent = false) {
|
|
36
|
+
if (value === undefined) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
if (value === null) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
completeFrom: value.completeFrom === undefined
|
|
44
|
+
? undefined
|
|
45
|
+
: value.completeFrom.toISOString(),
|
|
46
|
+
status: (0, PortfolioOrderDetailsSyncInfoStatus_1.PortfolioOrderDetailsSyncInfoStatusToJSON)(value.status),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function PortfolioOrderDetailsSyncInfoToJSON(value) {
|
|
50
|
+
return PortfolioOrderDetailsSyncInfoToJSONRecursive(value, false);
|
|
51
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brokerize
|
|
3
|
+
* The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
|
+
* https://openapi-generator.tech
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @export
|
|
14
|
+
*/
|
|
15
|
+
export declare const PortfolioOrderDetailsSyncInfoStatus: {
|
|
16
|
+
readonly Complete: "COMPLETE";
|
|
17
|
+
readonly Pending: "PENDING";
|
|
18
|
+
};
|
|
19
|
+
export type PortfolioOrderDetailsSyncInfoStatus = (typeof PortfolioOrderDetailsSyncInfoStatus)[keyof typeof PortfolioOrderDetailsSyncInfoStatus];
|
|
20
|
+
export declare function PortfolioOrderDetailsSyncInfoStatusFromJSON(json: any): PortfolioOrderDetailsSyncInfoStatus;
|
|
21
|
+
export declare function PortfolioOrderDetailsSyncInfoStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortfolioOrderDetailsSyncInfoStatus;
|
|
22
|
+
export declare function PortfolioOrderDetailsSyncInfoStatusToJSON(value?: PortfolioOrderDetailsSyncInfoStatus | null): any;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* brokerize
|
|
6
|
+
* The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.PortfolioOrderDetailsSyncInfoStatus = void 0;
|
|
16
|
+
exports.PortfolioOrderDetailsSyncInfoStatusFromJSON = PortfolioOrderDetailsSyncInfoStatusFromJSON;
|
|
17
|
+
exports.PortfolioOrderDetailsSyncInfoStatusFromJSONTyped = PortfolioOrderDetailsSyncInfoStatusFromJSONTyped;
|
|
18
|
+
exports.PortfolioOrderDetailsSyncInfoStatusToJSON = PortfolioOrderDetailsSyncInfoStatusToJSON;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
*/
|
|
23
|
+
exports.PortfolioOrderDetailsSyncInfoStatus = {
|
|
24
|
+
Complete: "COMPLETE",
|
|
25
|
+
Pending: "PENDING",
|
|
26
|
+
};
|
|
27
|
+
function PortfolioOrderDetailsSyncInfoStatusFromJSON(json) {
|
|
28
|
+
return PortfolioOrderDetailsSyncInfoStatusFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function PortfolioOrderDetailsSyncInfoStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
function PortfolioOrderDetailsSyncInfoStatusToJSON(value) {
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* https://openapi-generator.tech
|
|
9
9
|
* Do not edit the class manually.
|
|
10
10
|
*/
|
|
11
|
+
import { PortfolioOrderDetailsSyncInfo } from "./PortfolioOrderDetailsSyncInfo";
|
|
11
12
|
/**
|
|
12
13
|
*
|
|
13
14
|
* @export
|
|
@@ -26,6 +27,12 @@ export interface PortfolioSyncInfoComplete {
|
|
|
26
27
|
* @memberof PortfolioSyncInfoComplete
|
|
27
28
|
*/
|
|
28
29
|
lastSync: Date;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {PortfolioOrderDetailsSyncInfo}
|
|
33
|
+
* @memberof PortfolioSyncInfoComplete
|
|
34
|
+
*/
|
|
35
|
+
orderDetails?: PortfolioOrderDetailsSyncInfo;
|
|
29
36
|
}
|
|
30
37
|
/**
|
|
31
38
|
* @export
|
|
@@ -17,6 +17,8 @@ exports.PortfolioSyncInfoCompleteFromJSON = PortfolioSyncInfoCompleteFromJSON;
|
|
|
17
17
|
exports.PortfolioSyncInfoCompleteFromJSONTyped = PortfolioSyncInfoCompleteFromJSONTyped;
|
|
18
18
|
exports.PortfolioSyncInfoCompleteToJSONRecursive = PortfolioSyncInfoCompleteToJSONRecursive;
|
|
19
19
|
exports.PortfolioSyncInfoCompleteToJSON = PortfolioSyncInfoCompleteToJSON;
|
|
20
|
+
const runtime_1 = require("../runtime");
|
|
21
|
+
const PortfolioOrderDetailsSyncInfo_1 = require("./PortfolioOrderDetailsSyncInfo");
|
|
20
22
|
/**
|
|
21
23
|
* @export
|
|
22
24
|
*/
|
|
@@ -33,6 +35,9 @@ function PortfolioSyncInfoCompleteFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
35
|
return {
|
|
34
36
|
status: json["status"],
|
|
35
37
|
lastSync: new Date(json["lastSync"]),
|
|
38
|
+
orderDetails: !(0, runtime_1.exists)(json, "orderDetails")
|
|
39
|
+
? undefined
|
|
40
|
+
: (0, PortfolioOrderDetailsSyncInfo_1.PortfolioOrderDetailsSyncInfoFromJSON)(json["orderDetails"]),
|
|
36
41
|
};
|
|
37
42
|
}
|
|
38
43
|
function PortfolioSyncInfoCompleteToJSONRecursive(value, ignoreParent = false) {
|
|
@@ -45,6 +50,7 @@ function PortfolioSyncInfoCompleteToJSONRecursive(value, ignoreParent = false) {
|
|
|
45
50
|
return {
|
|
46
51
|
status: value.status,
|
|
47
52
|
lastSync: value.lastSync.toISOString(),
|
|
53
|
+
orderDetails: (0, PortfolioOrderDetailsSyncInfo_1.PortfolioOrderDetailsSyncInfoToJSON)(value.orderDetails),
|
|
48
54
|
};
|
|
49
55
|
}
|
|
50
56
|
function PortfolioSyncInfoCompleteToJSON(value) {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* https://openapi-generator.tech
|
|
9
9
|
* Do not edit the class manually.
|
|
10
10
|
*/
|
|
11
|
+
import { PortfolioOrderDetailsSyncInfo } from "./PortfolioOrderDetailsSyncInfo";
|
|
11
12
|
/**
|
|
12
13
|
*
|
|
13
14
|
* @export
|
|
@@ -20,6 +21,12 @@ export interface PortfolioSyncInfoCompleteSpecifics {
|
|
|
20
21
|
* @memberof PortfolioSyncInfoCompleteSpecifics
|
|
21
22
|
*/
|
|
22
23
|
lastSync?: Date;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {PortfolioOrderDetailsSyncInfo}
|
|
27
|
+
* @memberof PortfolioSyncInfoCompleteSpecifics
|
|
28
|
+
*/
|
|
29
|
+
orderDetails?: PortfolioOrderDetailsSyncInfo;
|
|
23
30
|
}
|
|
24
31
|
export declare function PortfolioSyncInfoCompleteSpecificsFromJSON(json: any): PortfolioSyncInfoCompleteSpecifics;
|
|
25
32
|
export declare function PortfolioSyncInfoCompleteSpecificsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortfolioSyncInfoCompleteSpecifics;
|
|
@@ -17,6 +17,7 @@ exports.PortfolioSyncInfoCompleteSpecificsFromJSONTyped = PortfolioSyncInfoCompl
|
|
|
17
17
|
exports.PortfolioSyncInfoCompleteSpecificsToJSONRecursive = PortfolioSyncInfoCompleteSpecificsToJSONRecursive;
|
|
18
18
|
exports.PortfolioSyncInfoCompleteSpecificsToJSON = PortfolioSyncInfoCompleteSpecificsToJSON;
|
|
19
19
|
const runtime_1 = require("../runtime");
|
|
20
|
+
const PortfolioOrderDetailsSyncInfo_1 = require("./PortfolioOrderDetailsSyncInfo");
|
|
20
21
|
function PortfolioSyncInfoCompleteSpecificsFromJSON(json) {
|
|
21
22
|
return PortfolioSyncInfoCompleteSpecificsFromJSONTyped(json, false);
|
|
22
23
|
}
|
|
@@ -28,6 +29,9 @@ function PortfolioSyncInfoCompleteSpecificsFromJSONTyped(json, ignoreDiscriminat
|
|
|
28
29
|
lastSync: !(0, runtime_1.exists)(json, "lastSync")
|
|
29
30
|
? undefined
|
|
30
31
|
: new Date(json["lastSync"]),
|
|
32
|
+
orderDetails: !(0, runtime_1.exists)(json, "orderDetails")
|
|
33
|
+
? undefined
|
|
34
|
+
: (0, PortfolioOrderDetailsSyncInfo_1.PortfolioOrderDetailsSyncInfoFromJSON)(json["orderDetails"]),
|
|
31
35
|
};
|
|
32
36
|
}
|
|
33
37
|
function PortfolioSyncInfoCompleteSpecificsToJSONRecursive(value, ignoreParent = false) {
|
|
@@ -39,6 +43,7 @@ function PortfolioSyncInfoCompleteSpecificsToJSONRecursive(value, ignoreParent =
|
|
|
39
43
|
}
|
|
40
44
|
return {
|
|
41
45
|
lastSync: value.lastSync === undefined ? undefined : value.lastSync.toISOString(),
|
|
46
|
+
orderDetails: (0, PortfolioOrderDetailsSyncInfo_1.PortfolioOrderDetailsSyncInfoToJSON)(value.orderDetails),
|
|
42
47
|
};
|
|
43
48
|
}
|
|
44
49
|
function PortfolioSyncInfoCompleteSpecificsToJSON(value) {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* https://openapi-generator.tech
|
|
9
9
|
* Do not edit the class manually.
|
|
10
10
|
*/
|
|
11
|
+
import { PortfolioOrderDetailsSyncInfo } from "./PortfolioOrderDetailsSyncInfo";
|
|
11
12
|
/**
|
|
12
13
|
*
|
|
13
14
|
* @export
|
|
@@ -26,6 +27,12 @@ export interface PortfolioSyncInfoIncomplete {
|
|
|
26
27
|
* @memberof PortfolioSyncInfoIncomplete
|
|
27
28
|
*/
|
|
28
29
|
lastSync: Date;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {PortfolioOrderDetailsSyncInfo}
|
|
33
|
+
* @memberof PortfolioSyncInfoIncomplete
|
|
34
|
+
*/
|
|
35
|
+
orderDetails?: PortfolioOrderDetailsSyncInfo;
|
|
29
36
|
}
|
|
30
37
|
/**
|
|
31
38
|
* @export
|
|
@@ -17,6 +17,8 @@ exports.PortfolioSyncInfoIncompleteFromJSON = PortfolioSyncInfoIncompleteFromJSO
|
|
|
17
17
|
exports.PortfolioSyncInfoIncompleteFromJSONTyped = PortfolioSyncInfoIncompleteFromJSONTyped;
|
|
18
18
|
exports.PortfolioSyncInfoIncompleteToJSONRecursive = PortfolioSyncInfoIncompleteToJSONRecursive;
|
|
19
19
|
exports.PortfolioSyncInfoIncompleteToJSON = PortfolioSyncInfoIncompleteToJSON;
|
|
20
|
+
const runtime_1 = require("../runtime");
|
|
21
|
+
const PortfolioOrderDetailsSyncInfo_1 = require("./PortfolioOrderDetailsSyncInfo");
|
|
20
22
|
/**
|
|
21
23
|
* @export
|
|
22
24
|
*/
|
|
@@ -33,6 +35,9 @@ function PortfolioSyncInfoIncompleteFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
35
|
return {
|
|
34
36
|
status: json["status"],
|
|
35
37
|
lastSync: new Date(json["lastSync"]),
|
|
38
|
+
orderDetails: !(0, runtime_1.exists)(json, "orderDetails")
|
|
39
|
+
? undefined
|
|
40
|
+
: (0, PortfolioOrderDetailsSyncInfo_1.PortfolioOrderDetailsSyncInfoFromJSON)(json["orderDetails"]),
|
|
36
41
|
};
|
|
37
42
|
}
|
|
38
43
|
function PortfolioSyncInfoIncompleteToJSONRecursive(value, ignoreParent = false) {
|
|
@@ -45,6 +50,7 @@ function PortfolioSyncInfoIncompleteToJSONRecursive(value, ignoreParent = false)
|
|
|
45
50
|
return {
|
|
46
51
|
status: value.status,
|
|
47
52
|
lastSync: value.lastSync.toISOString(),
|
|
53
|
+
orderDetails: (0, PortfolioOrderDetailsSyncInfo_1.PortfolioOrderDetailsSyncInfoToJSON)(value.orderDetails),
|
|
48
54
|
};
|
|
49
55
|
}
|
|
50
56
|
function PortfolioSyncInfoIncompleteToJSON(value) {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* https://openapi-generator.tech
|
|
9
9
|
* Do not edit the class manually.
|
|
10
10
|
*/
|
|
11
|
+
import { PortfolioOrderDetailsSyncInfo } from "./PortfolioOrderDetailsSyncInfo";
|
|
11
12
|
/**
|
|
12
13
|
*
|
|
13
14
|
* @export
|
|
@@ -20,6 +21,12 @@ export interface PortfolioSyncInfoIncompleteSpecifics {
|
|
|
20
21
|
* @memberof PortfolioSyncInfoIncompleteSpecifics
|
|
21
22
|
*/
|
|
22
23
|
lastSync?: Date;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {PortfolioOrderDetailsSyncInfo}
|
|
27
|
+
* @memberof PortfolioSyncInfoIncompleteSpecifics
|
|
28
|
+
*/
|
|
29
|
+
orderDetails?: PortfolioOrderDetailsSyncInfo;
|
|
23
30
|
}
|
|
24
31
|
export declare function PortfolioSyncInfoIncompleteSpecificsFromJSON(json: any): PortfolioSyncInfoIncompleteSpecifics;
|
|
25
32
|
export declare function PortfolioSyncInfoIncompleteSpecificsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortfolioSyncInfoIncompleteSpecifics;
|
|
@@ -17,6 +17,7 @@ exports.PortfolioSyncInfoIncompleteSpecificsFromJSONTyped = PortfolioSyncInfoInc
|
|
|
17
17
|
exports.PortfolioSyncInfoIncompleteSpecificsToJSONRecursive = PortfolioSyncInfoIncompleteSpecificsToJSONRecursive;
|
|
18
18
|
exports.PortfolioSyncInfoIncompleteSpecificsToJSON = PortfolioSyncInfoIncompleteSpecificsToJSON;
|
|
19
19
|
const runtime_1 = require("../runtime");
|
|
20
|
+
const PortfolioOrderDetailsSyncInfo_1 = require("./PortfolioOrderDetailsSyncInfo");
|
|
20
21
|
function PortfolioSyncInfoIncompleteSpecificsFromJSON(json) {
|
|
21
22
|
return PortfolioSyncInfoIncompleteSpecificsFromJSONTyped(json, false);
|
|
22
23
|
}
|
|
@@ -28,6 +29,9 @@ function PortfolioSyncInfoIncompleteSpecificsFromJSONTyped(json, ignoreDiscrimin
|
|
|
28
29
|
lastSync: !(0, runtime_1.exists)(json, "lastSync")
|
|
29
30
|
? undefined
|
|
30
31
|
: new Date(json["lastSync"]),
|
|
32
|
+
orderDetails: !(0, runtime_1.exists)(json, "orderDetails")
|
|
33
|
+
? undefined
|
|
34
|
+
: (0, PortfolioOrderDetailsSyncInfo_1.PortfolioOrderDetailsSyncInfoFromJSON)(json["orderDetails"]),
|
|
31
35
|
};
|
|
32
36
|
}
|
|
33
37
|
function PortfolioSyncInfoIncompleteSpecificsToJSONRecursive(value, ignoreParent = false) {
|
|
@@ -39,6 +43,7 @@ function PortfolioSyncInfoIncompleteSpecificsToJSONRecursive(value, ignoreParent
|
|
|
39
43
|
}
|
|
40
44
|
return {
|
|
41
45
|
lastSync: value.lastSync === undefined ? undefined : value.lastSync.toISOString(),
|
|
46
|
+
orderDetails: (0, PortfolioOrderDetailsSyncInfo_1.PortfolioOrderDetailsSyncInfoToJSON)(value.orderDetails),
|
|
42
47
|
};
|
|
43
48
|
}
|
|
44
49
|
function PortfolioSyncInfoIncompleteSpecificsToJSON(value) {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brokerize
|
|
3
|
+
* The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
|
+
* https://openapi-generator.tech
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @export
|
|
14
|
+
* @interface SmartbrokerClientCfg
|
|
15
|
+
*/
|
|
16
|
+
export interface SmartbrokerClientCfg {
|
|
17
|
+
/**
|
|
18
|
+
* If the client must use a different broker-provided clientId, it can be configured here.
|
|
19
|
+
* @type {string}
|
|
20
|
+
* @memberof SmartbrokerClientCfg
|
|
21
|
+
*/
|
|
22
|
+
clientIdProd?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function SmartbrokerClientCfgFromJSON(json: any): SmartbrokerClientCfg;
|
|
25
|
+
export declare function SmartbrokerClientCfgFromJSONTyped(json: any, ignoreDiscriminator: boolean): SmartbrokerClientCfg;
|
|
26
|
+
export declare function SmartbrokerClientCfgToJSONRecursive(value?: SmartbrokerClientCfg | null, ignoreParent?: boolean): any;
|
|
27
|
+
export declare function SmartbrokerClientCfgToJSON(value?: SmartbrokerClientCfg | null): any;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* brokerize
|
|
6
|
+
* The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.SmartbrokerClientCfgFromJSON = SmartbrokerClientCfgFromJSON;
|
|
16
|
+
exports.SmartbrokerClientCfgFromJSONTyped = SmartbrokerClientCfgFromJSONTyped;
|
|
17
|
+
exports.SmartbrokerClientCfgToJSONRecursive = SmartbrokerClientCfgToJSONRecursive;
|
|
18
|
+
exports.SmartbrokerClientCfgToJSON = SmartbrokerClientCfgToJSON;
|
|
19
|
+
const runtime_1 = require("../runtime");
|
|
20
|
+
function SmartbrokerClientCfgFromJSON(json) {
|
|
21
|
+
return SmartbrokerClientCfgFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
function SmartbrokerClientCfgFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json === undefined || json === null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
clientIdProd: !(0, runtime_1.exists)(json, "clientIdProd")
|
|
29
|
+
? undefined
|
|
30
|
+
: json["clientIdProd"],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function SmartbrokerClientCfgToJSONRecursive(value, ignoreParent = false) {
|
|
34
|
+
if (value === undefined) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
if (value === null) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
clientIdProd: value.clientIdProd,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function SmartbrokerClientCfgToJSON(value) {
|
|
45
|
+
return SmartbrokerClientCfgToJSONRecursive(value, false);
|
|
46
|
+
}
|
|
@@ -28,6 +28,20 @@ export interface SummarizedTrade {
|
|
|
28
28
|
* @memberof SummarizedTrade
|
|
29
29
|
*/
|
|
30
30
|
closeDateTime: Date;
|
|
31
|
+
/**
|
|
32
|
+
* True if this trade was not closed by a sale but by the instrument being booked out — it knocked
|
|
33
|
+
* out or expired, and the issuer removed the position from the depot without a sell order ever
|
|
34
|
+
* reaching the order archive.
|
|
35
|
+
*
|
|
36
|
+
* The closing execution is therefore synthetic: brokerize derives it from the knock-out date and
|
|
37
|
+
* prices it with the instrument's closing price on that day (0 where none is known, which is the
|
|
38
|
+
* floor rather than a claim — the issuer's buy-back, if there was one, is not in the archive). The
|
|
39
|
+
* P/L is otherwise computed exactly like any other trade's, FIFO-matched against the position's own
|
|
40
|
+
* buys. Absent on an ordinary trade.
|
|
41
|
+
* @type {boolean}
|
|
42
|
+
* @memberof SummarizedTrade
|
|
43
|
+
*/
|
|
44
|
+
closedByKnockOut?: boolean;
|
|
31
45
|
/**
|
|
32
46
|
*
|
|
33
47
|
* @type {string}
|
|
@@ -29,6 +29,9 @@ function SummarizedTradeFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
29
|
return {
|
|
30
30
|
closeAvgQuotation: (0, Amount_1.AmountFromJSON)(json["closeAvgQuotation"]),
|
|
31
31
|
closeDateTime: new Date(json["closeDateTime"]),
|
|
32
|
+
closedByKnockOut: !(0, runtime_1.exists)(json, "closedByKnockOut")
|
|
33
|
+
? undefined
|
|
34
|
+
: json["closedByKnockOut"],
|
|
32
35
|
details: json["details"],
|
|
33
36
|
fees: !(0, runtime_1.exists)(json, "fees") ? undefined : (0, Amount_1.AmountFromJSON)(json["fees"]),
|
|
34
37
|
id: json["id"],
|
|
@@ -63,6 +66,7 @@ function SummarizedTradeToJSONRecursive(value, ignoreParent = false) {
|
|
|
63
66
|
return {
|
|
64
67
|
closeAvgQuotation: (0, Amount_1.AmountToJSON)(value.closeAvgQuotation),
|
|
65
68
|
closeDateTime: value.closeDateTime.toISOString(),
|
|
69
|
+
closedByKnockOut: value.closedByKnockOut,
|
|
66
70
|
details: value.details,
|
|
67
71
|
fees: (0, Amount_1.AmountToJSON)(value.fees),
|
|
68
72
|
id: value.id,
|