@brokerize/client 1.2.6 → 1.3.1

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.
@@ -1,7 +1,7 @@
1
1
  import { Auth, BrokerizeConfig } from "./apiCtx";
2
2
  import * as openApiClient from "./swagger";
3
3
  import { AddSessionParams, ConfirmOAuthParams, CreateTradeChallengeRequest, CreateTradeRequest, DeleteDemoAccountRequest, DemoAccountSettings, GenericTable, GetCostEstimationParams, GetQuoteRequest, OrderChanges, PrepareOAuthRedirectParams, PrepareTradeRequest } from "./swagger";
4
- import { BrokerizeWebSocketClient, BrokerizeWebSocketClientImpl, Callback, Subscription } from "./websocketClient";
4
+ import { BrokerizeWebSocketClient, Callback, Subscription } from "./websocketClient";
5
5
  export declare class AuthorizedApiContext {
6
6
  private _cfg;
7
7
  private _auth;
@@ -26,7 +26,7 @@ export declare class AuthorizedApiContext {
26
26
  private _adminApi;
27
27
  private _userApi;
28
28
  private _securitiesApi;
29
- constructor(cfg: BrokerizeConfig, auth: Auth, wsClient?: BrokerizeWebSocketClientImpl);
29
+ constructor(cfg: BrokerizeConfig, auth: Auth, wsClient?: BrokerizeWebSocketClient);
30
30
  createChildContext(): AuthorizedApiContext;
31
31
  private _initRequestInit;
32
32
  getBrokers(): Promise<openApiClient.GetBrokersResponse>;
@@ -141,3 +141,4 @@ export declare class AuthorizedApiContext {
141
141
  destroy(): void;
142
142
  subscribeLogout(callback: Callback): Subscription;
143
143
  }
144
+ export declare function getWebSocketURLByBasePath(basePath: string): string;
@@ -432,7 +432,7 @@ export class AuthorizedApiContext {
432
432
  };
433
433
  }
434
434
  }
