@brokerize/client 1.3.10 → 1.5.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.
@@ -105,6 +105,11 @@ export declare class AuthorizedApiContext {
105
105
  securityQuotesToken: string;
106
106
  }): Promise<openApiClient.SecurityQuotesResponse>;
107
107
  getSecurityQuotesMeta(securityQuotesToken: string): Promise<openApiClient.SecurityQuotesMeta>;
108
+ getRecoveryPhrases(): Promise<openApiClient.GetRecoveryPhrasesResponse>;
109
+ createRecoveryPhrase(opts: {
110
+ name: string;
111
+ }): Promise<openApiClient.CreateRecoveryPhraseResult>;
112
+ deleteRecoveryPhrase(recoveryPhraseId: string): Promise<void>;
108
113
  /**
109
114
  * Subscribe to security quotes. Note that this currently uses polling to load the quotes from the
110
115
  * API. This will be replaced with a websocket-based solution in the future, but we can keep this
@@ -350,6 +350,19 @@ export class AuthorizedApiContext {
350
350
  securityQuotesToken,
351
351
  }, await this._initRequestInit());
352
352
  }
353
+ async getRecoveryPhrases() {
354
+ return this._userApi.getRecoveryPhrases(await this._initRequestInit());
355
+ }
356
+ async createRecoveryPhrase(opts) {
357
+ return this._userApi.createRecoveryPhrase({
358
+ createRecoveryPhraseParams: { name: opts.name },
359
+ }, await this._initRequestInit());
360
+ }
361
+ async deleteRecoveryPhrase(recoveryPhraseId) {
362
+ return this._userApi.deleteRecoveryPhrase({
363
+ recoveryPhraseId,
364
+ }, await this._initRequestInit());
365
+ }
353
366
  /**
354
367
  * Subscribe to security quotes. Note that this currently uses polling to load the quotes from the
355
368
  * API. This will be replaced with a websocket-based solution in the future, but we can keep this
package/dist/client.d.ts CHANGED
@@ -1177,6 +1177,11 @@ export declare class AuthorizedApiContext {
1177
1177
  securityQuotesToken: string;
1178
1178
  }): Promise<openApiClient.SecurityQuotesResponse>;
1179
1179
  getSecurityQuotesMeta(securityQuotesToken: string): Promise<openApiClient.SecurityQuotesMeta>;
1180
+ getRecoveryPhrases(): Promise<openApiClient.GetRecoveryPhrasesResponse>;
1181
+ createRecoveryPhrase(opts: {
1182
+ name: string;
1183
+ }): Promise<openApiClient.CreateRecoveryPhraseResult>;
1184
+ deleteRecoveryPhrase(recoveryPhraseId: string): Promise<void>;
1180
1185
  /**
1181
1186
  * Subscribe to security quotes. Note that this currently uses polling to load the quotes from the
1182
1187
  * API. This will be replaced with a websocket-based solution in the future, but we can keep this
@@ -1460,6 +1465,8 @@ export declare class Brokerize {
1460
1465
  * @returns
1461
1466
  */
1462
1467
  createAuth(authCtxCfg: AuthContextConfiguration, tokenRefreshCallback?: TokenRefreshCallback): Auth;
1468
+ checkRecoveryPhrase(recoveryPhrase: string): Promise<openApiClient.CheckRecoveryPhrase200Response>;
1469
+ obtainTokenByRecoveryPhrase(recoveryPhrase: string): Promise<AuthContextConfiguration>;
1463
1470
  /**
1464
1471
  * Create a customized WebSocket client. You can override the WebSocket connection URL and the Auth implementation
1465
1472
  * for a custom token retrieval behavior.
@@ -2506,6 +2513,12 @@ declare interface CheckRecoveryPhrase200Response {
2506
2513
  * @memberof CheckRecoveryPhrase200Response
2507
2514
  */
2508
2515
  expiresAt: Date;
2516
+ /**
2517
+ *
2518
+ * @type {string}
2519
+ * @memberof CheckRecoveryPhrase200Response
2520
+ */
2521
+ userId: string;
2509
2522
  }
2510
2523
 
2511
2524
  declare function CheckRecoveryPhrase200ResponseFromJSON(json: any): CheckRecoveryPhrase200Response;
