@brokerize/client 1.10.0 → 1.11.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.
Files changed (56) hide show
  1. package/dist/authorizedApiContext.js +2 -3
  2. package/dist/cjs/authorizedApiContext.js +1 -2
  3. package/dist/cjs/errors.d.ts +14 -0
  4. package/dist/cjs/errors.js +48 -1
  5. package/dist/cjs/index.d.ts +2 -2
  6. package/dist/cjs/index.js +3 -4
  7. package/dist/cjs/modelExports.d.ts +1 -0
  8. package/dist/cjs/modelExports.js +3 -1
  9. package/dist/cjs/swagger/models/BrokerClientCfg.d.ts +7 -0
  10. package/dist/cjs/swagger/models/BrokerClientCfg.js +5 -0
  11. package/dist/cjs/swagger/models/BrokerMeta.d.ts +15 -0
  12. package/dist/cjs/swagger/models/BrokerMeta.js +2 -0
  13. package/dist/cjs/swagger/models/ClientConfigUpdateOAuthLoginForm.d.ts +12 -1
  14. package/dist/cjs/swagger/models/ClientConfigUpdateOAuthLoginForm.js +2 -0
  15. package/dist/cjs/swagger/models/OAuthLoginFormConfig.d.ts +12 -1
  16. package/dist/cjs/swagger/models/OAuthLoginFormConfig.js +2 -0
  17. package/dist/cjs/swagger/models/Order.d.ts +9 -1
  18. package/dist/cjs/swagger/models/OrderCreate.d.ts +2 -1
  19. package/dist/cjs/swagger/models/SmartbrokerClientCfg.d.ts +27 -0
  20. package/dist/cjs/swagger/models/SmartbrokerClientCfg.js +46 -0
  21. package/dist/cjs/swagger/models/SummarizedTrade.d.ts +14 -0
  22. package/dist/cjs/swagger/models/SummarizedTrade.js +4 -0
  23. package/dist/cjs/swagger/models/TradeWarning.d.ts +31 -1
  24. package/dist/cjs/swagger/models/TradeWarning.js +13 -0
  25. package/dist/cjs/swagger/models/TradeWarningReason.d.ts +45 -0
  26. package/dist/cjs/swagger/models/TradeWarningReason.js +58 -0
  27. package/dist/cjs/swagger/models/index.d.ts +2 -0
  28. package/dist/cjs/swagger/models/index.js +2 -0
  29. package/dist/client.d.ts +190 -15
  30. package/dist/errors.d.ts +14 -0
  31. package/dist/errors.js +45 -0
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.js +3 -5
  34. package/dist/modelExports.d.ts +1 -0
  35. package/dist/modelExports.js +1 -0
  36. package/dist/swagger/models/BrokerClientCfg.d.ts +7 -0
  37. package/dist/swagger/models/BrokerClientCfg.js +5 -0
  38. package/dist/swagger/models/BrokerMeta.d.ts +15 -0
  39. package/dist/swagger/models/BrokerMeta.js +2 -0
  40. package/dist/swagger/models/ClientConfigUpdateOAuthLoginForm.d.ts +12 -1
  41. package/dist/swagger/models/ClientConfigUpdateOAuthLoginForm.js +2 -0
  42. package/dist/swagger/models/OAuthLoginFormConfig.d.ts +12 -1
  43. package/dist/swagger/models/OAuthLoginFormConfig.js +2 -0
  44. package/dist/swagger/models/Order.d.ts +9 -1
  45. package/dist/swagger/models/OrderCreate.d.ts +2 -1
  46. package/dist/swagger/models/SmartbrokerClientCfg.d.ts +27 -0
  47. package/dist/swagger/models/SmartbrokerClientCfg.js +40 -0
  48. package/dist/swagger/models/SummarizedTrade.d.ts +14 -0
  49. package/dist/swagger/models/SummarizedTrade.js +4 -0
  50. package/dist/swagger/models/TradeWarning.d.ts +31 -1
  51. package/dist/swagger/models/TradeWarning.js +13 -0
  52. package/dist/swagger/models/TradeWarningReason.d.ts +45 -0
  53. package/dist/swagger/models/TradeWarningReason.js +52 -0
  54. package/dist/swagger/models/index.d.ts +2 -0
  55. package/dist/swagger/models/index.js +2 -0
  56. package/package.json +4 -4