435
- function getWebSocketURLByBasePath(basePath) {
435
+ export function getWebSocketURLByBasePath(basePath) {
436
436
  const SUFFIX = "/websocket";
437
437
  if (basePath.startsWith("https")) {
438
438
  return "wss://" + basePath.substring(8) + SUFFIX;
package/dist/client.d.ts CHANGED
@@ -1098,7 +1098,7 @@ export declare class AuthorizedApiContext {
1098
1098
  private _adminApi;
1099
1099
  private _userApi;
1100
1100
  private _securitiesApi;
1101
- constructor(cfg: BrokerizeConfig, auth: Auth, wsClient?: BrokerizeWebSocketClientImpl);
1101
+ constructor(cfg: BrokerizeConfig, auth: Auth, wsClient?: BrokerizeWebSocketClient);
1102
1102
  createChildContext(): AuthorizedApiContext;
1103
1103
  private _initRequestInit;
1104
1104
  getBrokers(): Promise<openApiClient.GetBrokersResponse>;
@@ -1447,7 +1447,7 @@ export declare class Brokerize {
1447
1447
  * @param tokenRefreshCallback when a token refresh occurs, this callback is called and can store the stored tokens
1448
1448
  * @returns
1449
1449
  */
1450
- createAuthorizedContext(authCtxCfg: AuthContextConfiguration, tokenRefreshCallback?: TokenRefreshCallback): AuthorizedApiContext;
1450
+ createAuthorizedContext(authCtxCfg: AuthContextConfiguration, tokenRefreshCallback?: TokenRefreshCallback, customWebSocketClient?: BrokerizeWebSocketClient): AuthorizedApiContext;
1451
1451
  getCognitoConfig(): CognitoPoolConfig | undefined;
1452
1452
  /**
1453
1453
  * Create an "Auth" object which can be used to retrive access tokens.
@@ -1459,6 +1459,24 @@ export declare class Brokerize {
1459
1459
  * @returns
1460
1460
  */
1461
1461
  createAuth(authCtxCfg: AuthContextConfiguration, tokenRefreshCallback?: TokenRefreshCallback): Auth;
1462
+ /**
1463
+ * Create a customized WebSocket client. You can override the WebSocket connection URL and the Auth implementation
1464
+ * for a custom token retrieval behavior.
1465
+ *
1466
+ * Note that in most contexts this is not needed.
1467
+ *
1468
+ * If you want to use it, you should use the created client in your call to `createAuthorizedContext`, so that it
1469
+ * is used by clients:
1470
+ *
1471
+ * ```
1472
+ * const customWebSocketClient = Brokerize.createCustomWebSocketClient({ auth: { async getToken() {...} }});
1473
+ * const authorizedApiCtx = Brokerize.createAuthorizedContext(authCtxCfg, tokenRefreshCallback, customWebSocketClient);
1474
+ * ```
1475
+ */
1476
+ createCustomWebSocketClient({ url, auth, }: {
1477
+ url?: string;
1478
+ auth: Auth;
1479
+ }): BrokerizeWebSocketClient;
1462
1480
  }
1463
1481
 
1464
1482
  export declare interface BrokerizeConfig {
@@ -1526,55 +1544,6 @@ export declare interface BrokerizeWebSocketClient {
1526
1544
  subscribeDecoupledOperation: (subscribe: Pick<SubscribeDecoupledOperation, "sessionId" | "decoupledOperationId">, callback: Callback) => Subscription;
1527
1545
  }
1528
1546
 
1529
- declare class BrokerizeWebSocketClientImpl implements BrokerizeWebSocketClient {
1530
- private _url;
1531
- private _map;
1532
- private _id;
1533
- private _socket;
1534
- private _pingIntvl;
1535
- private _reconnectIntvl;
1536
- private _authenticatedCallback;
1537
- private _disconnectTimeout;
1538
- private _isOpen;
1539
- private _auth;
1540
- private _createWebsocket;
1541
- private _fatalError;
1542
- private _lastNonFatalError;
1543
- private _errorCount;
1544
- constructor(websocketUrl: string, auth: Auth, createWebSocket: (url: string) => WebSocket_2);
1545
- private _updateReconnectInterval;
1546
- /**
1547
- * Simple backoff behavior: first retry is fast (100ms), next 9 retries 1s, after that we only reconnect every 10s.
1548
- */
1549
- private _computeReconnectIntervalInMilliseconds;
1550
- private _shouldConnect;
1551
- private subscribe;
1552
- subscribeInvalidate(subscribe: SubscribeInvalidateDetails, callback: Callback): Subscription;
1553
- subscribeDecoupledOperation(subscribe: Pick<SubscribeDecoupledOperation, "sessionId" | "decoupledOperationId">, callback: Callback): Subscription;
1554
- private _startSubscription;
1555
- private _endSubscription;
1556
- _startOrStopDisconnectTimeout(): void;
1557
- private _sendWs;
1558
- private _connect;
1559
- /**
1560
- * Error happend when trying to connect, but it may be solved by trying a reconnect later.
1561
- */
1562
- private _handleNonFatalError;
1563
- /**
1564
- * Fatal error: this means the client is unusable from now on and must be recreated.
1565
- */
1566
- private _handleFatalError;
1567
- /**
1568
- * If a fatal error occurs, all registered callbacks must be called with the error parameter.
1569
- */
1570
- private _notifySubscribersAboutFatalError;
1571
- /**
1572
- * Once we have successfully established a connection, error counts and states must be reset.
1573
- */
1574
- private _resetErrorState;
1575
- private _findSubscriptionEntry;
1576
- }
1577
-
1578
1547
  declare type BrokerizeWebSocketError = {
1579
1548
  message: string;
1580
1549
  };
@@ -2665,6 +2634,16 @@ declare interface ClientConfig {
2665
2634
  * @memberof ClientConfig
2666
2635
  */
2667
2636
  guestUserLifetime?: GuestUserLifetime;
2637
+ /**
2638
+ * If true, portfolios that have no active session usable by the current user token will
2639
+ * be filtered from /portfolio/ endpoints. This is useful for applications that do not
2640
+ * want to offer viewing data that is not from the currently logged in broker sessions.
2641
+ *
2642
+ * Default is false.
2643
+ * @type {boolean}
2644
+ * @memberof ClientConfig
2645
+ */
2646
+ hideOfflinePortfolios?: boolean;
2668
2647
  /**
2669
2648
  *
2670
2649
  * @type {string}
@@ -2835,6 +2814,16 @@ declare interface ClientConfigUpdate {
2835
2814
  * @memberof ClientConfigUpdate
2836
2815
  */
2837
2816
  guestUserLifetime?: GuestUserLifetime;
2817
+ /**
2818
+ * If true, portfolios that have no active session usable by the current user token will
2819
+ * be filtered from /portfolio/ endpoints. This is useful for applications that do not
2820
+ * want to offer viewing data that is not from the currently logged in broker sessions.
2821
+ *
2822
+ * Default is false.
2823
+ * @type {boolean}
2824
+ * @memberof ClientConfigUpdate
2825
+ */
2826
+ hideOfflinePortfolios?: boolean;
2838
2827
  /**
2839
2828
  *
2840
2829
  * @type {string}
@@ -3539,6 +3528,20 @@ declare interface CreateGuestUserResponse {
3539
3528
  * @memberof CreateGuestUserResponse
3540
3529
  */
3541
3530
  refreshTokenExpiresIn?: number;
3531
+ /**
3532
+ * If applicable for the client configuration, another refresh token which does not have
3533
+ * access to the current trading session. It can be used to acquire a new trading session, which will belong to the
3534
+ * same user, but have separate active broker sessions.
3535
+ * @type {string}
3536
+ * @memberof CreateGuestUserResponse
3537
+ */
3538
+ refreshTokenWithoutTradingsession?: string;
3539
+ /**
3540
+ *
3541
+ * @type {number}
3542
+ * @memberof CreateGuestUserResponse
3543
+ */
3544
+ refreshTokenWithoutTradingsessionExpiresIn?: number;
3542
3545
  /**
3543
3546
  * The OAuth token_type. Currently always `"bearer"`.
3544
3547
  * @type {string}
@@ -3932,6 +3935,13 @@ declare interface DecoupledOperationStatus {
3932
3935
  * @memberof DecoupledOperationStatus
3933
3936
  */
3934
3937
  createdOrderId?: string;
3938
+ /**
3939
+ * If this is `true`, clients may show a "cancel" button which triggers the `CancelDecoupledOperation` endpoint.
3940
+ * Some brokers do not offer cancellation - in that case, do not call the endpoint.
3941
+ * @type {boolean}
3942
+ * @memberof DecoupledOperationStatus
3943
+ */
3944
+ isCancellable?: boolean;
3935
3945
  /**
3936
3946
  *
3937
3947
  * @type {DecoupledOperationState}
@@ -4398,11 +4408,11 @@ declare function DemoAccountToJSONRecursive(value?: DemoAccount | null, ignorePa
4398
4408
  */
4399
4409
  declare class DemobrokerApi extends runtime.BaseAPI {
4400
4410
  /**
4401
- * 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 - `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 - all other orders will be canceled after 3 seconds 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.
4411
+ * 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 - `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 - 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.
4402
4412
  */
4403
4413
  createDemoAccountRaw(requestParameters: CreateDemoAccountRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<CreatedResponseBody>>;
4404
4414
  /**
4405
- * 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 - `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 - all other orders will be canceled after 3 seconds 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.
4415
+ * 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 - `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 - 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.
4406
4416
  */
4407
4417
  createDemoAccount(requestParameters?: CreateDemoAccountRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<CreatedResponseBody>;
4408
4418
  /**
@@ -7156,8 +7166,9 @@ declare interface GuestAuthContextConfiguration {
7156
7166
  * @export
7157
7167
  */
7158
7168
  declare const GuestUserLifetime: {
7159
- readonly Day: "ONE_DAY";
7160
- readonly Week: "ONE_WEEK";
7169
+ readonly OneDay: "ONE_DAY";
7170
+ readonly OneWeek: "ONE_WEEK";
7171
+ readonly Infinite: "INFINITE";
7161
7172
  };
7162
7173
 
7163
7174
  declare type GuestUserLifetime = (typeof GuestUserLifetime)[keyof typeof GuestUserLifetime];
@@ -9431,6 +9442,13 @@ declare interface Order {
9431
9442
  * @memberof Order
9432
9443
  */
9433
9444
  currentStop?: Amount;
9445
+ /**
9446
+ * If this is true, it is possible to get more details about the order (usually execution details) by retrieving the order
9447
+ * using the `GetOrder` endpoint.
9448
+ * @type {boolean}
9449
+ * @memberof Order
9450
+ */
9451
+ detailsCanBeEnhanced?: boolean;
9434
9452
  /**
9435
9453
  *
9436
9454
  * @type {Direction}
@@ -9478,6 +9496,7 @@ declare interface Order {
9478
9496
  * If this is true, it is not possible to show a receipt for this order (this is the case if order data is incomplete in order lists).
9479
9497
  * @type {boolean}
9480
9498
  * @memberof Order
9499
+ * @deprecated
9481
9500
  */
9482
9501
  hasNoOrderReceipt?: boolean;
9483
9502
  /**
@@ -13194,6 +13213,19 @@ declare interface TokenResponse {
13194
13213
  * @memberof TokenResponse
13195
13214
  */
13196
13215
  refreshTokenExpiresIn: number;
13216
+ /**
13217
+ * If applicable for the client configuration, another refresh token which does not have
13218
+ * access to the current trading session. It can be used to acquire a new trading session.
13219
+ * @type {string}
13220
+ * @memberof TokenResponse
13221
+ */
13222
+ refreshTokenWithoutTradingsession?: string;
13223
+ /**
13224
+ *
13225
+ * @type {number}
13226
+ * @memberof TokenResponse
13227
+ */
13228
+ refreshTokenWithoutTradingsessionExpiresIn?: number;
13197
13229
  /**
13198
13230
  * token_type, it should always be "bearer"
13199
13231
  * @type {string}
package/dist/index.d.ts CHANGED
@@ -21,7 +21,7 @@ export declare class Brokerize {
21
21
  * @param tokenRefreshCallback when a token refresh occurs, this callback is called and can store the stored tokens
22
22
  * @returns
23
23
  */
24
- createAuthorizedContext(authCtxCfg: AuthContextConfiguration, tokenRefreshCallback?: TokenRefreshCallback): AuthorizedApiContext;
24
+ createAuthorizedContext(authCtxCfg: AuthContextConfiguration, tokenRefreshCallback?: TokenRefreshCallback, customWebSocketClient?: BrokerizeWebSocketClient): AuthorizedApiContext;
25
25
  getCognitoConfig(): CognitoPoolConfig | undefined;
26
26
  /**
27
27
  * Create an "Auth" object which can be used to retrive access tokens.
@@ -33,6 +33,24 @@ export declare class Brokerize {
33
33
  * @returns
34
34
  */
35
35
  createAuth(authCtxCfg: AuthContextConfiguration, tokenRefreshCallback?: TokenRefreshCallback): Auth;
36
+ /**
37
+ * Create a customized WebSocket client. You can override the WebSocket connection URL and the Auth implementation
38
+ * for a custom token retrieval behavior.
39
+ *
40
+ * Note that in most contexts this is not needed.
41
+ *
42
+ * If you want to use it, you should use the created client in your call to `createAuthorizedContext`, so that it
43
+ * is used by clients:
44
+ *
45
+ * ```
46
+ * const customWebSocketClient = Brokerize.createCustomWebSocketClient({ auth: { async getToken() {...} }});
47
+ * const authorizedApiCtx = Brokerize.createAuthorizedContext(authCtxCfg, tokenRefreshCallback, customWebSocketClient);
48
+ * ```
49
+ */
50
+ createCustomWebSocketClient({ url, auth, }: {
51
+ url?: string;
52
+ auth: Auth;
53
+ }): BrokerizeWebSocketClient;
36
54
  }
37
55
  /**
38
56
  * When a token update occurs (e.g. due to a refreshToken call), this callback is called.
package/dist/index.js CHANGED
@@ -1,10 +1,11 @@
1
1
  /* Import/Export the DOM parts we rely on. Those are partial copies from the official TypeScript DOM library definitions (https://github.com/microsoft/TypeScript/blob/master/lib/lib.dom.d.ts),
2
2
  but reduced to the parts actually used by bg-trading. */
3
3
  import { createAuth, createConfiguration, } from "./apiCtx";
4
- import { AuthorizedApiContext } from "./authorizedApiContext";
4
+ import { AuthorizedApiContext, getWebSocketURLByBasePath, } from "./authorizedApiContext";
5
5
  import { BrokerizeError } from "./errors";
6
6
  import * as openApiClient from "./swagger";
7
7
  import * as Models from "./modelExports";
8
+ import { BrokerizeWebSocketClientImpl, } from "./websocketClient";
8
9
  import * as WebSocketTypes from "./websocketTypes";
9
10
  import * as Utils from "./utils";
10
11
  export { AuthorizedApiContext, Models, WebSocketTypes, Utils, BrokerizeError, };
@@ -61,8 +62,9 @@ export class Brokerize {
61
62
  * @param tokenRefreshCallback when a token refresh occurs, this callback is called and can store the stored tokens
62
63
  * @returns
63
64
  */
64
- createAuthorizedContext(authCtxCfg, tokenRefreshCallback) {
65
- return new AuthorizedApiContext(this._cfg, this.createAuth(authCtxCfg, tokenRefreshCallback));
65
+ createAuthorizedContext(authCtxCfg, tokenRefreshCallback, customWebSocketClient) {
66
+ const auth = this.createAuth(authCtxCfg, tokenRefreshCallback);
67
+ return new AuthorizedApiContext(this._cfg, auth, customWebSocketClient);
66
68
  }
67
69
  getCognitoConfig() {
68
70
  var _a;
@@ -88,6 +90,33 @@ export class Brokerize {
88
90
  },
89
91
  });
90
92
  }
93
+ /**
94
+ * Create a customized WebSocket client. You can override the WebSocket connection URL and the Auth implementation
95
+ * for a custom token retrieval behavior.
96
+ *
97
+ * Note that in most contexts this is not needed.
98
+ *
99
+ * If you want to use it, you should use the created client in your call to `createAuthorizedContext`, so that it
100
+ * is used by clients:
101
+ *
102
+ * ```
103
+ * const customWebSocketClient = Brokerize.createCustomWebSocketClient({ auth: { async getToken() {...} }});
104
+ * const authorizedApiCtx = Brokerize.createAuthorizedContext(authCtxCfg, tokenRefreshCallback, customWebSocketClient);
105
+ * ```
106
+ */
107
+ createCustomWebSocketClient({ url, auth, }) {
108
+ if (!(url === null || url === void 0 ? void 0 : url.length)) {
109
+ const basePath = this._cfg.basePath || "https://api-preview.brokerize.com";
110
+ url = getWebSocketURLByBasePath(basePath);
111
+ }
112
+ if (this._cfg.createWebSocket == null) {
113
+ throw new Error("createWebSocket must be configured");
114
+ }
115
+ if (!(auth === null || auth === void 0 ? void 0 : auth.getToken)) {
116
+ throw new Error("Auth implementation with getToken function must be provided");
117
+ }
118
+ return new BrokerizeWebSocketClientImpl(url, auth, this._cfg.createWebSocket);
119
+ }
91
120
  }
92
121
  function getGlobalObject() {
93
122
  if (typeof globalThis !== "undefined")
@@ -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 - `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 - all other orders will be canceled after 3 seconds 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 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 - `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 - 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.
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 - `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 - all other orders will be canceled after 3 seconds 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 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 - `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 - 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.
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 - `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 - all other orders will be canceled after 3 seconds 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 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 - `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 - 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.
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 - `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 - all other orders will be canceled after 3 seconds 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 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 - `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 - 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.
48
48
  */
49
49
  async createDemoAccount(requestParameters = {}, initOverrides) {
50
50
  const response = await this.createDemoAccountRaw(requestParameters, initOverrides);
@@ -75,6 +75,16 @@ export interface ClientConfig {
75
75
  * @memberof ClientConfig
76
76
  */
77
77
  guestUserLifetime?: GuestUserLifetime;
78
+ /**
79
+ * If true, portfolios that have no active session usable by the current user token will
80
+ * be filtered from /portfolio/ endpoints. This is useful for applications that do not
81
+ * want to offer viewing data that is not from the currently logged in broker sessions.
82
+ *
83
+ * Default is false.
84
+ * @type {boolean}
85
+ * @memberof ClientConfig
86
+ */
87
+ hideOfflinePortfolios?: boolean;
78
88
  /**
79
89
  *
80
90
  * @type {string}
@@ -40,6 +40,9 @@ export function ClientConfigFromJSONTyped(json, ignoreDiscriminator) {
40
40
  guestUserLifetime: !exists(json, "guestUserLifetime")
41
41
  ? undefined
42
42
  : GuestUserLifetimeFromJSON(json["guestUserLifetime"]),
43
+ hideOfflinePortfolios: !exists(json, "hideOfflinePortfolios")
44
+ ? undefined
45
+ : json["hideOfflinePortfolios"],
43
46
  legalEntityName: json["legalEntityName"],
44
47
  maintenanceStatus: !exists(json, "maintenanceStatus")
45
48
  ? undefined
@@ -73,6 +76,7 @@ export function ClientConfigToJSONRecursive(value, ignoreParent = false) {
73
76
  enabled: value.enabled,
74
77
  guestUserInactivityTimeoutSeconds: value.guestUserInactivityTimeoutSeconds,
75
78
  guestUserLifetime: GuestUserLifetimeToJSON(value.guestUserLifetime),
79
+ hideOfflinePortfolios: value.hideOfflinePortfolios,
76
80
  legalEntityName: value.legalEntityName,
77
81
  maintenanceStatus: ClientConfigMaintenanceStatusToJSON(value.maintenanceStatus),
78
82
  name: value.name,
@@ -89,6 +89,16 @@ export interface ClientConfigUpdate {
89
89
  * @memberof ClientConfigUpdate
90
90
  */
91
91
  guestUserLifetime?: GuestUserLifetime;
92
+ /**
93
+ * If true, portfolios that have no active session usable by the current user token will
94
+ * be filtered from /portfolio/ endpoints. This is useful for applications that do not
95
+ * want to offer viewing data that is not from the currently logged in broker sessions.
96
+ *
97
+ * Default is false.
98
+ * @type {boolean}
99
+ * @memberof ClientConfigUpdate
100
+ */
101
+ hideOfflinePortfolios?: boolean;
92
102
  /**
93
103
  *
94
104
  * @type {string}
@@ -57,6 +57,9 @@ export function ClientConfigUpdateFromJSONTyped(json, ignoreDiscriminator) {
57
57
  guestUserLifetime: !exists(json, "guestUserLifetime")
58
58
  ? undefined
59
59
  : GuestUserLifetimeFromJSON(json["guestUserLifetime"]),
60
+ hideOfflinePortfolios: !exists(json, "hideOfflinePortfolios")
61
+ ? undefined
62
+ : json["hideOfflinePortfolios"],
60
63
  legalEntityName: !exists(json, "legalEntityName")
61
64
  ? undefined
62
65
  : json["legalEntityName"],
@@ -111,6 +114,7 @@ export function ClientConfigUpdateToJSONRecursive(value, ignoreParent = false) {
111
114
  enabled: value.enabled,
112
115
  guestUserInactivityTimeoutSeconds: value.guestUserInactivityTimeoutSeconds,
113
116
  guestUserLifetime: GuestUserLifetimeToJSON(value.guestUserLifetime),
117
+ hideOfflinePortfolios: value.hideOfflinePortfolios,
114
118
  legalEntityName: value.legalEntityName,
115
119
  maintenanceStatus: ClientConfigMaintenanceStatusToJSON(value.maintenanceStatus),
116
120
  managingUserIds: value.managingUserIds,
@@ -46,6 +46,20 @@ export interface CreateGuestUserResponse {
46
46
  * @memberof CreateGuestUserResponse
47
47
  */
48
48
  refreshTokenExpiresIn?: number;
49
+ /**
50
+ * If applicable for the client configuration, another refresh token which does not have
51
+ * access to the current trading session. It can be used to acquire a new trading session, which will belong to the
52
+ * same user, but have separate active broker sessions.
53
+ * @type {string}
54
+ * @memberof CreateGuestUserResponse
55
+ */
56
+ refreshTokenWithoutTradingsession?: string;
57
+ /**
58
+ *
59
+ * @type {number}
60
+ * @memberof CreateGuestUserResponse
61
+ */
62
+ refreshTokenWithoutTradingsessionExpiresIn?: number;
49
63
  /**
50
64
  * The OAuth token_type. Currently always `"bearer"`.
51
65
  * @type {string}
@@ -28,6 +28,12 @@ export function CreateGuestUserResponseFromJSONTyped(json, ignoreDiscriminator)
28
28
  refreshTokenExpiresIn: !exists(json, "refresh_token_expires_in")
29
29
  ? undefined
30
30
  : json["refresh_token_expires_in"],
31
+ refreshTokenWithoutTradingsession: !exists(json, "refresh_token_without_tradingsession")
32
+ ? undefined
33
+ : json["refresh_token_without_tradingsession"],
34
+ refreshTokenWithoutTradingsessionExpiresIn: !exists(json, "refresh_token_without_tradingsession_expires_in")
35
+ ? undefined
36
+ : json["refresh_token_without_tradingsession_expires_in"],
31
37
  tokenType: json["token_type"],
32
38
  };
33
39
  }
@@ -44,6 +50,8 @@ export function CreateGuestUserResponseToJSONRecursive(value, ignoreParent = fal
44
50
  idToken: value.idToken,
45
51
  refresh_token: value.refreshToken,
46
52
  refresh_token_expires_in: value.refreshTokenExpiresIn,
53
+ refresh_token_without_tradingsession: value.refreshTokenWithoutTradingsession,
54
+ refresh_token_without_tradingsession_expires_in: value.refreshTokenWithoutTradingsessionExpiresIn,
47
55
  token_type: value.tokenType,
48
56
  };
49
57
  }
@@ -29,6 +29,13 @@ export interface DecoupledOperationStatus {
29
29
  * @memberof DecoupledOperationStatus
30
30
  */
31
31
  createdOrderId?: string;
32
+ /**
33
+ * If this is `true`, clients may show a "cancel" button which triggers the `CancelDecoupledOperation` endpoint.
34
+ * Some brokers do not offer cancellation - in that case, do not call the endpoint.
35
+ * @type {boolean}
36
+ * @memberof DecoupledOperationStatus
37
+ */
38
+ isCancellable?: boolean;
32
39
  /**
33
40
  *
34
41
  * @type {DecoupledOperationState}
@@ -23,6 +23,9 @@ export function DecoupledOperationStatusFromJSONTyped(json, ignoreDiscriminator)
23
23
  createdOrderId: !exists(json, "createdOrderId")
24
24
  ? undefined
25
25
  : json["createdOrderId"],
26
+ isCancellable: !exists(json, "isCancellable")
27
+ ? undefined
28
+ : json["isCancellable"],
26
29
  state: DecoupledOperationStateFromJSON(json["state"]),
27
30
  text: !exists(json, "text") ? undefined : json["text"],
28
31
  };
@@ -36,6 +39,7 @@ export function DecoupledOperationStatusToJSONRecursive(value, ignoreParent = fa
36
39
  }
37
40
  return {
38
41
  createdOrderId: value.createdOrderId,
42
+ isCancellable: value.isCancellable,
39
43
  state: DecoupledOperationStateToJSON(value.state),
40
44
  text: value.text,
41
45
  };
@@ -13,8 +13,9 @@
13
13
  * @export
14
14
  */
15
15
  export declare const GuestUserLifetime: {
16
- readonly Day: "ONE_DAY";
17
- readonly Week: "ONE_WEEK";
16
+ readonly OneDay: "ONE_DAY";
17
+ readonly OneWeek: "ONE_WEEK";
18
+ readonly Infinite: "INFINITE";
18
19
  };
19
20
  export type GuestUserLifetime = (typeof GuestUserLifetime)[keyof typeof GuestUserLifetime];
20
21
  export declare function GuestUserLifetimeFromJSON(json: any): GuestUserLifetime;
@@ -15,8 +15,9 @@
15
15
  * @export
16
16
  */
17
17
  export const GuestUserLifetime = {
18
- Day: "ONE_DAY",
19
- Week: "ONE_WEEK",
18
+ OneDay: "ONE_DAY",
19
+ OneWeek: "ONE_WEEK",
20
+ Infinite: "INFINITE",
20
21
  };
21
22
  export function GuestUserLifetimeFromJSON(json) {
22
23
  return GuestUserLifetimeFromJSONTyped(json, false);
@@ -143,6 +143,13 @@ export interface Order {
143
143
  * @memberof Order
144
144
  */
145
145
  currentStop?: Amount;
146
+ /**
147
+ * If this is true, it is possible to get more details about the order (usually execution details) by retrieving the order
148
+ * using the `GetOrder` endpoint.
149
+ * @type {boolean}
150
+ * @memberof Order
151
+ */
152
+ detailsCanBeEnhanced?: boolean;
146
153
  /**
147
154
  *
148
155
  * @type {Direction}
@@ -190,6 +197,7 @@ export interface Order {
190
197
  * If this is true, it is not possible to show a receipt for this order (this is the case if order data is incomplete in order lists).
191
198
  * @type {boolean}
192
199
  * @memberof Order
200
+ * @deprecated
193
201
  */
194
202
  hasNoOrderReceipt?: boolean;
195
203
  /**
@@ -86,6 +86,9 @@ export function OrderFromJSONTyped(json, ignoreDiscriminator) {
86
86
  currentStop: !exists(json, "currentStop")
87
87
  ? undefined
88
88
  : AmountFromJSON(json["currentStop"]),
89
+ detailsCanBeEnhanced: !exists(json, "detailsCanBeEnhanced")
90
+ ? undefined
91
+ : json["detailsCanBeEnhanced"],
89
92
  direction: DirectionFromJSON(json["direction"]),
90
93
  displayNo: !exists(json, "displayNo") ? undefined : json["displayNo"],
91
94
  exchangeId: !exists(json, "exchangeId") ? undefined : json["exchangeId"],
@@ -198,6 +201,7 @@ export function OrderToJSONRecursive(value, ignoreParent = false) {
198
201
  changesHaveCostEstimations: value.changesHaveCostEstimations,
199
202
  createdAt: value.createdAt.toISOString(),
200
203
  currentStop: AmountToJSON(value.currentStop),
204
+ detailsCanBeEnhanced: value.detailsCanBeEnhanced,
201
205
  direction: DirectionToJSON(value.direction),
202
206
  displayNo: value.displayNo,
203
207
  exchangeId: value.exchangeId,
@@ -38,6 +38,19 @@ export interface TokenResponse {
38
38
  * @memberof TokenResponse
39
39
  */
40
40
  refreshTokenExpiresIn: number;
41
+ /**
42
+ * If applicable for the client configuration, another refresh token which does not have
43
+ * access to the current trading session. It can be used to acquire a new trading session.
44
+ * @type {string}
45
+ * @memberof TokenResponse
46
+ */
47
+ refreshTokenWithoutTradingsession?: string;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof TokenResponse
52
+ */
53
+ refreshTokenWithoutTradingsessionExpiresIn?: number;
41
54
  /**
42
55
  * token_type, it should always be "bearer"
43
56
  * @type {string}
@@ -10,6 +10,7 @@
10
10
  * https://openapi-generator.tech
11
11
  * Do not edit the class manually.
12
12
  */
13
+ import { exists } from "../runtime";
13
14
  export function TokenResponseFromJSON(json) {
14
15
  return TokenResponseFromJSONTyped(json, false);
15
16
  }
@@ -22,6 +23,12 @@ export function TokenResponseFromJSONTyped(json, ignoreDiscriminator) {
22
23
  expiresIn: json["expires_in"],
23
24
  refreshToken: json["refresh_token"],
24
25
  refreshTokenExpiresIn: json["refresh_token_expires_in"],
26
+ refreshTokenWithoutTradingsession: !exists(json, "refresh_token_without_tradingsession")
27
+ ? undefined
28
+ : json["refresh_token_without_tradingsession"],
29
+ refreshTokenWithoutTradingsessionExpiresIn: !exists(json, "refresh_token_without_tradingsession_expires_in")
30
+ ? undefined
31
+ : json["refresh_token_without_tradingsession_expires_in"],
25
32
  tokenType: json["token_type"],
26
33
  };
27
34
  }
@@ -37,6 +44,8 @@ export function TokenResponseToJSONRecursive(value, ignoreParent = false) {
37
44
  expires_in: value.expiresIn,
38
45
  refresh_token: value.refreshToken,
39
46
  refresh_token_expires_in: value.refreshTokenExpiresIn,
47
+ refresh_token_without_tradingsession: value.refreshTokenWithoutTradingsession,
48
+ refresh_token_without_tradingsession_expires_in: value.refreshTokenWithoutTradingsessionExpiresIn,
40
49
  token_type: value.tokenType,
41
50
  };
42
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brokerize/client",
3
- "version": "1.2.6",
3
+ "version": "1.3.1",
4
4
  "description": "Client for the brokerize.com API",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/brokerize/client-js#readme",