@@ -2532,6 +2545,13 @@ declare interface ClientConfig {
2532
2545
  * @memberof ClientConfig
2533
2546
  */
2534
2547
  allowRequestsWithoutOrigin: boolean;
2548
+ /**
2549
+ * If true, security logo URLs (`Security.logos`) are returned with positions/orders for this client.
2550
+ * Logos are served via `logos.brokerize.com`.
2551
+ * @type {boolean}
2552
+ * @memberof ClientConfig
2553
+ */
2554
+ allowSecurityLogos?: boolean;
2535
2555
  /**
2536
2556
  *
2537
2557
  * @type {Array<string>}
@@ -2572,11 +2592,20 @@ declare interface ClientConfig {
2572
2592
  */
2573
2593
  enabled: boolean;
2574
2594
  /**
2575
- *
2595
+ * How long guest users will be kept after their last activity.
2596
+ * If the user has set up a RecoveryPhrase, `guestUserInactivityTimeoutSecondsRecoveryPhrase` is used instead (if defined).
2576
2597
  * @type {number}
2577
2598
  * @memberof ClientConfig
2578
2599
  */
2579
2600
  guestUserInactivityTimeoutSeconds?: number;
2601
+ /**
2602
+ * How long guest users will be kept after their last activity *if they have a RecoveryPhrase*.
2603
+ *
2604
+ * If the user has no RecoveryPhrase, `guestUserInactivityTimeoutSeconds` is used instead (if defined).
2605
+ * @type {number}
2606
+ * @memberof ClientConfig
2607
+ */
2608
+ guestUserInactivityTimeoutSecondsRecoveryPhrase?: number;
2580
2609
  /**
2581
2610
  *
2582
2611
  * @type {GuestUserLifetime}
@@ -2719,6 +2748,15 @@ declare interface ClientConfigUpdate {
2719
2748
  * @memberof ClientConfigUpdate
2720
2749
  */
2721
2750
  allowRequestsWithoutOrigin?: boolean;
2751
+ /**
2752
+ * If true, security logo URLs (`Security.logos`) are returned with positions/orders for this client.
2753
+ * Logos are served via `logos.brokerize.com`.
2754
+ *
2755
+ * Default is false.
2756
+ * @type {boolean}
2757
+ * @memberof ClientConfigUpdate
2758
+ */
2759
+ allowSecurityLogos?: boolean;
2722
2760
  /**
2723
2761
  *
2724
2762
  * @type {Array<string>}
@@ -2770,11 +2808,20 @@ declare interface ClientConfigUpdate {
2770
2808
  */
2771
2809
  enabled?: boolean;
2772
2810
  /**
2773
- *
2811
+ * How long guest users will be kept after their last activity.
2812
+ * If the user has set up a RecoveryPhrase, `guestUserInactivityTimeoutSecondsRecoveryPhrase` is used instead (if defined).
2774
2813
  * @type {number}
2775
2814
  * @memberof ClientConfigUpdate
2776
2815
  */
2777
2816
  guestUserInactivityTimeoutSeconds?: number | null;
2817
+ /**
2818
+ * How long guest users will be kept after their last activity *if they have a RecoveryPhrase*.
2819
+ *
2820
+ * If the user has no RecoveryPhrase, `guestUserInactivityTimeoutSeconds` is used instead (if defined).
2821
+ * @type {number}
2822
+ * @memberof ClientConfigUpdate
2823
+ */
2824
+ guestUserInactivityTimeoutSecondsRecoveryPhrase?: number | null;
2778
2825
  /**
2779
2826
  *
2780
2827
  * @type {GuestUserLifetime}
@@ -4290,11 +4337,11 @@ declare function DemoAccountToJSONRecursive(value?: DemoAccount | null, ignorePa
4290
4337
  */
4291
4338
  declare class DemobrokerApi extends runtime.BaseAPI {
4292
4339
  /**
4293
- * Create an account at the demo broker for the logged-in user. The account will have a default set of two empty portfolios by default. If the setting `isSinglePortfolio` is set, only one portfolio is created. The account as well as the two portfolios have a randomly generated name. To log into an account, use the account\'s generated name as username (Account name) in `AddSession`. - with the password `42`, the login will succeed immediately - with the password `1337`, a challenge with type text will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - with the password `7`, a challenge with type base64png will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - other passwords will not allow to log in The demo broker implements the following pre-defined trade behaviors, so that different flows can be tested: - ISIN US0378331005 (Apple): - market buy order is executed after 10 seconds by the backend at a random quote - stop buy or stop loss order stays open forever (can be used for testing cancellation) - cost estimations contain a `costDetailsLink` and a `costAcceptancePrompt` - securityDetailedInfo is set, so a \"KID\" link should be displayed and linked to the corresponding table - the preparedTrade\'s `costEstimationMustBeShown` is true, so that the correct behavior (users cannot skip cost estimation in that case) can be tested. - ISIN LU0378438732 (a DAX ETF) - preparedTrade has `costEstimationIsOnlyDetailedTable` set to true, so that deviating order form behaviors can be tested - orders are rejected with code `ORDER_REJECTED` immediately - ISIN LU2611732046 (a DAX ETF) - preparedTrade has `costEstimationIsOnlyDetailedTable` set to true, so that deviating order form behaviors can be tested - two exchanges are available (\"xetra\" and \"quoteExchange\") - xetra allows market and limit orders for buying and has defaultValidityByOrderModel set to GFD for market and GTD 2030-01-01 for limit - orders are rejected with code `ORDER_REJECTED` immediately - ISIN DE000MD96WE8 (a knock out with DAX as underlying) - prepareTrade is rejected with a message that the user may not trade risky derivatives. - ISIN DE000DTR0CK8 (Daimler Truck Holding) - prepareTrade is rejected with a message that the user may not trade risky derivatives. - ISIN US4180561072 (Hasbro) - only quote orders on one exchange are supported - the quotes are valid for 45 seconds - quote value is always `42` - the order gets executed immediately - ISIN DE0005557508 (Deutsche Telekom) - only quote orders on two different exchanges are supported - the quotes do *NOT* have an expiration - quote value is always `42` - quote comes together with a costEstimation. Subsequent getCostEstimation calls are not allowed. - `noExchangeDefault` is true, so that exchange must be selected by the user - order will be canceled after 3 seconds - ISIN US98980L1017 (Zoom) - only market orders (both buy and sell) are suppored on one exchange - orders are executed immediately at a random quote - order creation requires the user to accept a hint (i.e. first try will result in a `MUST_ACCEPT_HINT` error) - default validity is set to `GTD` with a date of `2030-01-01` - ISIN US29786A1060 (Etsy) - the prepareTrade request takes 5 seconds - create challenge takes 5 seconds. for authMethod photoTAN, the challenge will return with an error after that period of time - only quote and market orders allowed - at exchange \"Slow exchange\" it takes 7 seconds to get a quote as well as 7 seconds to retrieve order costs - at exchange \"Exchange with quote and cost errors\" the quote request as well as cost estimation will end with an error after 3 seconds - the preparedTrade\'s `costEstimationMustBeShown` is true, so that the correct behavior (users cannot skip cost estimation in that case) can be tested. - ISIN XS2149280948 (bond from Bertelsmann) - quote, limit and market orders (both buy and sell) are supported on one exchange - limit orders are executed at exactly the limit price - market orders are executed at a random quote between 90 and 150 percent - for market orders, there is a legal message to confirm set (`legalMessagesToConfirmByOrderModel`) - ISIN US64110L1061 (Netflix Inc.) - one exchange with only quote order - creating the quote order will return an error (quote expired) - ISIN US67066G1040 (NVIDIA) - one exchange with only quote order, allowsQuoteModeLimit=true - quote orders are executed immediately. - if a quoteLimit is provided, execution happen at quoteLimit value - otherwise, a random execution quote will be used - ISIN DE000BAY0017 (Bayer AG) - one exchange with only market order - `costEstimationIsNotAvailable` is true, so no cost estimations should be linked/shown - orders will be canceled after 3 seconds - ISIN DE000PAH0038 (Porsche) - one exchange with only market order - all orders will be canceled - `GetCostEstimation` contains (only) a link to a PDF document. This can be used to test whether linking to a PDF works. - the instrument has both a `riskClassInfo.legalHint` as well as a `strikingHint`. Both should be visible in the order form. - ISIN DE0008404005 (Allianz) and some other hidden ISINs (can be requested from brokerize support) - one exchange with all available orderModels - orders are executed immediately - limit orders are executed at exactly the provided limit price - ISIN DE0008430026 (Munich Re) - one exchange (L&S) with all available orderModels - orders are executed immediately - ISIN FR0000120321 (L\'Oréal) - one exchange with all available orderModels - the exchange has a `securityQuotesToken` set - orders stay open - changesHaveCostEstimations is `true` for orders with this ISIN - ISIN US5949181045 (Microsoft) - one exchange with all available orderModels - if size is even, a partial execution with size 1 is executed, the remaining part stays open - if size is odd, a partial execution with size 1 is executed, the remaining part is canceled - ISIN US30303M1027 (Meta) - one exchange with all available orderModels - for each piece of the order size, there will be one execution with size 1 (so e.g. 10 executions for size 10) - sizes > 30 are not accepted - ISIN US2546871060 (Disney) - one exchange with all available orderModels - all orders are canceled after 3s - `costEstimationMustBeShown` is false and `costEstimationIsOnlyDetailedTable` is true (frontends must only show a link to the cost estimation table) - ISIN XX1234567890 (example of an ISIN that can never be mapped by frontends) - one exchange with all available orderModels - the instrument has two sellPositions to choose from (\"Sell Position A\" and \"Sell Position B\"). If no correct sell position is provided, trades will be rejected. - orders are executed immediately - ISIN DE0007100000 (Mercedes-Benz) - one exchange with all available orderModels - the instrument has two sellPositions to choose from (\"Sell Position A\" and \"Sell Position B\"). If no correct sell position is provided, trades will be rejected. - orders are executed immediately - ISIN DE0007472060 (Wirecard) - test instrument for `empty orderModelsBuy` / `onlySellAllowed` - ISIN BTC (Bitcoin/Euro) - has one exchange with support for quote, market and limit orders - orders will be executed right away (with the exception of limit orders with the limit 42. Those stay open!) - can be used to test frontend mapping of cryptos - when you prepare a trade in the *second* portfolio (which has two cash accounts), `sizeUnitsByCashAccountId` will be set, so that the frontend can let the user select a combination of `cashAccount` and `sizeUnit`. - positions of BTC/EUR will always have sizeDecimals=8 - ISIN DE0006231004 (Infineon Technologies AG) - one exchange with `orderModelsSell=[\'market\']` and `orderModelsBuy=[]` - ISIN DE0005552004 (Deutsche Post AG) - one exchange with `orderModelsSell=[]` and `orderModelsBuy=[\'market\']` - market buy orders are executed immediately - positions of DE0005552004 will always have sizeDecimals=undefined - ISIN US8740541094 (Take Two) - three exchanges are available. all have `market` and `limit` available - configuration for `takeProfitStopLoss` is different for the three exchanges. This can be used to test the implementation of takeProfit/stopLoss creation. - exchange_with_exclusive_tp_sl: `takeProfitStopLoss.exclusive` is `true`, so that only one of the two can be set. Also, both fields are limited to market buy orders - exchange_with_unlimited_tp_sl: `takeProfitStopLoss.exclusive` is `false`, so that both tp and sl may be set, for both sell and buy orders and both support orderModels - exchange_without_tp_sl: `takeProfitStopLoss` is not set, so that no tp/sl can be set - orders stay open forever - the order size can be changed (`allowsChangeSize=true`) - ISIN US5529531015 (MGM Resorts International) - one exchange with market and limit orders - orders are executed immediately - short selling is allowed, so `availableOrderIntents` as well as `availableOrderIntentsToken` is set. \"sell to open\" and \"buy to close\" can be tested here. - ISIN XAU (Gold) - only quote trading is allowed - depending on the selected portfolio, it is possible to select a cash account (e.g. EUR or USD) to trade with - users can chose between specifying the order size in the cash currency or in grams - quotes have the `totalAmount` field set - ISIN US88160R1014 (Tesla) - market, limit, stop buy trading is allowed - `GetCostEstimation` returns order fees - orders will be executed - order fees are saved for the order and returned in the order receipt - `CryptoPair` ADA-USD (Cardano - US Dollar) - `quote`, `market`, `limit` order models are available - One of the created demobroker portfolios does not have an USD cash account. For this portfolio an error will appear upon opening the order form - users can chose between specifying the order size in the cash currency (USD) or in ADA - validity types for limit orders are [`IOC`, `GTDT`]. With `GTDT` the user can specify a date AND time at which his order should be executed - the size input decimal places are limited per sizeUnit. For USD it\'s 2 and for ADA it is 4 decimal places - the orders will be executed after 10 seconds - ISIN US23804L1035 (Datadog Inc.) - only quote orders are available - in 80% of `CreateTrade` calls, a 400 error with the code `QUOTE_REJECTED_RETRYABLE` is returned. This can be used to test UIs which automatically retry `GetQuote` in this case. - ISIN DE0006969603 (Puma SE) - one exchange with all orderModels - orders stay open forever - `allowsChangeValidityTypes` is empty, so it is not possible to change the order validity - `changesHaveCostEstimations=false`, so it is not possible to receive cost estimations for order changes) - all other orders will be canceled after 3 seconds When orders are created using a `decoupled` method, the order id is only returned if the order size is greater than `5`. This can be used to test if the order receipt is skipped correctly in UIs. Cost estimations for `buy` and `sell` return a different set of fields. This can be used to test proper UI behavior when fields are set or unavailable. Behavior of `PortfolioQuotes` in the demo broker: - portfolio 1 starts with 100.000€ cash. portfolio 2 has two cash accounts, one starts with 100.000€, one with 100.000$. - when cash account values are summed up, we just assume an exchange rate of 1:1 - each open buy order reserves 10€ cash from the availableCash - profit loss of the portfolio is the sum of the position\'s profit loss - if a EUR cashAccount has the value 0,00€, its `hideInOverviews` property is set to true. This can be used to test the frontend\'s behavior when a cash account is hidden.
4340
+ * Create an account at the demo broker for the logged-in user. The account will have a default set of two empty portfolios by default. If the setting `isSinglePortfolio` is set, only one portfolio is created. The account as well as the two portfolios have a randomly generated name. To log into an account, use the account\'s generated name as username (Account name) in `AddSession`. - with the password `42`, the login will succeed immediately - with the password `1337`, a challenge with type text will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - with the password `7`, a challenge with type base64png will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - other passwords will not allow to log in The demo broker simulates different market scenarios for various ISINs (e.g., partial executions, error cases, or specific cost structures). A complete overview of these test ISINs and their behavior can be found in the guide [Demo Broker Test Scenarios](https://developer.brokerize.com/docs/demobroker-isins). Behavior of `PortfolioQuotes` in the demo broker: - portfolio 1 starts with 100.000€ cash. portfolio 2 has two cash accounts, one starts with 100.000€, one with 100.000$. - when cash account values are summed up, we just assume an exchange rate of 1:1 - each open buy order reserves 10€ cash from the availableCash - profit loss of the portfolio is the sum of the position\'s profit loss - if a EUR cashAccount has the value 0,00€, its `hideInOverviews` property is set to true. This can be used to test the frontend\'s behavior when a cash account is hidden.
4294
4341
  */
4295
4342
  createDemoAccountRaw(requestParameters: CreateDemoAccountRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<CreatedResponseBody>>;
4296
4343
  /**
4297
- * Create an account at the demo broker for the logged-in user. The account will have a default set of two empty portfolios by default. If the setting `isSinglePortfolio` is set, only one portfolio is created. The account as well as the two portfolios have a randomly generated name. To log into an account, use the account\'s generated name as username (Account name) in `AddSession`. - with the password `42`, the login will succeed immediately - with the password `1337`, a challenge with type text will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - with the password `7`, a challenge with type base64png will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - other passwords will not allow to log in The demo broker implements the following pre-defined trade behaviors, so that different flows can be tested: - ISIN US0378331005 (Apple): - market buy order is executed after 10 seconds by the backend at a random quote - stop buy or stop loss order stays open forever (can be used for testing cancellation) - cost estimations contain a `costDetailsLink` and a `costAcceptancePrompt` - securityDetailedInfo is set, so a \"KID\" link should be displayed and linked to the corresponding table - the preparedTrade\'s `costEstimationMustBeShown` is true, so that the correct behavior (users cannot skip cost estimation in that case) can be tested. - ISIN LU0378438732 (a DAX ETF) - preparedTrade has `costEstimationIsOnlyDetailedTable` set to true, so that deviating order form behaviors can be tested - orders are rejected with code `ORDER_REJECTED` immediately - ISIN LU2611732046 (a DAX ETF) - preparedTrade has `costEstimationIsOnlyDetailedTable` set to true, so that deviating order form behaviors can be tested - two exchanges are available (\"xetra\" and \"quoteExchange\") - xetra allows market and limit orders for buying and has defaultValidityByOrderModel set to GFD for market and GTD 2030-01-01 for limit - orders are rejected with code `ORDER_REJECTED` immediately - ISIN DE000MD96WE8 (a knock out with DAX as underlying) - prepareTrade is rejected with a message that the user may not trade risky derivatives. - ISIN DE000DTR0CK8 (Daimler Truck Holding) - prepareTrade is rejected with a message that the user may not trade risky derivatives. - ISIN US4180561072 (Hasbro) - only quote orders on one exchange are supported - the quotes are valid for 45 seconds - quote value is always `42` - the order gets executed immediately - ISIN DE0005557508 (Deutsche Telekom) - only quote orders on two different exchanges are supported - the quotes do *NOT* have an expiration - quote value is always `42` - quote comes together with a costEstimation. Subsequent getCostEstimation calls are not allowed. - `noExchangeDefault` is true, so that exchange must be selected by the user - order will be canceled after 3 seconds - ISIN US98980L1017 (Zoom) - only market orders (both buy and sell) are suppored on one exchange - orders are executed immediately at a random quote - order creation requires the user to accept a hint (i.e. first try will result in a `MUST_ACCEPT_HINT` error) - default validity is set to `GTD` with a date of `2030-01-01` - ISIN US29786A1060 (Etsy) - the prepareTrade request takes 5 seconds - create challenge takes 5 seconds. for authMethod photoTAN, the challenge will return with an error after that period of time - only quote and market orders allowed - at exchange \"Slow exchange\" it takes 7 seconds to get a quote as well as 7 seconds to retrieve order costs - at exchange \"Exchange with quote and cost errors\" the quote request as well as cost estimation will end with an error after 3 seconds - the preparedTrade\'s `costEstimationMustBeShown` is true, so that the correct behavior (users cannot skip cost estimation in that case) can be tested. - ISIN XS2149280948 (bond from Bertelsmann) - quote, limit and market orders (both buy and sell) are supported on one exchange - limit orders are executed at exactly the limit price - market orders are executed at a random quote between 90 and 150 percent - for market orders, there is a legal message to confirm set (`legalMessagesToConfirmByOrderModel`) - ISIN US64110L1061 (Netflix Inc.) - one exchange with only quote order - creating the quote order will return an error (quote expired) - ISIN US67066G1040 (NVIDIA) - one exchange with only quote order, allowsQuoteModeLimit=true - quote orders are executed immediately. - if a quoteLimit is provided, execution happen at quoteLimit value - otherwise, a random execution quote will be used - ISIN DE000BAY0017 (Bayer AG) - one exchange with only market order - `costEstimationIsNotAvailable` is true, so no cost estimations should be linked/shown - orders will be canceled after 3 seconds - ISIN DE000PAH0038 (Porsche) - one exchange with only market order - all orders will be canceled - `GetCostEstimation` contains (only) a link to a PDF document. This can be used to test whether linking to a PDF works. - the instrument has both a `riskClassInfo.legalHint` as well as a `strikingHint`. Both should be visible in the order form. - ISIN DE0008404005 (Allianz) and some other hidden ISINs (can be requested from brokerize support) - one exchange with all available orderModels - orders are executed immediately - limit orders are executed at exactly the provided limit price - ISIN DE0008430026 (Munich Re) - one exchange (L&S) with all available orderModels - orders are executed immediately - ISIN FR0000120321 (L\'Oréal) - one exchange with all available orderModels - the exchange has a `securityQuotesToken` set - orders stay open - changesHaveCostEstimations is `true` for orders with this ISIN - ISIN US5949181045 (Microsoft) - one exchange with all available orderModels - if size is even, a partial execution with size 1 is executed, the remaining part stays open - if size is odd, a partial execution with size 1 is executed, the remaining part is canceled - ISIN US30303M1027 (Meta) - one exchange with all available orderModels - for each piece of the order size, there will be one execution with size 1 (so e.g. 10 executions for size 10) - sizes > 30 are not accepted - ISIN US2546871060 (Disney) - one exchange with all available orderModels - all orders are canceled after 3s - `costEstimationMustBeShown` is false and `costEstimationIsOnlyDetailedTable` is true (frontends must only show a link to the cost estimation table) - ISIN XX1234567890 (example of an ISIN that can never be mapped by frontends) - one exchange with all available orderModels - the instrument has two sellPositions to choose from (\"Sell Position A\" and \"Sell Position B\"). If no correct sell position is provided, trades will be rejected. - orders are executed immediately - ISIN DE0007100000 (Mercedes-Benz) - one exchange with all available orderModels - the instrument has two sellPositions to choose from (\"Sell Position A\" and \"Sell Position B\"). If no correct sell position is provided, trades will be rejected. - orders are executed immediately - ISIN DE0007472060 (Wirecard) - test instrument for `empty orderModelsBuy` / `onlySellAllowed` - ISIN BTC (Bitcoin/Euro) - has one exchange with support for quote, market and limit orders - orders will be executed right away (with the exception of limit orders with the limit 42. Those stay open!) - can be used to test frontend mapping of cryptos - when you prepare a trade in the *second* portfolio (which has two cash accounts), `sizeUnitsByCashAccountId` will be set, so that the frontend can let the user select a combination of `cashAccount` and `sizeUnit`. - positions of BTC/EUR will always have sizeDecimals=8 - ISIN DE0006231004 (Infineon Technologies AG) - one exchange with `orderModelsSell=[\'market\']` and `orderModelsBuy=[]` - ISIN DE0005552004 (Deutsche Post AG) - one exchange with `orderModelsSell=[]` and `orderModelsBuy=[\'market\']` - market buy orders are executed immediately - positions of DE0005552004 will always have sizeDecimals=undefined - ISIN US8740541094 (Take Two) - three exchanges are available. all have `market` and `limit` available - configuration for `takeProfitStopLoss` is different for the three exchanges. This can be used to test the implementation of takeProfit/stopLoss creation. - exchange_with_exclusive_tp_sl: `takeProfitStopLoss.exclusive` is `true`, so that only one of the two can be set. Also, both fields are limited to market buy orders - exchange_with_unlimited_tp_sl: `takeProfitStopLoss.exclusive` is `false`, so that both tp and sl may be set, for both sell and buy orders and both support orderModels - exchange_without_tp_sl: `takeProfitStopLoss` is not set, so that no tp/sl can be set - orders stay open forever - the order size can be changed (`allowsChangeSize=true`) - ISIN US5529531015 (MGM Resorts International) - one exchange with market and limit orders - orders are executed immediately - short selling is allowed, so `availableOrderIntents` as well as `availableOrderIntentsToken` is set. \"sell to open\" and \"buy to close\" can be tested here. - ISIN XAU (Gold) - only quote trading is allowed - depending on the selected portfolio, it is possible to select a cash account (e.g. EUR or USD) to trade with - users can chose between specifying the order size in the cash currency or in grams - quotes have the `totalAmount` field set - ISIN US88160R1014 (Tesla) - market, limit, stop buy trading is allowed - `GetCostEstimation` returns order fees - orders will be executed - order fees are saved for the order and returned in the order receipt - `CryptoPair` ADA-USD (Cardano - US Dollar) - `quote`, `market`, `limit` order models are available - One of the created demobroker portfolios does not have an USD cash account. For this portfolio an error will appear upon opening the order form - users can chose between specifying the order size in the cash currency (USD) or in ADA - validity types for limit orders are [`IOC`, `GTDT`]. With `GTDT` the user can specify a date AND time at which his order should be executed - the size input decimal places are limited per sizeUnit. For USD it\'s 2 and for ADA it is 4 decimal places - the orders will be executed after 10 seconds - ISIN US23804L1035 (Datadog Inc.) - only quote orders are available - in 80% of `CreateTrade` calls, a 400 error with the code `QUOTE_REJECTED_RETRYABLE` is returned. This can be used to test UIs which automatically retry `GetQuote` in this case. - ISIN DE0006969603 (Puma SE) - one exchange with all orderModels - orders stay open forever - `allowsChangeValidityTypes` is empty, so it is not possible to change the order validity - `changesHaveCostEstimations=false`, so it is not possible to receive cost estimations for order changes) - all other orders will be canceled after 3 seconds When orders are created using a `decoupled` method, the order id is only returned if the order size is greater than `5`. This can be used to test if the order receipt is skipped correctly in UIs. Cost estimations for `buy` and `sell` return a different set of fields. This can be used to test proper UI behavior when fields are set or unavailable. Behavior of `PortfolioQuotes` in the demo broker: - portfolio 1 starts with 100.000€ cash. portfolio 2 has two cash accounts, one starts with 100.000€, one with 100.000$. - when cash account values are summed up, we just assume an exchange rate of 1:1 - each open buy order reserves 10€ cash from the availableCash - profit loss of the portfolio is the sum of the position\'s profit loss - if a EUR cashAccount has the value 0,00€, its `hideInOverviews` property is set to true. This can be used to test the frontend\'s behavior when a cash account is hidden.
4344
+ * Create an account at the demo broker for the logged-in user. The account will have a default set of two empty portfolios by default. If the setting `isSinglePortfolio` is set, only one portfolio is created. The account as well as the two portfolios have a randomly generated name. To log into an account, use the account\'s generated name as username (Account name) in `AddSession`. - with the password `42`, the login will succeed immediately - with the password `1337`, a challenge with type text will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - with the password `7`, a challenge with type base64png will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - other passwords will not allow to log in The demo broker simulates different market scenarios for various ISINs (e.g., partial executions, error cases, or specific cost structures). A complete overview of these test ISINs and their behavior can be found in the guide [Demo Broker Test Scenarios](https://developer.brokerize.com/docs/demobroker-isins). Behavior of `PortfolioQuotes` in the demo broker: - portfolio 1 starts with 100.000€ cash. portfolio 2 has two cash accounts, one starts with 100.000€, one with 100.000$. - when cash account values are summed up, we just assume an exchange rate of 1:1 - each open buy order reserves 10€ cash from the availableCash - profit loss of the portfolio is the sum of the position\'s profit loss - if a EUR cashAccount has the value 0,00€, its `hideInOverviews` property is set to true. This can be used to test the frontend\'s behavior when a cash account is hidden.
4298
4345
  */
4299
4346
  createDemoAccount(requestParameters?: CreateDemoAccountRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<CreatedResponseBody>;
4300
4347
  /**
@@ -7829,6 +7876,7 @@ declare namespace Models {
7829
7876
  Security,
7830
7877
  SecuritySelector,
7831
7878
  SecurityDetailedInfo,
7879
+ SecurityLogoUrls,
7832
7880
  SellPosition,
7833
7881
  Session,
7834
7882
  SessionResponse,
@@ -7856,7 +7904,10 @@ declare namespace Models {
7856
7904
  TradeStatistics,
7857
7905
  GetPortfolioCalendarResponse,
7858
7906
  PortfolioCalendarDateRange,
7859
- PortfolioCalendarItem
7907
+ PortfolioCalendarItem,
7908
+ GetRecoveryPhrasesResponse,
7909
+ CreateRecoveryPhraseResult,
7910
+ CheckRecoveryPhrase200Response
7860
7911
  }
7861
7912
  }
7862
7913
  export { Models }
@@ -9208,6 +9259,11 @@ declare namespace openApiClient {
9208
9259
  SecurityDetailedInfoToJSONRecursive,
9209
9260
  SecurityDetailedInfoToJSON,
9210
9261
  SecurityDetailedInfo,
9262
+ SecurityLogoUrlsFromJSON,
9263
+ SecurityLogoUrlsFromJSONTyped,
9264
+ SecurityLogoUrlsToJSONRecursive,
9265
+ SecurityLogoUrlsToJSON,
9266
+ SecurityLogoUrls,
9211
9267
  SecurityQuoteFromJSON,
9212
9268
  SecurityQuoteFromJSONTyped,
9213
9269
  SecurityQuoteToJSONRecursive,
@@ -9596,6 +9652,12 @@ declare interface Order {
9596
9652
  * @memberof Order
9597
9653
  */
9598
9654
  intent?: OrderIntentEnum;
9655
+ /**
9656
+ * If this is true, the order data retrieved from the broker is incomplete. Fields may be missing or be incomplete.
9657
+ * @type {boolean}
9658
+ * @memberof Order
9659
+ */
9660
+ isIncomplete?: boolean;
9599
9661
  /**
9600
9662
  * The ISIN of the security to trade, if applicable. Note that at least one of `isin` and `usTicker` must be set.
9601
9663
  *
@@ -9939,7 +10001,7 @@ declare interface OrderCostEstimation {
9939
10001
  /**
9940
10002
  * If present, users have to accept this message before creating an order.
9941
10003
  * If accepting the costs and performing the order is one click (which is allowed), the create order button label
9942
- * must contain the information that costs are accepted.
10004
+ * must contain the information that costs are accepted. May contain (some) HTML
9943
10005
  * @type {string}
9944
10006
  * @memberof OrderCostEstimation
9945
10007
  */
@@ -12436,6 +12498,12 @@ declare interface Security {
12436
12498
  * @deprecated
12437
12499
  */
12438
12500
  isin?: string;
12501
+ /**
12502
+ *
12503
+ * @type {SecurityLogoUrls}
12504
+ * @memberof Security
12505
+ */
12506
+ logos?: SecurityLogoUrls;
12439
12507
  /**
12440
12508
  *
12441
12509
  * @type {string}
@@ -12536,6 +12604,39 @@ declare function SecurityFromJSON(json: any): Security;
12536
12604
 
12537
12605
  declare function SecurityFromJSONTyped(json: any, ignoreDiscriminator: boolean): Security;
12538
12606
 
12607
+ /**
12608
+ * brokerize
12609
+ * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
12610
+ *
12611
+ *
12612
+ *
12613
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12614
+ * https://openapi-generator.tech
12615
+ * Do not edit the class manually.
12616
+ */
12617
+ /**
12618
+ * URLs to logos (e.g. company logos) for a security. Only present if the
12619
+ * client is configured to receive logos (`allowSecurityLogos`).
12620
+ * @export
12621
+ * @interface SecurityLogoUrls
12622
+ */
12623
+ declare interface SecurityLogoUrls {
12624
+ /**
12625
+ * Square SVG logo. Directly embeddable URL served via `logos.brokerize.com`.
12626
+ * @type {string}
12627
+ * @memberof SecurityLogoUrls
12628
+ */
12629
+ svgSquare?: string;
12630
+ }
12631
+
12632
+ declare function SecurityLogoUrlsFromJSON(json: any): SecurityLogoUrls;
12633
+
12634
+ declare function SecurityLogoUrlsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecurityLogoUrls;
12635
+
12636
+ declare function SecurityLogoUrlsToJSON(value?: SecurityLogoUrls | null): any;
12637
+
12638
+ declare function SecurityLogoUrlsToJSONRecursive(value?: SecurityLogoUrls | null, ignoreParent?: boolean): any;
12639
+
12539
12640
  /**
12540
12641
  * brokerize
12541
12642
  * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Auth, AuthContextConfiguration, BrokerizeConfig, CognitoConfig, CognitoFacade, CognitoPoolConfig, GuestAuthContextConfiguration, RegisteredUserAuthContextConfiguration, TokenSet } from "./apiCtx";
2
2
  import { AuthorizedApiContext } from "./authorizedApiContext";
3
3
  import { BrokerizeError } from "./errors";
4
+ import * as openApiClient from "./swagger";
4
5
  import * as Models from "./modelExports";
5
6
  import { BrokerizeWebSocketClient, Callback, Subscription } from "./websocketClient";
6
7
  import * as WebSocketTypes from "./websocketTypes";
@@ -34,6 +35,8 @@ export declare class Brokerize {
34
35
  * @returns
35
36
  */
36
37
  createAuth(authCtxCfg: AuthContextConfiguration, tokenRefreshCallback?: TokenRefreshCallback): Auth;
38
+ checkRecoveryPhrase(recoveryPhrase: string): Promise<openApiClient.CheckRecoveryPhrase200Response>;
39
+ obtainTokenByRecoveryPhrase(recoveryPhrase: string): Promise<AuthContextConfiguration>;
37
40
  /**
38
41
  * Create a customized WebSocket client. You can override the WebSocket connection URL and the Auth implementation
39
42
  * for a custom token retrieval behavior.
package/dist/index.js CHANGED
@@ -35,7 +35,15 @@ export class Brokerize {
35
35
  cfg.createWebSocket = (url, protocol) => new global.WebSocket(url, protocol);
36
36
  }
37
37
  this._cfg = cfg;
38
- this._userApi = new openApiClient.UserApi(createConfiguration(cfg));
38
+ const postMiddleware = async (r) => {
39
+ const statusCode = r.response.status;
40
+ if (statusCode >= 400) {
41
+ const decJson = (await r.response.json());
42
+ const err = new BrokerizeError(statusCode, decJson);
43
+ throw err;
44
+ }
45
+ };
46
+ this._userApi = new openApiClient.UserApi(createConfiguration(cfg)).withPostMiddleware(postMiddleware);
39
47
  }
40
48
  async refreshGuestUser(refreshToken) {
41
49
  const response = await fetch(this._cfg.basePath + "/user/token", {
@@ -125,6 +133,35 @@ export class Brokerize {
125
133
  },
126
134
  });
127
135
  }
136
+ checkRecoveryPhrase(recoveryPhrase) {
137
+ return this._userApi.checkRecoveryPhrase({
138
+ obtainTokenByRecoveryPhraseParams: { recoveryPhrase },
139
+ }, {
140
+ headers: {
141
+ "x-brkrz-client-id": this._cfg.clientId,
142
+ "Content-Type": "application/json",
143
+ },
144
+ });
145
+ }
146
+ async obtainTokenByRecoveryPhrase(recoveryPhrase) {
147
+ const tokResult = await this._userApi.obtainTokenByRecoveryPhrase({
148
+ obtainTokenByRecoveryPhraseParams: { recoveryPhrase },
149
+ }, {
150
+ headers: {
151
+ "x-brkrz-client-id": this._cfg.clientId,
152
+ "Content-Type": "application/json",
153
+ },
154
+ });
155
+ const updatedAt = Date.now();
156
+ return {
157
+ type: "guest",
158
+ idToken: "", // deprecated
159
+ tokens: {
160
+ updatedAt,
161
+ response: tokResult,
162
+ },
163
+ };
164
+ }
128
165
  /**
129
166
  * Create a customized WebSocket client. You can override the WebSocket connection URL and the Auth implementation
130
167
  * for a custom token retrieval behavior.
@@ -135,6 +135,7 @@ export { RiskClassInfo } from "./swagger/models/RiskClassInfo";
135
135
  export { Security } from "./swagger/models/Security";
136
136
  export { SecuritySelector } from "./swagger/models/SecuritySelector";
137
137
  export { SecurityDetailedInfo } from "./swagger/models/SecurityDetailedInfo";
138
+ export { SecurityLogoUrls } from "./swagger/models/SecurityLogoUrls";
138
139
  export { SellPosition } from "./swagger/models/SellPosition";
139
140
  export { Session } from "./swagger/models/Session";
140
141
  export { SessionResponse } from "./swagger/models/SessionResponse";
@@ -162,3 +163,6 @@ export { TradeStatistics } from "./swagger/models/TradeStatistics";
162
163
  export { GetPortfolioCalendarResponse } from "./swagger/models/GetPortfolioCalendarResponse";
163
164
  export { PortfolioCalendarDateRange } from "./swagger/models/PortfolioCalendarDateRange";
164
165
  export { PortfolioCalendarItem } from "./swagger/models/PortfolioCalendarItem";
166
+ export { GetRecoveryPhrasesResponse } from "./swagger/models/GetRecoveryPhrasesResponse";
167
+ export { CreateRecoveryPhraseResult } from "./swagger/models/CreateRecoveryPhraseResult";
168
+ export { CheckRecoveryPhrase200Response } from "./swagger/models/CheckRecoveryPhrase200Response";
@@ -24,11 +24,11 @@ export interface TriggerDemoSessionSyncErrorRequest {
24
24
  */
25
25
  export declare class DemobrokerApi extends runtime.BaseAPI {
26
26
  /**
27
- * Create an account at the demo broker for the logged-in user. The account will have a default set of two empty portfolios by default. If the setting `isSinglePortfolio` is set, only one portfolio is created. The account as well as the two portfolios have a randomly generated name. To log into an account, use the account\'s generated name as username (Account name) in `AddSession`. - with the password `42`, the login will succeed immediately - with the password `1337`, a challenge with type text will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - with the password `7`, a challenge with type base64png will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - other passwords will not allow to log in The demo broker implements the following pre-defined trade behaviors, so that different flows can be tested: - ISIN US0378331005 (Apple): - market buy order is executed after 10 seconds by the backend at a random quote - stop buy or stop loss order stays open forever (can be used for testing cancellation) - cost estimations contain a `costDetailsLink` and a `costAcceptancePrompt` - securityDetailedInfo is set, so a \"KID\" link should be displayed and linked to the corresponding table - the preparedTrade\'s `costEstimationMustBeShown` is true, so that the correct behavior (users cannot skip cost estimation in that case) can be tested. - ISIN LU0378438732 (a DAX ETF) - preparedTrade has `costEstimationIsOnlyDetailedTable` set to true, so that deviating order form behaviors can be tested - orders are rejected with code `ORDER_REJECTED` immediately - ISIN LU2611732046 (a DAX ETF) - preparedTrade has `costEstimationIsOnlyDetailedTable` set to true, so that deviating order form behaviors can be tested - two exchanges are available (\"xetra\" and \"quoteExchange\") - xetra allows market and limit orders for buying and has defaultValidityByOrderModel set to GFD for market and GTD 2030-01-01 for limit - orders are rejected with code `ORDER_REJECTED` immediately - ISIN DE000MD96WE8 (a knock out with DAX as underlying) - prepareTrade is rejected with a message that the user may not trade risky derivatives. - ISIN DE000DTR0CK8 (Daimler Truck Holding) - prepareTrade is rejected with a message that the user may not trade risky derivatives. - ISIN US4180561072 (Hasbro) - only quote orders on one exchange are supported - the quotes are valid for 45 seconds - quote value is always `42` - the order gets executed immediately - ISIN DE0005557508 (Deutsche Telekom) - only quote orders on two different exchanges are supported - the quotes do *NOT* have an expiration - quote value is always `42` - quote comes together with a costEstimation. Subsequent getCostEstimation calls are not allowed. - `noExchangeDefault` is true, so that exchange must be selected by the user - order will be canceled after 3 seconds - ISIN US98980L1017 (Zoom) - only market orders (both buy and sell) are suppored on one exchange - orders are executed immediately at a random quote - order creation requires the user to accept a hint (i.e. first try will result in a `MUST_ACCEPT_HINT` error) - default validity is set to `GTD` with a date of `2030-01-01` - ISIN US29786A1060 (Etsy) - the prepareTrade request takes 5 seconds - create challenge takes 5 seconds. for authMethod photoTAN, the challenge will return with an error after that period of time - only quote and market orders allowed - at exchange \"Slow exchange\" it takes 7 seconds to get a quote as well as 7 seconds to retrieve order costs - at exchange \"Exchange with quote and cost errors\" the quote request as well as cost estimation will end with an error after 3 seconds - the preparedTrade\'s `costEstimationMustBeShown` is true, so that the correct behavior (users cannot skip cost estimation in that case) can be tested. - ISIN XS2149280948 (bond from Bertelsmann) - quote, limit and market orders (both buy and sell) are supported on one exchange - limit orders are executed at exactly the limit price - market orders are executed at a random quote between 90 and 150 percent - for market orders, there is a legal message to confirm set (`legalMessagesToConfirmByOrderModel`) - ISIN US64110L1061 (Netflix Inc.) - one exchange with only quote order - creating the quote order will return an error (quote expired) - ISIN US67066G1040 (NVIDIA) - one exchange with only quote order, allowsQuoteModeLimit=true - quote orders are executed immediately. - if a quoteLimit is provided, execution happen at quoteLimit value - otherwise, a random execution quote will be used - ISIN DE000BAY0017 (Bayer AG) - one exchange with only market order - `costEstimationIsNotAvailable` is true, so no cost estimations should be linked/shown - orders will be canceled after 3 seconds - ISIN DE000PAH0038 (Porsche) - one exchange with only market order - all orders will be canceled - `GetCostEstimation` contains (only) a link to a PDF document. This can be used to test whether linking to a PDF works. - the instrument has both a `riskClassInfo.legalHint` as well as a `strikingHint`. Both should be visible in the order form. - ISIN DE0008404005 (Allianz) and some other hidden ISINs (can be requested from brokerize support) - one exchange with all available orderModels - orders are executed immediately - limit orders are executed at exactly the provided limit price - ISIN DE0008430026 (Munich Re) - one exchange (L&S) with all available orderModels - orders are executed immediately - ISIN FR0000120321 (L\'Oréal) - one exchange with all available orderModels - the exchange has a `securityQuotesToken` set - orders stay open - changesHaveCostEstimations is `true` for orders with this ISIN - ISIN US5949181045 (Microsoft) - one exchange with all available orderModels - if size is even, a partial execution with size 1 is executed, the remaining part stays open - if size is odd, a partial execution with size 1 is executed, the remaining part is canceled - ISIN US30303M1027 (Meta) - one exchange with all available orderModels - for each piece of the order size, there will be one execution with size 1 (so e.g. 10 executions for size 10) - sizes > 30 are not accepted - ISIN US2546871060 (Disney) - one exchange with all available orderModels - all orders are canceled after 3s - `costEstimationMustBeShown` is false and `costEstimationIsOnlyDetailedTable` is true (frontends must only show a link to the cost estimation table) - ISIN XX1234567890 (example of an ISIN that can never be mapped by frontends) - one exchange with all available orderModels - the instrument has two sellPositions to choose from (\"Sell Position A\" and \"Sell Position B\"). If no correct sell position is provided, trades will be rejected. - orders are executed immediately - ISIN DE0007100000 (Mercedes-Benz) - one exchange with all available orderModels - the instrument has two sellPositions to choose from (\"Sell Position A\" and \"Sell Position B\"). If no correct sell position is provided, trades will be rejected. - orders are executed immediately - ISIN DE0007472060 (Wirecard) - test instrument for `empty orderModelsBuy` / `onlySellAllowed` - ISIN BTC (Bitcoin/Euro) - has one exchange with support for quote, market and limit orders - orders will be executed right away (with the exception of limit orders with the limit 42. Those stay open!) - can be used to test frontend mapping of cryptos - when you prepare a trade in the *second* portfolio (which has two cash accounts), `sizeUnitsByCashAccountId` will be set, so that the frontend can let the user select a combination of `cashAccount` and `sizeUnit`. - positions of BTC/EUR will always have sizeDecimals=8 - ISIN DE0006231004 (Infineon Technologies AG) - one exchange with `orderModelsSell=[\'market\']` and `orderModelsBuy=[]` - ISIN DE0005552004 (Deutsche Post AG) - one exchange with `orderModelsSell=[]` and `orderModelsBuy=[\'market\']` - market buy orders are executed immediately - positions of DE0005552004 will always have sizeDecimals=undefined - ISIN US8740541094 (Take Two) - three exchanges are available. all have `market` and `limit` available - configuration for `takeProfitStopLoss` is different for the three exchanges. This can be used to test the implementation of takeProfit/stopLoss creation. - exchange_with_exclusive_tp_sl: `takeProfitStopLoss.exclusive` is `true`, so that only one of the two can be set. Also, both fields are limited to market buy orders - exchange_with_unlimited_tp_sl: `takeProfitStopLoss.exclusive` is `false`, so that both tp and sl may be set, for both sell and buy orders and both support orderModels - exchange_without_tp_sl: `takeProfitStopLoss` is not set, so that no tp/sl can be set - orders stay open forever - the order size can be changed (`allowsChangeSize=true`) - ISIN US5529531015 (MGM Resorts International) - one exchange with market and limit orders - orders are executed immediately - short selling is allowed, so `availableOrderIntents` as well as `availableOrderIntentsToken` is set. \"sell to open\" and \"buy to close\" can be tested here. - ISIN XAU (Gold) - only quote trading is allowed - depending on the selected portfolio, it is possible to select a cash account (e.g. EUR or USD) to trade with - users can chose between specifying the order size in the cash currency or in grams - quotes have the `totalAmount` field set - ISIN US88160R1014 (Tesla) - market, limit, stop buy trading is allowed - `GetCostEstimation` returns order fees - orders will be executed - order fees are saved for the order and returned in the order receipt - `CryptoPair` ADA-USD (Cardano - US Dollar) - `quote`, `market`, `limit` order models are available - One of the created demobroker portfolios does not have an USD cash account. For this portfolio an error will appear upon opening the order form - users can chose between specifying the order size in the cash currency (USD) or in ADA - validity types for limit orders are [`IOC`, `GTDT`]. With `GTDT` the user can specify a date AND time at which his order should be executed - the size input decimal places are limited per sizeUnit. For USD it\'s 2 and for ADA it is 4 decimal places - the orders will be executed after 10 seconds - ISIN US23804L1035 (Datadog Inc.) - only quote orders are available - in 80% of `CreateTrade` calls, a 400 error with the code `QUOTE_REJECTED_RETRYABLE` is returned. This can be used to test UIs which automatically retry `GetQuote` in this case. - ISIN DE0006969603 (Puma SE) - one exchange with all orderModels - orders stay open forever - `allowsChangeValidityTypes` is empty, so it is not possible to change the order validity - `changesHaveCostEstimations=false`, so it is not possible to receive cost estimations for order changes) - all other orders will be canceled after 3 seconds When orders are created using a `decoupled` method, the order id is only returned if the order size is greater than `5`. This can be used to test if the order receipt is skipped correctly in UIs. Cost estimations for `buy` and `sell` return a different set of fields. This can be used to test proper UI behavior when fields are set or unavailable. Behavior of `PortfolioQuotes` in the demo broker: - portfolio 1 starts with 100.000€ cash. portfolio 2 has two cash accounts, one starts with 100.000€, one with 100.000$. - when cash account values are summed up, we just assume an exchange rate of 1:1 - each open buy order reserves 10€ cash from the availableCash - profit loss of the portfolio is the sum of the position\'s profit loss - if a EUR cashAccount has the value 0,00€, its `hideInOverviews` property is set to true. This can be used to test the frontend\'s behavior when a cash account is hidden.
27
+ * Create an account at the demo broker for the logged-in user. The account will have a default set of two empty portfolios by default. If the setting `isSinglePortfolio` is set, only one portfolio is created. The account as well as the two portfolios have a randomly generated name. To log into an account, use the account\'s generated name as username (Account name) in `AddSession`. - with the password `42`, the login will succeed immediately - with the password `1337`, a challenge with type text will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - with the password `7`, a challenge with type base64png will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - other passwords will not allow to log in The demo broker simulates different market scenarios for various ISINs (e.g., partial executions, error cases, or specific cost structures). A complete overview of these test ISINs and their behavior can be found in the guide [Demo Broker Test Scenarios](https://developer.brokerize.com/docs/demobroker-isins). Behavior of `PortfolioQuotes` in the demo broker: - portfolio 1 starts with 100.000€ cash. portfolio 2 has two cash accounts, one starts with 100.000€, one with 100.000$. - when cash account values are summed up, we just assume an exchange rate of 1:1 - each open buy order reserves 10€ cash from the availableCash - profit loss of the portfolio is the sum of the position\'s profit loss - if a EUR cashAccount has the value 0,00€, its `hideInOverviews` property is set to true. This can be used to test the frontend\'s behavior when a cash account is hidden.
28
28
  */
29
29
  createDemoAccountRaw(requestParameters: CreateDemoAccountRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<CreatedResponseBody>>;
30
30
  /**
31
- * Create an account at the demo broker for the logged-in user. The account will have a default set of two empty portfolios by default. If the setting `isSinglePortfolio` is set, only one portfolio is created. The account as well as the two portfolios have a randomly generated name. To log into an account, use the account\'s generated name as username (Account name) in `AddSession`. - with the password `42`, the login will succeed immediately - with the password `1337`, a challenge with type text will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - with the password `7`, a challenge with type base64png will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - other passwords will not allow to log in The demo broker implements the following pre-defined trade behaviors, so that different flows can be tested: - ISIN US0378331005 (Apple): - market buy order is executed after 10 seconds by the backend at a random quote - stop buy or stop loss order stays open forever (can be used for testing cancellation) - cost estimations contain a `costDetailsLink` and a `costAcceptancePrompt` - securityDetailedInfo is set, so a \"KID\" link should be displayed and linked to the corresponding table - the preparedTrade\'s `costEstimationMustBeShown` is true, so that the correct behavior (users cannot skip cost estimation in that case) can be tested. - ISIN LU0378438732 (a DAX ETF) - preparedTrade has `costEstimationIsOnlyDetailedTable` set to true, so that deviating order form behaviors can be tested - orders are rejected with code `ORDER_REJECTED` immediately - ISIN LU2611732046 (a DAX ETF) - preparedTrade has `costEstimationIsOnlyDetailedTable` set to true, so that deviating order form behaviors can be tested - two exchanges are available (\"xetra\" and \"quoteExchange\") - xetra allows market and limit orders for buying and has defaultValidityByOrderModel set to GFD for market and GTD 2030-01-01 for limit - orders are rejected with code `ORDER_REJECTED` immediately - ISIN DE000MD96WE8 (a knock out with DAX as underlying) - prepareTrade is rejected with a message that the user may not trade risky derivatives. - ISIN DE000DTR0CK8 (Daimler Truck Holding) - prepareTrade is rejected with a message that the user may not trade risky derivatives. - ISIN US4180561072 (Hasbro) - only quote orders on one exchange are supported - the quotes are valid for 45 seconds - quote value is always `42` - the order gets executed immediately - ISIN DE0005557508 (Deutsche Telekom) - only quote orders on two different exchanges are supported - the quotes do *NOT* have an expiration - quote value is always `42` - quote comes together with a costEstimation. Subsequent getCostEstimation calls are not allowed. - `noExchangeDefault` is true, so that exchange must be selected by the user - order will be canceled after 3 seconds - ISIN US98980L1017 (Zoom) - only market orders (both buy and sell) are suppored on one exchange - orders are executed immediately at a random quote - order creation requires the user to accept a hint (i.e. first try will result in a `MUST_ACCEPT_HINT` error) - default validity is set to `GTD` with a date of `2030-01-01` - ISIN US29786A1060 (Etsy) - the prepareTrade request takes 5 seconds - create challenge takes 5 seconds. for authMethod photoTAN, the challenge will return with an error after that period of time - only quote and market orders allowed - at exchange \"Slow exchange\" it takes 7 seconds to get a quote as well as 7 seconds to retrieve order costs - at exchange \"Exchange with quote and cost errors\" the quote request as well as cost estimation will end with an error after 3 seconds - the preparedTrade\'s `costEstimationMustBeShown` is true, so that the correct behavior (users cannot skip cost estimation in that case) can be tested. - ISIN XS2149280948 (bond from Bertelsmann) - quote, limit and market orders (both buy and sell) are supported on one exchange - limit orders are executed at exactly the limit price - market orders are executed at a random quote between 90 and 150 percent - for market orders, there is a legal message to confirm set (`legalMessagesToConfirmByOrderModel`) - ISIN US64110L1061 (Netflix Inc.) - one exchange with only quote order - creating the quote order will return an error (quote expired) - ISIN US67066G1040 (NVIDIA) - one exchange with only quote order, allowsQuoteModeLimit=true - quote orders are executed immediately. - if a quoteLimit is provided, execution happen at quoteLimit value - otherwise, a random execution quote will be used - ISIN DE000BAY0017 (Bayer AG) - one exchange with only market order - `costEstimationIsNotAvailable` is true, so no cost estimations should be linked/shown - orders will be canceled after 3 seconds - ISIN DE000PAH0038 (Porsche) - one exchange with only market order - all orders will be canceled - `GetCostEstimation` contains (only) a link to a PDF document. This can be used to test whether linking to a PDF works. - the instrument has both a `riskClassInfo.legalHint` as well as a `strikingHint`. Both should be visible in the order form. - ISIN DE0008404005 (Allianz) and some other hidden ISINs (can be requested from brokerize support) - one exchange with all available orderModels - orders are executed immediately - limit orders are executed at exactly the provided limit price - ISIN DE0008430026 (Munich Re) - one exchange (L&S) with all available orderModels - orders are executed immediately - ISIN FR0000120321 (L\'Oréal) - one exchange with all available orderModels - the exchange has a `securityQuotesToken` set - orders stay open - changesHaveCostEstimations is `true` for orders with this ISIN - ISIN US5949181045 (Microsoft) - one exchange with all available orderModels - if size is even, a partial execution with size 1 is executed, the remaining part stays open - if size is odd, a partial execution with size 1 is executed, the remaining part is canceled - ISIN US30303M1027 (Meta) - one exchange with all available orderModels - for each piece of the order size, there will be one execution with size 1 (so e.g. 10 executions for size 10) - sizes > 30 are not accepted - ISIN US2546871060 (Disney) - one exchange with all available orderModels - all orders are canceled after 3s - `costEstimationMustBeShown` is false and `costEstimationIsOnlyDetailedTable` is true (frontends must only show a link to the cost estimation table) - ISIN XX1234567890 (example of an ISIN that can never be mapped by frontends) - one exchange with all available orderModels - the instrument has two sellPositions to choose from (\"Sell Position A\" and \"Sell Position B\"). If no correct sell position is provided, trades will be rejected. - orders are executed immediately - ISIN DE0007100000 (Mercedes-Benz) - one exchange with all available orderModels - the instrument has two sellPositions to choose from (\"Sell Position A\" and \"Sell Position B\"). If no correct sell position is provided, trades will be rejected. - orders are executed immediately - ISIN DE0007472060 (Wirecard) - test instrument for `empty orderModelsBuy` / `onlySellAllowed` - ISIN BTC (Bitcoin/Euro) - has one exchange with support for quote, market and limit orders - orders will be executed right away (with the exception of limit orders with the limit 42. Those stay open!) - can be used to test frontend mapping of cryptos - when you prepare a trade in the *second* portfolio (which has two cash accounts), `sizeUnitsByCashAccountId` will be set, so that the frontend can let the user select a combination of `cashAccount` and `sizeUnit`. - positions of BTC/EUR will always have sizeDecimals=8 - ISIN DE0006231004 (Infineon Technologies AG) - one exchange with `orderModelsSell=[\'market\']` and `orderModelsBuy=[]` - ISIN DE0005552004 (Deutsche Post AG) - one exchange with `orderModelsSell=[]` and `orderModelsBuy=[\'market\']` - market buy orders are executed immediately - positions of DE0005552004 will always have sizeDecimals=undefined - ISIN US8740541094 (Take Two) - three exchanges are available. all have `market` and `limit` available - configuration for `takeProfitStopLoss` is different for the three exchanges. This can be used to test the implementation of takeProfit/stopLoss creation. - exchange_with_exclusive_tp_sl: `takeProfitStopLoss.exclusive` is `true`, so that only one of the two can be set. Also, both fields are limited to market buy orders - exchange_with_unlimited_tp_sl: `takeProfitStopLoss.exclusive` is `false`, so that both tp and sl may be set, for both sell and buy orders and both support orderModels - exchange_without_tp_sl: `takeProfitStopLoss` is not set, so that no tp/sl can be set - orders stay open forever - the order size can be changed (`allowsChangeSize=true`) - ISIN US5529531015 (MGM Resorts International) - one exchange with market and limit orders - orders are executed immediately - short selling is allowed, so `availableOrderIntents` as well as `availableOrderIntentsToken` is set. \"sell to open\" and \"buy to close\" can be tested here. - ISIN XAU (Gold) - only quote trading is allowed - depending on the selected portfolio, it is possible to select a cash account (e.g. EUR or USD) to trade with - users can chose between specifying the order size in the cash currency or in grams - quotes have the `totalAmount` field set - ISIN US88160R1014 (Tesla) - market, limit, stop buy trading is allowed - `GetCostEstimation` returns order fees - orders will be executed - order fees are saved for the order and returned in the order receipt - `CryptoPair` ADA-USD (Cardano - US Dollar) - `quote`, `market`, `limit` order models are available - One of the created demobroker portfolios does not have an USD cash account. For this portfolio an error will appear upon opening the order form - users can chose between specifying the order size in the cash currency (USD) or in ADA - validity types for limit orders are [`IOC`, `GTDT`]. With `GTDT` the user can specify a date AND time at which his order should be executed - the size input decimal places are limited per sizeUnit. For USD it\'s 2 and for ADA it is 4 decimal places - the orders will be executed after 10 seconds - ISIN US23804L1035 (Datadog Inc.) - only quote orders are available - in 80% of `CreateTrade` calls, a 400 error with the code `QUOTE_REJECTED_RETRYABLE` is returned. This can be used to test UIs which automatically retry `GetQuote` in this case. - ISIN DE0006969603 (Puma SE) - one exchange with all orderModels - orders stay open forever - `allowsChangeValidityTypes` is empty, so it is not possible to change the order validity - `changesHaveCostEstimations=false`, so it is not possible to receive cost estimations for order changes) - all other orders will be canceled after 3 seconds When orders are created using a `decoupled` method, the order id is only returned if the order size is greater than `5`. This can be used to test if the order receipt is skipped correctly in UIs. Cost estimations for `buy` and `sell` return a different set of fields. This can be used to test proper UI behavior when fields are set or unavailable. Behavior of `PortfolioQuotes` in the demo broker: - portfolio 1 starts with 100.000€ cash. portfolio 2 has two cash accounts, one starts with 100.000€, one with 100.000$. - when cash account values are summed up, we just assume an exchange rate of 1:1 - each open buy order reserves 10€ cash from the availableCash - profit loss of the portfolio is the sum of the position\'s profit loss - if a EUR cashAccount has the value 0,00€, its `hideInOverviews` property is set to true. This can be used to test the frontend\'s behavior when a cash account is hidden.
31
+ * Create an account at the demo broker for the logged-in user. The account will have a default set of two empty portfolios by default. If the setting `isSinglePortfolio` is set, only one portfolio is created. The account as well as the two portfolios have a randomly generated name. To log into an account, use the account\'s generated name as username (Account name) in `AddSession`. - with the password `42`, the login will succeed immediately - with the password `1337`, a challenge with type text will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - with the password `7`, a challenge with type base64png will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - other passwords will not allow to log in The demo broker simulates different market scenarios for various ISINs (e.g., partial executions, error cases, or specific cost structures). A complete overview of these test ISINs and their behavior can be found in the guide [Demo Broker Test Scenarios](https://developer.brokerize.com/docs/demobroker-isins). Behavior of `PortfolioQuotes` in the demo broker: - portfolio 1 starts with 100.000€ cash. portfolio 2 has two cash accounts, one starts with 100.000€, one with 100.000$. - when cash account values are summed up, we just assume an exchange rate of 1:1 - each open buy order reserves 10€ cash from the availableCash - profit loss of the portfolio is the sum of the position\'s profit loss - if a EUR cashAccount has the value 0,00€, its `hideInOverviews` property is set to true. This can be used to test the frontend\'s behavior when a cash account is hidden.
32
32
  */
33
33
  createDemoAccount(requestParameters?: CreateDemoAccountRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<CreatedResponseBody>;
34
34
  /**
@@ -17,7 +17,7 @@ import { CreatedResponseBodyFromJSON, DemoAccountSettingsToJSON, DemoAccountsRes
17
17
  */
18
18
  export class DemobrokerApi extends runtime.BaseAPI {
19
19
  /**
20
- * Create an account at the demo broker for the logged-in user. The account will have a default set of two empty portfolios by default. If the setting `isSinglePortfolio` is set, only one portfolio is created. The account as well as the two portfolios have a randomly generated name. To log into an account, use the account\'s generated name as username (Account name) in `AddSession`. - with the password `42`, the login will succeed immediately - with the password `1337`, a challenge with type text will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - with the password `7`, a challenge with type base64png will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - other passwords will not allow to log in The demo broker implements the following pre-defined trade behaviors, so that different flows can be tested: - ISIN US0378331005 (Apple): - market buy order is executed after 10 seconds by the backend at a random quote - stop buy or stop loss order stays open forever (can be used for testing cancellation) - cost estimations contain a `costDetailsLink` and a `costAcceptancePrompt` - securityDetailedInfo is set, so a \"KID\" link should be displayed and linked to the corresponding table - the preparedTrade\'s `costEstimationMustBeShown` is true, so that the correct behavior (users cannot skip cost estimation in that case) can be tested. - ISIN LU0378438732 (a DAX ETF) - preparedTrade has `costEstimationIsOnlyDetailedTable` set to true, so that deviating order form behaviors can be tested - orders are rejected with code `ORDER_REJECTED` immediately - ISIN LU2611732046 (a DAX ETF) - preparedTrade has `costEstimationIsOnlyDetailedTable` set to true, so that deviating order form behaviors can be tested - two exchanges are available (\"xetra\" and \"quoteExchange\") - xetra allows market and limit orders for buying and has defaultValidityByOrderModel set to GFD for market and GTD 2030-01-01 for limit - orders are rejected with code `ORDER_REJECTED` immediately - ISIN DE000MD96WE8 (a knock out with DAX as underlying) - prepareTrade is rejected with a message that the user may not trade risky derivatives. - ISIN DE000DTR0CK8 (Daimler Truck Holding) - prepareTrade is rejected with a message that the user may not trade risky derivatives. - ISIN US4180561072 (Hasbro) - only quote orders on one exchange are supported - the quotes are valid for 45 seconds - quote value is always `42` - the order gets executed immediately - ISIN DE0005557508 (Deutsche Telekom) - only quote orders on two different exchanges are supported - the quotes do *NOT* have an expiration - quote value is always `42` - quote comes together with a costEstimation. Subsequent getCostEstimation calls are not allowed. - `noExchangeDefault` is true, so that exchange must be selected by the user - order will be canceled after 3 seconds - ISIN US98980L1017 (Zoom) - only market orders (both buy and sell) are suppored on one exchange - orders are executed immediately at a random quote - order creation requires the user to accept a hint (i.e. first try will result in a `MUST_ACCEPT_HINT` error) - default validity is set to `GTD` with a date of `2030-01-01` - ISIN US29786A1060 (Etsy) - the prepareTrade request takes 5 seconds - create challenge takes 5 seconds. for authMethod photoTAN, the challenge will return with an error after that period of time - only quote and market orders allowed - at exchange \"Slow exchange\" it takes 7 seconds to get a quote as well as 7 seconds to retrieve order costs - at exchange \"Exchange with quote and cost errors\" the quote request as well as cost estimation will end with an error after 3 seconds - the preparedTrade\'s `costEstimationMustBeShown` is true, so that the correct behavior (users cannot skip cost estimation in that case) can be tested. - ISIN XS2149280948 (bond from Bertelsmann) - quote, limit and market orders (both buy and sell) are supported on one exchange - limit orders are executed at exactly the limit price - market orders are executed at a random quote between 90 and 150 percent - for market orders, there is a legal message to confirm set (`legalMessagesToConfirmByOrderModel`) - ISIN US64110L1061 (Netflix Inc.) - one exchange with only quote order - creating the quote order will return an error (quote expired) - ISIN US67066G1040 (NVIDIA) - one exchange with only quote order, allowsQuoteModeLimit=true - quote orders are executed immediately. - if a quoteLimit is provided, execution happen at quoteLimit value - otherwise, a random execution quote will be used - ISIN DE000BAY0017 (Bayer AG) - one exchange with only market order - `costEstimationIsNotAvailable` is true, so no cost estimations should be linked/shown - orders will be canceled after 3 seconds - ISIN DE000PAH0038 (Porsche) - one exchange with only market order - all orders will be canceled - `GetCostEstimation` contains (only) a link to a PDF document. This can be used to test whether linking to a PDF works. - the instrument has both a `riskClassInfo.legalHint` as well as a `strikingHint`. Both should be visible in the order form. - ISIN DE0008404005 (Allianz) and some other hidden ISINs (can be requested from brokerize support) - one exchange with all available orderModels - orders are executed immediately - limit orders are executed at exactly the provided limit price - ISIN DE0008430026 (Munich Re) - one exchange (L&S) with all available orderModels - orders are executed immediately - ISIN FR0000120321 (L\'Oréal) - one exchange with all available orderModels - the exchange has a `securityQuotesToken` set - orders stay open - changesHaveCostEstimations is `true` for orders with this ISIN - ISIN US5949181045 (Microsoft) - one exchange with all available orderModels - if size is even, a partial execution with size 1 is executed, the remaining part stays open - if size is odd, a partial execution with size 1 is executed, the remaining part is canceled - ISIN US30303M1027 (Meta) - one exchange with all available orderModels - for each piece of the order size, there will be one execution with size 1 (so e.g. 10 executions for size 10) - sizes > 30 are not accepted - ISIN US2546871060 (Disney) - one exchange with all available orderModels - all orders are canceled after 3s - `costEstimationMustBeShown` is false and `costEstimationIsOnlyDetailedTable` is true (frontends must only show a link to the cost estimation table) - ISIN XX1234567890 (example of an ISIN that can never be mapped by frontends) - one exchange with all available orderModels - the instrument has two sellPositions to choose from (\"Sell Position A\" and \"Sell Position B\"). If no correct sell position is provided, trades will be rejected. - orders are executed immediately - ISIN DE0007100000 (Mercedes-Benz) - one exchange with all available orderModels - the instrument has two sellPositions to choose from (\"Sell Position A\" and \"Sell Position B\"). If no correct sell position is provided, trades will be rejected. - orders are executed immediately - ISIN DE0007472060 (Wirecard) - test instrument for `empty orderModelsBuy` / `onlySellAllowed` - ISIN BTC (Bitcoin/Euro) - has one exchange with support for quote, market and limit orders - orders will be executed right away (with the exception of limit orders with the limit 42. Those stay open!) - can be used to test frontend mapping of cryptos - when you prepare a trade in the *second* portfolio (which has two cash accounts), `sizeUnitsByCashAccountId` will be set, so that the frontend can let the user select a combination of `cashAccount` and `sizeUnit`. - positions of BTC/EUR will always have sizeDecimals=8 - ISIN DE0006231004 (Infineon Technologies AG) - one exchange with `orderModelsSell=[\'market\']` and `orderModelsBuy=[]` - ISIN DE0005552004 (Deutsche Post AG) - one exchange with `orderModelsSell=[]` and `orderModelsBuy=[\'market\']` - market buy orders are executed immediately - positions of DE0005552004 will always have sizeDecimals=undefined - ISIN US8740541094 (Take Two) - three exchanges are available. all have `market` and `limit` available - configuration for `takeProfitStopLoss` is different for the three exchanges. This can be used to test the implementation of takeProfit/stopLoss creation. - exchange_with_exclusive_tp_sl: `takeProfitStopLoss.exclusive` is `true`, so that only one of the two can be set. Also, both fields are limited to market buy orders - exchange_with_unlimited_tp_sl: `takeProfitStopLoss.exclusive` is `false`, so that both tp and sl may be set, for both sell and buy orders and both support orderModels - exchange_without_tp_sl: `takeProfitStopLoss` is not set, so that no tp/sl can be set - orders stay open forever - the order size can be changed (`allowsChangeSize=true`) - ISIN US5529531015 (MGM Resorts International) - one exchange with market and limit orders - orders are executed immediately - short selling is allowed, so `availableOrderIntents` as well as `availableOrderIntentsToken` is set. \"sell to open\" and \"buy to close\" can be tested here. - ISIN XAU (Gold) - only quote trading is allowed - depending on the selected portfolio, it is possible to select a cash account (e.g. EUR or USD) to trade with - users can chose between specifying the order size in the cash currency or in grams - quotes have the `totalAmount` field set - ISIN US88160R1014 (Tesla) - market, limit, stop buy trading is allowed - `GetCostEstimation` returns order fees - orders will be executed - order fees are saved for the order and returned in the order receipt - `CryptoPair` ADA-USD (Cardano - US Dollar) - `quote`, `market`, `limit` order models are available - One of the created demobroker portfolios does not have an USD cash account. For this portfolio an error will appear upon opening the order form - users can chose between specifying the order size in the cash currency (USD) or in ADA - validity types for limit orders are [`IOC`, `GTDT`]. With `GTDT` the user can specify a date AND time at which his order should be executed - the size input decimal places are limited per sizeUnit. For USD it\'s 2 and for ADA it is 4 decimal places - the orders will be executed after 10 seconds - ISIN US23804L1035 (Datadog Inc.) - only quote orders are available - in 80% of `CreateTrade` calls, a 400 error with the code `QUOTE_REJECTED_RETRYABLE` is returned. This can be used to test UIs which automatically retry `GetQuote` in this case. - ISIN DE0006969603 (Puma SE) - one exchange with all orderModels - orders stay open forever - `allowsChangeValidityTypes` is empty, so it is not possible to change the order validity - `changesHaveCostEstimations=false`, so it is not possible to receive cost estimations for order changes) - all other orders will be canceled after 3 seconds When orders are created using a `decoupled` method, the order id is only returned if the order size is greater than `5`. This can be used to test if the order receipt is skipped correctly in UIs. Cost estimations for `buy` and `sell` return a different set of fields. This can be used to test proper UI behavior when fields are set or unavailable. Behavior of `PortfolioQuotes` in the demo broker: - portfolio 1 starts with 100.000€ cash. portfolio 2 has two cash accounts, one starts with 100.000€, one with 100.000$. - when cash account values are summed up, we just assume an exchange rate of 1:1 - each open buy order reserves 10€ cash from the availableCash - profit loss of the portfolio is the sum of the position\'s profit loss - if a EUR cashAccount has the value 0,00€, its `hideInOverviews` property is set to true. This can be used to test the frontend\'s behavior when a cash account is hidden.
20
+ * Create an account at the demo broker for the logged-in user. The account will have a default set of two empty portfolios by default. If the setting `isSinglePortfolio` is set, only one portfolio is created. The account as well as the two portfolios have a randomly generated name. To log into an account, use the account\'s generated name as username (Account name) in `AddSession`. - with the password `42`, the login will succeed immediately - with the password `1337`, a challenge with type text will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - with the password `7`, a challenge with type base64png will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - other passwords will not allow to log in The demo broker simulates different market scenarios for various ISINs (e.g., partial executions, error cases, or specific cost structures). A complete overview of these test ISINs and their behavior can be found in the guide [Demo Broker Test Scenarios](https://developer.brokerize.com/docs/demobroker-isins). Behavior of `PortfolioQuotes` in the demo broker: - portfolio 1 starts with 100.000€ cash. portfolio 2 has two cash accounts, one starts with 100.000€, one with 100.000$. - when cash account values are summed up, we just assume an exchange rate of 1:1 - each open buy order reserves 10€ cash from the availableCash - profit loss of the portfolio is the sum of the position\'s profit loss - if a EUR cashAccount has the value 0,00€, its `hideInOverviews` property is set to true. This can be used to test the frontend\'s behavior when a cash account is hidden.
21
21
  */
22
22
  async createDemoAccountRaw(requestParameters, initOverrides) {
23
23
  const queryParameters = {};
@@ -44,7 +44,7 @@ export class DemobrokerApi extends runtime.BaseAPI {
44
44
  return new runtime.JSONApiResponse(response, (jsonValue) => CreatedResponseBodyFromJSON(jsonValue));
45
45
  }
46
46
  /**
47
- * Create an account at the demo broker for the logged-in user. The account will have a default set of two empty portfolios by default. If the setting `isSinglePortfolio` is set, only one portfolio is created. The account as well as the two portfolios have a randomly generated name. To log into an account, use the account\'s generated name as username (Account name) in `AddSession`. - with the password `42`, the login will succeed immediately - with the password `1337`, a challenge with type text will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - with the password `7`, a challenge with type base64png will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - other passwords will not allow to log in The demo broker implements the following pre-defined trade behaviors, so that different flows can be tested: - ISIN US0378331005 (Apple): - market buy order is executed after 10 seconds by the backend at a random quote - stop buy or stop loss order stays open forever (can be used for testing cancellation) - cost estimations contain a `costDetailsLink` and a `costAcceptancePrompt` - securityDetailedInfo is set, so a \"KID\" link should be displayed and linked to the corresponding table - the preparedTrade\'s `costEstimationMustBeShown` is true, so that the correct behavior (users cannot skip cost estimation in that case) can be tested. - ISIN LU0378438732 (a DAX ETF) - preparedTrade has `costEstimationIsOnlyDetailedTable` set to true, so that deviating order form behaviors can be tested - orders are rejected with code `ORDER_REJECTED` immediately - ISIN LU2611732046 (a DAX ETF) - preparedTrade has `costEstimationIsOnlyDetailedTable` set to true, so that deviating order form behaviors can be tested - two exchanges are available (\"xetra\" and \"quoteExchange\") - xetra allows market and limit orders for buying and has defaultValidityByOrderModel set to GFD for market and GTD 2030-01-01 for limit - orders are rejected with code `ORDER_REJECTED` immediately - ISIN DE000MD96WE8 (a knock out with DAX as underlying) - prepareTrade is rejected with a message that the user may not trade risky derivatives. - ISIN DE000DTR0CK8 (Daimler Truck Holding) - prepareTrade is rejected with a message that the user may not trade risky derivatives. - ISIN US4180561072 (Hasbro) - only quote orders on one exchange are supported - the quotes are valid for 45 seconds - quote value is always `42` - the order gets executed immediately - ISIN DE0005557508 (Deutsche Telekom) - only quote orders on two different exchanges are supported - the quotes do *NOT* have an expiration - quote value is always `42` - quote comes together with a costEstimation. Subsequent getCostEstimation calls are not allowed. - `noExchangeDefault` is true, so that exchange must be selected by the user - order will be canceled after 3 seconds - ISIN US98980L1017 (Zoom) - only market orders (both buy and sell) are suppored on one exchange - orders are executed immediately at a random quote - order creation requires the user to accept a hint (i.e. first try will result in a `MUST_ACCEPT_HINT` error) - default validity is set to `GTD` with a date of `2030-01-01` - ISIN US29786A1060 (Etsy) - the prepareTrade request takes 5 seconds - create challenge takes 5 seconds. for authMethod photoTAN, the challenge will return with an error after that period of time - only quote and market orders allowed - at exchange \"Slow exchange\" it takes 7 seconds to get a quote as well as 7 seconds to retrieve order costs - at exchange \"Exchange with quote and cost errors\" the quote request as well as cost estimation will end with an error after 3 seconds - the preparedTrade\'s `costEstimationMustBeShown` is true, so that the correct behavior (users cannot skip cost estimation in that case) can be tested. - ISIN XS2149280948 (bond from Bertelsmann) - quote, limit and market orders (both buy and sell) are supported on one exchange - limit orders are executed at exactly the limit price - market orders are executed at a random quote between 90 and 150 percent - for market orders, there is a legal message to confirm set (`legalMessagesToConfirmByOrderModel`) - ISIN US64110L1061 (Netflix Inc.) - one exchange with only quote order - creating the quote order will return an error (quote expired) - ISIN US67066G1040 (NVIDIA) - one exchange with only quote order, allowsQuoteModeLimit=true - quote orders are executed immediately. - if a quoteLimit is provided, execution happen at quoteLimit value - otherwise, a random execution quote will be used - ISIN DE000BAY0017 (Bayer AG) - one exchange with only market order - `costEstimationIsNotAvailable` is true, so no cost estimations should be linked/shown - orders will be canceled after 3 seconds - ISIN DE000PAH0038 (Porsche) - one exchange with only market order - all orders will be canceled - `GetCostEstimation` contains (only) a link to a PDF document. This can be used to test whether linking to a PDF works. - the instrument has both a `riskClassInfo.legalHint` as well as a `strikingHint`. Both should be visible in the order form. - ISIN DE0008404005 (Allianz) and some other hidden ISINs (can be requested from brokerize support) - one exchange with all available orderModels - orders are executed immediately - limit orders are executed at exactly the provided limit price - ISIN DE0008430026 (Munich Re) - one exchange (L&S) with all available orderModels - orders are executed immediately - ISIN FR0000120321 (L\'Oréal) - one exchange with all available orderModels - the exchange has a `securityQuotesToken` set - orders stay open - changesHaveCostEstimations is `true` for orders with this ISIN - ISIN US5949181045 (Microsoft) - one exchange with all available orderModels - if size is even, a partial execution with size 1 is executed, the remaining part stays open - if size is odd, a partial execution with size 1 is executed, the remaining part is canceled - ISIN US30303M1027 (Meta) - one exchange with all available orderModels - for each piece of the order size, there will be one execution with size 1 (so e.g. 10 executions for size 10) - sizes > 30 are not accepted - ISIN US2546871060 (Disney) - one exchange with all available orderModels - all orders are canceled after 3s - `costEstimationMustBeShown` is false and `costEstimationIsOnlyDetailedTable` is true (frontends must only show a link to the cost estimation table) - ISIN XX1234567890 (example of an ISIN that can never be mapped by frontends) - one exchange with all available orderModels - the instrument has two sellPositions to choose from (\"Sell Position A\" and \"Sell Position B\"). If no correct sell position is provided, trades will be rejected. - orders are executed immediately - ISIN DE0007100000 (Mercedes-Benz) - one exchange with all available orderModels - the instrument has two sellPositions to choose from (\"Sell Position A\" and \"Sell Position B\"). If no correct sell position is provided, trades will be rejected. - orders are executed immediately - ISIN DE0007472060 (Wirecard) - test instrument for `empty orderModelsBuy` / `onlySellAllowed` - ISIN BTC (Bitcoin/Euro) - has one exchange with support for quote, market and limit orders - orders will be executed right away (with the exception of limit orders with the limit 42. Those stay open!) - can be used to test frontend mapping of cryptos - when you prepare a trade in the *second* portfolio (which has two cash accounts), `sizeUnitsByCashAccountId` will be set, so that the frontend can let the user select a combination of `cashAccount` and `sizeUnit`. - positions of BTC/EUR will always have sizeDecimals=8 - ISIN DE0006231004 (Infineon Technologies AG) - one exchange with `orderModelsSell=[\'market\']` and `orderModelsBuy=[]` - ISIN DE0005552004 (Deutsche Post AG) - one exchange with `orderModelsSell=[]` and `orderModelsBuy=[\'market\']` - market buy orders are executed immediately - positions of DE0005552004 will always have sizeDecimals=undefined - ISIN US8740541094 (Take Two) - three exchanges are available. all have `market` and `limit` available - configuration for `takeProfitStopLoss` is different for the three exchanges. This can be used to test the implementation of takeProfit/stopLoss creation. - exchange_with_exclusive_tp_sl: `takeProfitStopLoss.exclusive` is `true`, so that only one of the two can be set. Also, both fields are limited to market buy orders - exchange_with_unlimited_tp_sl: `takeProfitStopLoss.exclusive` is `false`, so that both tp and sl may be set, for both sell and buy orders and both support orderModels - exchange_without_tp_sl: `takeProfitStopLoss` is not set, so that no tp/sl can be set - orders stay open forever - the order size can be changed (`allowsChangeSize=true`) - ISIN US5529531015 (MGM Resorts International) - one exchange with market and limit orders - orders are executed immediately - short selling is allowed, so `availableOrderIntents` as well as `availableOrderIntentsToken` is set. \"sell to open\" and \"buy to close\" can be tested here. - ISIN XAU (Gold) - only quote trading is allowed - depending on the selected portfolio, it is possible to select a cash account (e.g. EUR or USD) to trade with - users can chose between specifying the order size in the cash currency or in grams - quotes have the `totalAmount` field set - ISIN US88160R1014 (Tesla) - market, limit, stop buy trading is allowed - `GetCostEstimation` returns order fees - orders will be executed - order fees are saved for the order and returned in the order receipt - `CryptoPair` ADA-USD (Cardano - US Dollar) - `quote`, `market`, `limit` order models are available - One of the created demobroker portfolios does not have an USD cash account. For this portfolio an error will appear upon opening the order form - users can chose between specifying the order size in the cash currency (USD) or in ADA - validity types for limit orders are [`IOC`, `GTDT`]. With `GTDT` the user can specify a date AND time at which his order should be executed - the size input decimal places are limited per sizeUnit. For USD it\'s 2 and for ADA it is 4 decimal places - the orders will be executed after 10 seconds - ISIN US23804L1035 (Datadog Inc.) - only quote orders are available - in 80% of `CreateTrade` calls, a 400 error with the code `QUOTE_REJECTED_RETRYABLE` is returned. This can be used to test UIs which automatically retry `GetQuote` in this case. - ISIN DE0006969603 (Puma SE) - one exchange with all orderModels - orders stay open forever - `allowsChangeValidityTypes` is empty, so it is not possible to change the order validity - `changesHaveCostEstimations=false`, so it is not possible to receive cost estimations for order changes) - all other orders will be canceled after 3 seconds When orders are created using a `decoupled` method, the order id is only returned if the order size is greater than `5`. This can be used to test if the order receipt is skipped correctly in UIs. Cost estimations for `buy` and `sell` return a different set of fields. This can be used to test proper UI behavior when fields are set or unavailable. Behavior of `PortfolioQuotes` in the demo broker: - portfolio 1 starts with 100.000€ cash. portfolio 2 has two cash accounts, one starts with 100.000€, one with 100.000$. - when cash account values are summed up, we just assume an exchange rate of 1:1 - each open buy order reserves 10€ cash from the availableCash - profit loss of the portfolio is the sum of the position\'s profit loss - if a EUR cashAccount has the value 0,00€, its `hideInOverviews` property is set to true. This can be used to test the frontend\'s behavior when a cash account is hidden.
47
+ * Create an account at the demo broker for the logged-in user. The account will have a default set of two empty portfolios by default. If the setting `isSinglePortfolio` is set, only one portfolio is created. The account as well as the two portfolios have a randomly generated name. To log into an account, use the account\'s generated name as username (Account name) in `AddSession`. - with the password `42`, the login will succeed immediately - with the password `1337`, a challenge with type text will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - with the password `7`, a challenge with type base64png will be returned which must be completed by using `addSessionCompleteChallenge` (with a challengeResponse `42`) - other passwords will not allow to log in The demo broker simulates different market scenarios for various ISINs (e.g., partial executions, error cases, or specific cost structures). A complete overview of these test ISINs and their behavior can be found in the guide [Demo Broker Test Scenarios](https://developer.brokerize.com/docs/demobroker-isins). Behavior of `PortfolioQuotes` in the demo broker: - portfolio 1 starts with 100.000€ cash. portfolio 2 has two cash accounts, one starts with 100.000€, one with 100.000$. - when cash account values are summed up, we just assume an exchange rate of 1:1 - each open buy order reserves 10€ cash from the availableCash - profit loss of the portfolio is the sum of the position\'s profit loss - if a EUR cashAccount has the value 0,00€, its `hideInOverviews` property is set to true. This can be used to test the frontend\'s behavior when a cash account is hidden.
48
48
  */
49
49
  async createDemoAccount(requestParameters = {}, initOverrides) {
50
50
  const response = await this.createDemoAccountRaw(requestParameters, initOverrides);
@@ -20,6 +20,12 @@ export interface CheckRecoveryPhrase200Response {
20
20
  * @memberof CheckRecoveryPhrase200Response
21
21
  */
22
22
  expiresAt: Date;
23
+ /**
24
+ *
25
+ * @type {string}
26
+ * @memberof CheckRecoveryPhrase200Response
27
+ */
28
+ userId: string;
23
29
  }
24
30
  export declare function CheckRecoveryPhrase200ResponseFromJSON(json: any): CheckRecoveryPhrase200Response;
25
31
  export declare function CheckRecoveryPhrase200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CheckRecoveryPhrase200Response;
@@ -19,6 +19,7 @@ export function CheckRecoveryPhrase200ResponseFromJSONTyped(json, ignoreDiscrimi
19
19
  }
20
20
  return {
21
21
  expiresAt: new Date(json["expiresAt"]),
22
+ userId: json["userId"],
22
23
  };
23
24
  }
24
25
  export function CheckRecoveryPhrase200ResponseToJSONRecursive(value, ignoreParent = false) {
@@ -30,6 +31,7 @@ export function CheckRecoveryPhrase200ResponseToJSONRecursive(value, ignoreParen
30
31
  }
31
32
  return {
32
33
  expiresAt: value.expiresAt.toISOString(),
34
+ userId: value.userId,
33
35
  };
34
36
  }
35
37
  export function CheckRecoveryPhrase200ResponseToJSON(value) {
@@ -25,6 +25,13 @@ export interface ClientConfig {
25
25
  * @memberof ClientConfig
26
26
  */
27
27
  allowRequestsWithoutOrigin: boolean;
28
+ /**
29
+ * If true, security logo URLs (`Security.logos`) are returned with positions/orders for this client.
30
+ * Logos are served via `logos.brokerize.com`.
31
+ * @type {boolean}
32
+ * @memberof ClientConfig
33
+ */
34
+ allowSecurityLogos?: boolean;
28
35
  /**
29
36
  *
30
37
  * @type {Array<string>}
@@ -65,11 +72,20 @@ export interface ClientConfig {
65
72
  */
66
73
  enabled: boolean;
67
74
  /**
68
- *
75
+ * How long guest users will be kept after their last activity.
76
+ * If the user has set up a RecoveryPhrase, `guestUserInactivityTimeoutSecondsRecoveryPhrase` is used instead (if defined).
69
77
  * @type {number}
70
78
  * @memberof ClientConfig
71
79
  */
72
80
  guestUserInactivityTimeoutSeconds?: number;
81
+ /**
82
+ * How long guest users will be kept after their last activity *if they have a RecoveryPhrase*.
83
+ *
84
+ * If the user has no RecoveryPhrase, `guestUserInactivityTimeoutSeconds` is used instead (if defined).
85
+ * @type {number}
86
+ * @memberof ClientConfig
87
+ */
88
+ guestUserInactivityTimeoutSecondsRecoveryPhrase?: number;
73
89
  /**
74
90
  *
75
91
  * @type {GuestUserLifetime}
@@ -25,6 +25,9 @@ export function ClientConfigFromJSONTyped(json, ignoreDiscriminator) {
25
25
  }
26
26
  return {
27
27
  allowRequestsWithoutOrigin: json["allowRequestsWithoutOrigin"],
28
+ allowSecurityLogos: !exists(json, "allowSecurityLogos")
29
+ ? undefined
30
+ : json["allowSecurityLogos"],
28
31
  allowedOrigins: json["allowedOrigins"],
29
32
  allowedOriginsRegularExpressions: !exists(json, "allowedOriginsRegularExpressions")
30
33
  ? undefined
@@ -38,6 +41,9 @@ export function ClientConfigFromJSONTyped(json, ignoreDiscriminator) {
38
41
  guestUserInactivityTimeoutSeconds: !exists(json, "guestUserInactivityTimeoutSeconds")
39
42
  ? undefined
40
43
  : json["guestUserInactivityTimeoutSeconds"],
44
+ guestUserInactivityTimeoutSecondsRecoveryPhrase: !exists(json, "guestUserInactivityTimeoutSecondsRecoveryPhrase")
45
+ ? undefined
46
+ : json["guestUserInactivityTimeoutSecondsRecoveryPhrase"],
41
47
  guestUserLifetime: !exists(json, "guestUserLifetime")
42
48
  ? undefined
43
49
  : GuestUserLifetimeFromJSON(json["guestUserLifetime"]),
@@ -76,6 +82,7 @@ export function ClientConfigToJSONRecursive(value, ignoreParent = false) {
76
82
  }
77
83
  return {
78
84
  allowRequestsWithoutOrigin: value.allowRequestsWithoutOrigin,
85
+ allowSecurityLogos: value.allowSecurityLogos,
79
86
  allowedOrigins: value.allowedOrigins,
80
87
  allowedOriginsRegularExpressions: value.allowedOriginsRegularExpressions,
81
88
  brokerEnvFilter: mapValues(value.brokerEnvFilter, BrokerEnvFilterTypeToJSON),
@@ -83,6 +90,7 @@ export function ClientConfigToJSONRecursive(value, ignoreParent = false) {
83
90
  cryptoTradingAllowed: value.cryptoTradingAllowed,
84
91
  enabled: value.enabled,
85
92
  guestUserInactivityTimeoutSeconds: value.guestUserInactivityTimeoutSeconds,
93
+ guestUserInactivityTimeoutSecondsRecoveryPhrase: value.guestUserInactivityTimeoutSecondsRecoveryPhrase,
86
94
  guestUserLifetime: GuestUserLifetimeToJSON(value.guestUserLifetime),
87
95
  hideOfflinePortfolios: value.hideOfflinePortfolios,
88
96
  legalEntityName: value.legalEntityName,
@@ -28,6 +28,15 @@ export interface ClientConfigUpdate {
28
28
  * @memberof ClientConfigUpdate
29
29
  */
30
30
  allowRequestsWithoutOrigin?: boolean;
31
+ /**
32
+ * If true, security logo URLs (`Security.logos`) are returned with positions/orders for this client.
33
+ * Logos are served via `logos.brokerize.com`.
34
+ *
35
+ * Default is false.
36
+ * @type {boolean}
37
+ * @memberof ClientConfigUpdate
38
+ */
39
+ allowSecurityLogos?: boolean;
31
40
  /**
32
41
  *
33
42
  * @type {Array<string>}
@@ -79,11 +88,20 @@ export interface ClientConfigUpdate {
79
88
  */
80
89
  enabled?: boolean;
81
90
  /**
82
- *
91
+ * How long guest users will be kept after their last activity.
92
+ * If the user has set up a RecoveryPhrase, `guestUserInactivityTimeoutSecondsRecoveryPhrase` is used instead (if defined).
83
93
  * @type {number}
84
94
  * @memberof ClientConfigUpdate
85
95
  */
86
96
  guestUserInactivityTimeoutSeconds?: number | null;
97
+ /**
98
+ * How long guest users will be kept after their last activity *if they have a RecoveryPhrase*.
99
+ *
100
+ * If the user has no RecoveryPhrase, `guestUserInactivityTimeoutSeconds` is used instead (if defined).
101
+ * @type {number}
102
+ * @memberof ClientConfigUpdate
103
+ */
104
+ guestUserInactivityTimeoutSecondsRecoveryPhrase?: number | null;
87
105
  /**
88
106
  *
89
107
  * @type {GuestUserLifetime}
@@ -30,6 +30,9 @@ export function ClientConfigUpdateFromJSONTyped(json, ignoreDiscriminator) {
30
30
  allowRequestsWithoutOrigin: !exists(json, "allowRequestsWithoutOrigin")
31
31
  ? undefined
32
32
  : json["allowRequestsWithoutOrigin"],
33
+ allowSecurityLogos: !exists(json, "allowSecurityLogos")
34
+ ? undefined
35
+ : json["allowSecurityLogos"],
33
36
  allowedOrigins: !exists(json, "allowedOrigins")
34
37
  ? undefined
35
38
  : json["allowedOrigins"],
@@ -55,6 +58,9 @@ export function ClientConfigUpdateFromJSONTyped(json, ignoreDiscriminator) {
55
58
  guestUserInactivityTimeoutSeconds: !exists(json, "guestUserInactivityTimeoutSeconds")
56
59
  ? undefined
57
60
  : json["guestUserInactivityTimeoutSeconds"],
61
+ guestUserInactivityTimeoutSecondsRecoveryPhrase: !exists(json, "guestUserInactivityTimeoutSecondsRecoveryPhrase")
62
+ ? undefined
63
+ : json["guestUserInactivityTimeoutSecondsRecoveryPhrase"],
58
64
  guestUserLifetime: !exists(json, "guestUserLifetime")
59
65
  ? undefined
60
66
  : GuestUserLifetimeFromJSON(json["guestUserLifetime"]),
@@ -110,6 +116,7 @@ export function ClientConfigUpdateToJSONRecursive(value, ignoreParent = false) {
110
116
  }
111
117
  return {
112
118
  allowRequestsWithoutOrigin: value.allowRequestsWithoutOrigin,
119
+ allowSecurityLogos: value.allowSecurityLogos,
113
120
  allowedOrigins: value.allowedOrigins,
114
121
  allowedOriginsRegularExpressions: value.allowedOriginsRegularExpressions,
115
122
  brokerClientIds: BrokerClientCfgToJSON(value.brokerClientIds),
@@ -121,6 +128,7 @@ export function ClientConfigUpdateToJSONRecursive(value, ignoreParent = false) {
121
128
  cryptoTradingAllowed: value.cryptoTradingAllowed,
122
129
  enabled: value.enabled,
123
130
  guestUserInactivityTimeoutSeconds: value.guestUserInactivityTimeoutSeconds,
131
+ guestUserInactivityTimeoutSecondsRecoveryPhrase: value.guestUserInactivityTimeoutSecondsRecoveryPhrase,
124
132
  guestUserLifetime: GuestUserLifetimeToJSON(value.guestUserLifetime),
125
133
  hideOfflinePortfolios: value.hideOfflinePortfolios,
126
134
  legalEntityName: value.legalEntityName,
@@ -222,6 +222,12 @@ export interface Order {
222
222
  * @memberof Order
223
223
  */
224
224
  intent?: OrderIntentEnum;
225
+ /**
226
+ * If this is true, the order data retrieved from the broker is incomplete. Fields may be missing or be incomplete.
227
+ * @type {boolean}
228
+ * @memberof Order
229
+ */
230
+ isIncomplete?: boolean;
225
231
  /**
226
232
  * The ISIN of the security to trade, if applicable. Note that at least one of `isin` and `usTicker` must be set.
227
233
  *
@@ -110,6 +110,9 @@ export function OrderFromJSONTyped(json, ignoreDiscriminator) {
110
110
  id: json["id"],
111
111
  ifDoneLimit: !exists(json, "ifDoneLimit") ? undefined : json["ifDoneLimit"],
112
112
  intent: !exists(json, "intent") ? undefined : json["intent"],
113
+ isIncomplete: !exists(json, "isIncomplete")
114
+ ? undefined
115
+ : json["isIncomplete"],
113
116
  isin: json["isin"],
114
117
  limit: !exists(json, "limit") ? undefined : json["limit"],
115
118
  limitCurrencyIso: !exists(json, "limitCurrencyIso")
@@ -217,6 +220,7 @@ export function OrderToJSONRecursive(value, ignoreParent = false) {
217
220
  id: value.id,
218
221
  ifDoneLimit: value.ifDoneLimit,
219
222
  intent: value.intent,
223
+ isIncomplete: value.isIncomplete,
220
224
  isin: value.isin,
221
225
  limit: value.limit,
222
226
  limitCurrencyIso: value.limitCurrencyIso,
@@ -20,7 +20,7 @@ export interface OrderCostEstimation {
20
20
  /**
21
21
  * If present, users have to accept this message before creating an order.
22
22
  * If accepting the costs and performing the order is one click (which is allowed), the create order button label
23
- * must contain the information that costs are accepted.
23
+ * must contain the information that costs are accepted. May contain (some) HTML
24
24
  * @type {string}
25
25
  * @memberof OrderCostEstimation
26
26
  */
@@ -8,6 +8,7 @@
8
8
  * https://openapi-generator.tech
9
9
  * Do not edit the class manually.
10
10
  */
11
+ import { SecurityLogoUrls } from "./SecurityLogoUrls";
11
12
  import { SecuritySelector } from "./SecuritySelector";
12
13
  /**
13
14
  * A security's basic data like symbols and names.
@@ -29,6 +30,12 @@ export interface Security {
29
30
  * @deprecated
30
31
  */
31
32
  isin?: string;
33
+ /**
34
+ *
35
+ * @type {SecurityLogoUrls}
36
+ * @memberof Security
37
+ */
38
+ logos?: SecurityLogoUrls;
32
39
  /**
33
40
  *
34
41
  * @type {string}
@@ -11,6 +11,7 @@
11
11
  * Do not edit the class manually.
12
12
  */
13
13
  import { exists } from "../runtime";
14
+ import { SecurityLogoUrlsFromJSON, SecurityLogoUrlsToJSON, } from "./SecurityLogoUrls";
14
15
  import { SecuritySelectorFromJSON, SecuritySelectorToJSON, } from "./SecuritySelector";
15
16
  /**
16
17
  * @export
@@ -29,6 +30,9 @@ export function SecurityFromJSONTyped(json, ignoreDiscriminator) {
29
30
  return {
30
31
  cryptoCode: !exists(json, "cryptoCode") ? undefined : json["cryptoCode"],
31
32
  isin: !exists(json, "isin") ? undefined : json["isin"],
33
+ logos: !exists(json, "logos")
34
+ ? undefined
35
+ : SecurityLogoUrlsFromJSON(json["logos"]),
32
36
  name: !exists(json, "name") ? undefined : json["name"],
33
37
  priceFactor: !exists(json, "priceFactor") ? undefined : json["priceFactor"],
34
38
  selector: SecuritySelectorFromJSON(json["selector"]),
@@ -49,6 +53,7 @@ export function SecurityToJSONRecursive(value, ignoreParent = false) {
49
53
  return {
50
54
  cryptoCode: value.cryptoCode,
51
55
  isin: value.isin,
56
+ logos: SecurityLogoUrlsToJSON(value.logos),
52
57
  name: value.name,
53
58
  priceFactor: value.priceFactor,
54
59
  selector: SecuritySelectorToJSON(value.selector),
@@ -0,0 +1,28 @@
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
+ * URLs to logos (e.g. company logos) for a security. Only present if the
13
+ * client is configured to receive logos (`allowSecurityLogos`).
14
+ * @export
15
+ * @interface SecurityLogoUrls
16
+ */
17
+ export interface SecurityLogoUrls {
18
+ /**
19
+ * Square SVG logo. Directly embeddable URL served via `logos.brokerize.com`.
20
+ * @type {string}
21
+ * @memberof SecurityLogoUrls
22
+ */
23
+ svgSquare?: string;
24
+ }
25
+ export declare function SecurityLogoUrlsFromJSON(json: any): SecurityLogoUrls;
26
+ export declare function SecurityLogoUrlsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecurityLogoUrls;
27
+ export declare function SecurityLogoUrlsToJSONRecursive(value?: SecurityLogoUrls | null, ignoreParent?: boolean): any;
28
+ export declare function SecurityLogoUrlsToJSON(value?: SecurityLogoUrls | null): any;
@@ -0,0 +1,38 @@
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";
14
+ export function SecurityLogoUrlsFromJSON(json) {
15
+ return SecurityLogoUrlsFromJSONTyped(json, false);
16
+ }
17
+ export function SecurityLogoUrlsFromJSONTyped(json, ignoreDiscriminator) {
18
+ if (json === undefined || json === null) {
19
+ return json;
20
+ }
21
+ return {
22
+ svgSquare: !exists(json, "svgSquare") ? undefined : json["svgSquare"],
23
+ };
24
+ }
25
+ export function SecurityLogoUrlsToJSONRecursive(value, ignoreParent = false) {
26
+ if (value === undefined) {
27
+ return undefined;
28
+ }
29
+ if (value === null) {
30
+ return null;
31
+ }
32
+ return {
33
+ svgSquare: value.svgSquare,
34
+ };
35
+ }
36
+ export function SecurityLogoUrlsToJSON(value) {
37
+ return SecurityLogoUrlsToJSONRecursive(value, false);
38
+ }
@@ -209,6 +209,7 @@ export * from "./RenderGenericTableParams";
209
209
  export * from "./RiskClassInfo";
210
210
  export * from "./Security";
211
211
  export * from "./SecurityDetailedInfo";
212
+ export * from "./SecurityLogoUrls";
212
213
  export * from "./SecurityQuote";
213
214
  export * from "./SecurityQuotes";
214
215
  export * from "./SecurityQuotesMeta";
@@ -211,6 +211,7 @@ export * from "./RenderGenericTableParams";
211
211
  export * from "./RiskClassInfo";
212
212
  export * from "./Security";
213
213
  export * from "./SecurityDetailedInfo";
214
+ export * from "./SecurityLogoUrls";
214
215
  export * from "./SecurityQuote";
215
216
  export * from "./SecurityQuotes";
216
217
  export * from "./SecurityQuotesMeta";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brokerize/client",
3
- "version": "1.3.10",
3
+ "version": "1.5.0",
4
4
  "description": "Client for the brokerize.com API",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/brokerize/client-js#readme",