@@ -61,6 +61,21 @@ export interface BrokerMeta {
61
61
  * @memberof BrokerMeta
62
62
  */
63
63
  loginForm?: BrokerLoginForm;
64
+ /**
65
+ * All brokerize exchange ids this broker's exchanges are mapped to, ascending. Use it to tell
66
+ * upfront which brokers may be relevant for a given exchange, e.g. to preselect brokers for a
67
+ * security that is traded there.
68
+ *
69
+ * This is a static, broker-wide list: it means that brokerize knows how to translate between
70
+ * this broker's exchanges and the listed ids, not that every security can be traded at every
71
+ * one of them. The authoritative, security-specific list of tradable exchanges remains the
72
+ * `exchanges` field of a prepared trade.
73
+ *
74
+ * Every id is contained in the `GetExchanges` response, so it can always be resolved to a name.
75
+ * @type {Array<number>}
76
+ * @memberof BrokerMeta
77
+ */
78
+ supportedExchangeIds: Array<number>;
64
79
  /**
65
80
  * If true, the user can login at the broker via OAuth (this involves browser redirects). Use `prepareOAuthRedirect` to obtain a URL to redirect to.
66
81
  * @type {boolean}
@@ -32,6 +32,7 @@ export function BrokerMetaFromJSONTyped(json, ignoreDiscriminator) {
32
32
  loginForm: !exists(json, "loginForm")
33
33
  ? undefined
34
34
  : BrokerLoginFormFromJSON(json["loginForm"]),
35
+ supportedExchangeIds: json["supportedExchangeIds"],
35
36
  supportsOAuthLogin: !exists(json, "supportsOAuthLogin")
36
37
  ? undefined
37
38
  : json["supportsOAuthLogin"],
@@ -52,6 +53,7 @@ export function BrokerMetaToJSONRecursive(value, ignoreParent = false) {
52
53
  features: BrokerMetaFeaturesToJSON(value.features),
53
54
  images: BrokerMetaImagesToJSON(value.images),
54
55
  loginForm: BrokerLoginFormToJSON(value.loginForm),
56
+ supportedExchangeIds: value.supportedExchangeIds,
55
57
  supportsOAuthLogin: value.supportsOAuthLogin,
56
58
  };
57
59
  }
@@ -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;
@@ -18,6 +18,7 @@ export const ClientConfigUpdateOAuthLoginFormRedirectStyleEnum = {
18
18
  Meta: "meta",
19
19
  Js: "js",
20
20
  Link: "link",
21
+ Http: "http",
21
22
  };
22
23
  /**
23
24
  * @export
@@ -26,6 +27,7 @@ export const ClientConfigUpdateOAuthLoginFormRedirectStyleBitpandaEnum = {
26
27
  Meta: "meta",
27
28
  Js: "js",
28
29
  Link: "link",
30
+ Http: "http",
29
31
  };
30
32
  export function ClientConfigUpdateOAuthLoginFormFromJSON(json) {
31
33
  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;
@@ -18,6 +18,7 @@ export const OAuthLoginFormConfigRedirectStyleEnum = {
18
18
  Meta: "meta",
19
19
  Js: "js",
20
20
  Link: "link",
21
+ Http: "http",
21
22
  };
22
23
  /**
23
24
  * @export
@@ -26,6 +27,7 @@ export const OAuthLoginFormConfigRedirectStyleBitpandaEnum = {
26
27
  Meta: "meta",
27
28
  Js: "js",
28
29
  Link: "link",
30
+ Http: "http",
29
31
  };
30
32
  export function OAuthLoginFormConfigFromJSON(json) {
31
33
  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 fully executed orders: the timestamp of the *latest* execution.
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,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,40 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * brokerize
5
+ * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
6
+ *
7
+ *
8
+ *
9
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
+ * https://openapi-generator.tech
11
+ * Do not edit the class manually.
12
+ */
13
+ import { exists } from "../runtime.js";
14
+ export function SmartbrokerClientCfgFromJSON(json) {
15
+ return SmartbrokerClientCfgFromJSONTyped(json, false);
16
+ }
17
+ export function SmartbrokerClientCfgFromJSONTyped(json, ignoreDiscriminator) {
18
+ if (json === undefined || json === null) {
19
+ return json;
20
+ }
21
+ return {
22
+ clientIdProd: !exists(json, "clientIdProd")
23
+ ? undefined
24
+ : json["clientIdProd"],
25
+ };
26
+ }
27
+ export function SmartbrokerClientCfgToJSONRecursive(value, ignoreParent = false) {
28
+ if (value === undefined) {
29
+ return undefined;
30
+ }
31
+ if (value === null) {
32
+ return null;
33
+ }
34
+ return {
35
+ clientIdProd: value.clientIdProd,
36
+ };
37
+ }
38
+ export function SmartbrokerClientCfgToJSON(value) {
39
+ return SmartbrokerClientCfgToJSONRecursive(value, false);
40
+ }
@@ -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}
@@ -23,6 +23,9 @@ export function SummarizedTradeFromJSONTyped(json, ignoreDiscriminator) {
23
23
  return {
24
24
  closeAvgQuotation: AmountFromJSON(json["closeAvgQuotation"]),
25
25
  closeDateTime: new Date(json["closeDateTime"]),
26
+ closedByKnockOut: !exists(json, "closedByKnockOut")
27
+ ? undefined
28
+ : json["closedByKnockOut"],
26
29
  details: json["details"],
27
30
  fees: !exists(json, "fees") ? undefined : AmountFromJSON(json["fees"]),
28
31
  id: json["id"],
@@ -57,6 +60,7 @@ export function SummarizedTradeToJSONRecursive(value, ignoreParent = false) {
57
60
  return {
58
61
  closeAvgQuotation: AmountToJSON(value.closeAvgQuotation),
59
62
  closeDateTime: value.closeDateTime.toISOString(),
63
+ closedByKnockOut: value.closedByKnockOut,
60
64
  details: value.details,
61
65
  fees: AmountToJSON(value.fees),
62
66
  id: value.id,
@@ -8,6 +8,8 @@
8
8
  * https://openapi-generator.tech
9
9
  * Do not edit the class manually.
10
10
  */
11
+ import { Security } from "./Security";
12
+ import { TradeWarningReason } from "./TradeWarningReason";
11
13
  /**
12
14
  *
13
15
  * @export
@@ -15,11 +17,39 @@
15
17
  */
16
18
  export interface TradeWarning {
17
19
  /**
18
- *
20
+ * Date in the format YYYY-MM-DD for validityType: 'GTD'
21
+ * Date in the format Date ISO string YYYY-MM-DDThh:mm:ss.fffZ for validityType: 'GTDT'
22
+ * @type {string}
23
+ * @memberof TradeWarning
24
+ */
25
+ fromDate?: string;
26
+ /**
27
+ * Human-readable description, currently German or English depending on where it originates. Meant
28
+ * as a fallback for displaying something at all — a client that knows `reason` should build its
29
+ * own text from the structured fields instead.
19
30
  * @type {string}
20
31
  * @memberof TradeWarning
21
32
  */
22
33
  message: string;
34
+ /**
35
+ *
36
+ * @type {TradeWarningReason}
37
+ * @memberof TradeWarning
38
+ */
39
+ reason: TradeWarningReason;
40
+ /**
41
+ *
42
+ * @type {Security}
43
+ * @memberof TradeWarning
44
+ */
45
+ security?: Security;
46
+ /**
47
+ * Date in the format YYYY-MM-DD for validityType: 'GTD'
48
+ * Date in the format Date ISO string YYYY-MM-DDThh:mm:ss.fffZ for validityType: 'GTDT'
49
+ * @type {string}
50
+ * @memberof TradeWarning
51
+ */
52
+ toDate?: string;
23
53
  }
24
54
  export declare function TradeWarningFromJSON(json: any): TradeWarning;
25
55
  export declare function TradeWarningFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeWarning;
@@ -10,6 +10,9 @@
10
10
  * https://openapi-generator.tech
11
11
  * Do not edit the class manually.
12
12
  */
13
+ import { exists } from "../runtime.js";
14
+ import { SecurityFromJSON, SecurityToJSON, } from "./Security.js";
15
+ import { TradeWarningReasonFromJSON, TradeWarningReasonToJSON, } from "./TradeWarningReason.js";
13
16
  export function TradeWarningFromJSON(json) {
14
17
  return TradeWarningFromJSONTyped(json, false);
15
18
  }
@@ -18,7 +21,13 @@ export function TradeWarningFromJSONTyped(json, ignoreDiscriminator) {
18
21
  return json;
19
22
  }
20
23
  return {
24
+ fromDate: !exists(json, "fromDate") ? undefined : json["fromDate"],
21
25
  message: json["message"],
26
+ reason: TradeWarningReasonFromJSON(json["reason"]),
27
+ security: !exists(json, "security")
28
+ ? undefined
29
+ : SecurityFromJSON(json["security"]),
30
+ toDate: !exists(json, "toDate") ? undefined : json["toDate"],
22
31
  };
23
32
  }
24
33
  export function TradeWarningToJSONRecursive(value, ignoreParent = false) {
@@ -29,7 +38,11 @@ export function TradeWarningToJSONRecursive(value, ignoreParent = false) {
29
38
  return null;
30
39
  }
31
40
  return {
41
+ fromDate: value.fromDate,
32
42
  message: value.message,
43
+ reason: TradeWarningReasonToJSON(value.reason),
44
+ security: SecurityToJSON(value.security),
45
+ toDate: value.toDate,
33
46
  };
34
47
  }
35
48
  export function TradeWarningToJSON(value) {
@@ -0,0 +1,45 @@
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
+ * Why a trade or portfolio-history computation could not give a complete answer. Clients switch on
13
+ * this instead of parsing `TradeWarning.message`, which is free text and may change at any time.
14
+ *
15
+ * - `executionsWithoutTimestamp`: order executions carry no execution time, so they cannot be placed
16
+ * on a timeline and were ignored altogether.
17
+ * - `inconsistentOrderHistory`: the executions of one security contradict each other or the reported
18
+ * holding (more sold than ever bought, a quantity that goes negative). Nothing can be reconstructed
19
+ * from them, so the security is left out of the value history and its trades are not reported.
20
+ * - `positionNotFullyExplained`: the order archive covers only part of a position — typical for
21
+ * brokers that return just the most recent weeks. What is held today is known, but its history
22
+ * reaches further back than the executions do.
23
+ * - `missingEodPrice`: no closing price was available for the security on some days; it was valued
24
+ * with the last price known before them.
25
+ * - `missingFxRate`: no exchange rate to the portfolio currency exists for the security's currency, so
26
+ * its amounts are *not* converted and the totals they enter are off by the conversion.
27
+ * - `unknownBuyPrice`: no purchase price could be determined for a position, so it is missing from the
28
+ * buy value (and from the profit it implies).
29
+ * - `realizedPnlUnavailable`: the completed trades could not be computed at all, which leaves the
30
+ * realized profit/loss empty rather than wrong.
31
+ * @export
32
+ */
33
+ export declare const TradeWarningReason: {
34
+ readonly ExecutionsWithoutTimestamp: "executionsWithoutTimestamp";
35
+ readonly InconsistentOrderHistory: "inconsistentOrderHistory";
36
+ readonly PositionNotFullyExplained: "positionNotFullyExplained";
37
+ readonly MissingEodPrice: "missingEodPrice";
38
+ readonly MissingFxRate: "missingFxRate";
39
+ readonly UnknownBuyPrice: "unknownBuyPrice";
40
+ readonly RealizedPnlUnavailable: "realizedPnlUnavailable";
41
+ };
42
+ export type TradeWarningReason = (typeof TradeWarningReason)[keyof typeof TradeWarningReason];
43
+ export declare function TradeWarningReasonFromJSON(json: any): TradeWarningReason;
44
+ export declare function TradeWarningReasonFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeWarningReason;
45
+ export declare function TradeWarningReasonToJSON(value?: TradeWarningReason | null): any;
@@ -0,0 +1,52 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * brokerize
5
+ * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
6
+ *
7
+ *
8
+ *
9
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
+ * https://openapi-generator.tech
11
+ * Do not edit the class manually.
12
+ */
13
+ /**
14
+ * Why a trade or portfolio-history computation could not give a complete answer. Clients switch on
15
+ * this instead of parsing `TradeWarning.message`, which is free text and may change at any time.
16
+ *
17
+ * - `executionsWithoutTimestamp`: order executions carry no execution time, so they cannot be placed
18
+ * on a timeline and were ignored altogether.
19
+ * - `inconsistentOrderHistory`: the executions of one security contradict each other or the reported
20
+ * holding (more sold than ever bought, a quantity that goes negative). Nothing can be reconstructed
21
+ * from them, so the security is left out of the value history and its trades are not reported.
22
+ * - `positionNotFullyExplained`: the order archive covers only part of a position — typical for
23
+ * brokers that return just the most recent weeks. What is held today is known, but its history
24
+ * reaches further back than the executions do.
25
+ * - `missingEodPrice`: no closing price was available for the security on some days; it was valued
26
+ * with the last price known before them.
27
+ * - `missingFxRate`: no exchange rate to the portfolio currency exists for the security's currency, so
28
+ * its amounts are *not* converted and the totals they enter are off by the conversion.
29
+ * - `unknownBuyPrice`: no purchase price could be determined for a position, so it is missing from the
30
+ * buy value (and from the profit it implies).
31
+ * - `realizedPnlUnavailable`: the completed trades could not be computed at all, which leaves the
32
+ * realized profit/loss empty rather than wrong.
33
+ * @export
34
+ */
35
+ export const TradeWarningReason = {
36
+ ExecutionsWithoutTimestamp: "executionsWithoutTimestamp",
37
+ InconsistentOrderHistory: "inconsistentOrderHistory",
38
+ PositionNotFullyExplained: "positionNotFullyExplained",
39
+ MissingEodPrice: "missingEodPrice",
40
+ MissingFxRate: "missingFxRate",
41
+ UnknownBuyPrice: "unknownBuyPrice",
42
+ RealizedPnlUnavailable: "realizedPnlUnavailable",
43
+ };
44
+ export function TradeWarningReasonFromJSON(json) {
45
+ return TradeWarningReasonFromJSONTyped(json, false);
46
+ }
47
+ export function TradeWarningReasonFromJSONTyped(json, ignoreDiscriminator) {
48
+ return json;
49
+ }
50
+ export function TradeWarningReasonToJSON(value) {
51
+ return value;
52
+ }
@@ -230,6 +230,7 @@ export * from "./SessionSyncInfoSyncedAllOf";
230
230
  export * from "./SessionSyncInfoSyncedSpecifics";
231
231
  export * from "./SetClientConfigRequest";
232
232
  export * from "./SizeUnitConstraint";
233
+ export * from "./SmartbrokerClientCfg";
233
234
  export * from "./StringMapByOrderModel";
234
235
  export * from "./SummarizedTrade";
235
236
  export * from "./SyncError";
@@ -256,6 +257,7 @@ export * from "./TradeStatisticsDateRange";
256
257
  export * from "./TradeStatisticsHoldingPeriodInDays";
257
258
  export * from "./TradeStatisticsItem";
258
259
  export * from "./TradeWarning";
260
+ export * from "./TradeWarningReason";
259
261
  export * from "./TradingSessionLifetime";
260
262
  export * from "./TrailingDistance";
261
263
  export * from "./TriggerSync200Response";
@@ -232,6 +232,7 @@ export * from "./SessionSyncInfoSyncedAllOf.js";
232
232
  export * from "./SessionSyncInfoSyncedSpecifics.js";
233
233
  export * from "./SetClientConfigRequest.js";
234
234
  export * from "./SizeUnitConstraint.js";
235
+ export * from "./SmartbrokerClientCfg.js";
235
236
  export * from "./StringMapByOrderModel.js";
236
237
  export * from "./SummarizedTrade.js";
237
238
  export * from "./SyncError.js";
@@ -258,6 +259,7 @@ export * from "./TradeStatisticsDateRange.js";
258
259
  export * from "./TradeStatisticsHoldingPeriodInDays.js";
259
260
  export * from "./TradeStatisticsItem.js";
260
261
  export * from "./TradeWarning.js";
262
+ export * from "./TradeWarningReason.js";
261
263
  export * from "./TradingSessionLifetime.js";
262
264
  export * from "./TrailingDistance.js";
263
265
  export * from "./TriggerSync200Response.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brokerize/client",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "Client for the brokerize.com API",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/brokerize/client-js#readme",
@@ -62,13 +62,13 @@
62
62
  },
63
63
  "devDependencies": {
64
64
  "@microsoft/api-extractor": "7.58.11",
65
- "@openapitools/openapi-generator-cli": "2.39.1",
65
+ "@openapitools/openapi-generator-cli": "2.41.0",
66
66
  "@types/node": "24.13.3",
67
- "@typescript-eslint/eslint-plugin": "8.64.0",
67
+ "@typescript-eslint/eslint-plugin": "8.71.0",
68
68
  "eslint": "10.7.0",
69
69
  "eslint-config-prettier": "10.1.8",
70
70
  "husky": "9.1.7",
71
- "lint-staged": "17.0.8",
71
+ "lint-staged": "17.6.0",
72
72
  "prettier": "3.9.5",
73
73
  "sort-package-json": "4.0.0",
74
74
  "typescript": "6.0.3"