@brokerize/client 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +4 -2
  2. package/dist/authorizedApiContext.d.ts +3 -0
  3. package/dist/authorizedApiContext.js +9 -0
  4. package/dist/client.d.ts +487 -79
  5. package/dist/modelExports.d.ts +6 -0
  6. package/dist/swagger/apis/DefaultApi.d.ts +37 -3
  7. package/dist/swagger/apis/DefaultApi.js +121 -2
  8. package/dist/swagger/models/ClientConfig.d.ts +7 -0
  9. package/dist/swagger/models/ClientConfig.js +4 -0
  10. package/dist/swagger/models/ClientConfigUpdate.d.ts +6 -0
  11. package/dist/swagger/models/ClientConfigUpdate.js +4 -0
  12. package/dist/swagger/models/GetPortfolioTradeStatisticsResponse.d.ts +28 -0
  13. package/dist/swagger/models/GetPortfolioTradeStatisticsResponse.js +38 -0
  14. package/dist/swagger/models/GetPortfolioTradesResponse.d.ts +34 -0
  15. package/dist/swagger/models/GetPortfolioTradesResponse.js +40 -0
  16. package/dist/swagger/models/SummarizedTrade.d.ts +77 -0
  17. package/dist/swagger/models/SummarizedTrade.js +56 -0
  18. package/dist/swagger/models/TokenResponse.d.ts +51 -0
  19. package/dist/swagger/models/{ObtainToken200Response.js → TokenResponse.js} +6 -6
  20. package/dist/swagger/models/TradeDraftUpdateParams.d.ts +2 -3
  21. package/dist/swagger/models/TradeDraftUpdateParams.js +2 -5
  22. package/dist/swagger/models/TradeStatistics.d.ts +65 -0
  23. package/dist/swagger/models/TradeStatistics.js +50 -0
  24. package/dist/swagger/models/TradeStatisticsDateRange.d.ts +39 -0
  25. package/dist/swagger/models/TradeStatisticsDateRange.js +41 -0
  26. package/dist/swagger/models/TradeStatisticsHoldingPeriodInDays.d.ts +39 -0
  27. package/dist/swagger/models/TradeStatisticsHoldingPeriodInDays.js +41 -0
  28. package/dist/swagger/models/TradeStatisticsItem.d.ts +35 -0
  29. package/dist/swagger/models/TradeStatisticsItem.js +41 -0
  30. package/dist/swagger/models/TradeWarning.d.ts +27 -0
  31. package/dist/swagger/models/TradeWarning.js +37 -0
  32. package/dist/swagger/models/index.d.ts +9 -2
  33. package/dist/swagger/models/index.js +9 -2
  34. package/package.json +1 -1
  35. package/dist/swagger/models/ObtainToken200Response.d.ts +0 -51
  36. package/dist/swagger/models/TradeDraftUpdateParamsOrderId.d.ts +0 -21
  37. package/dist/swagger/models/TradeDraftUpdateParamsOrderId.js +0 -24
package/dist/client.d.ts CHANGED
@@ -1130,6 +1130,9 @@ export declare class AuthorizedApiContext {
1130
1130
  getPortfolioQuotes(portfolioId: string): Promise<openApiClient.GetPortfolioQuotesResponse>;
1131
1131
  getPortfolioPositions(portfolioId: string): Promise<openApiClient.GetPortfolioPositionsResponse>;
1132
1132
  getPortfolioOrders(req: openApiClient.GetPortfolioOrdersRequest): Promise<openApiClient.GetPortfolioOrdersResponse>;
1133
+ getPortfolioTrades(req: openApiClient.GetPortfolioTradesRequest): Promise<openApiClient.GetPortfolioTradesResponse>;
1134
+ getPortfolioTradeWarnings(req: openApiClient.GetPortfolioTradeWarningsRequest): Promise<openApiClient.TradeWarning[]>;
1135
+ getPortfolioTradeStatistics(req: openApiClient.GetPortfolioTradeStatisticsRequest): Promise<openApiClient.GetPortfolioTradeStatisticsResponse>;
1133
1136
  getAuthInfo(portfolioId: string): Promise<openApiClient.GetAuthInfoResponse>;
1134
1137
  addSessionCompleteChallenge(req: openApiClient.AddSessionCompleteChallengeRequest): Promise<openApiClient.LoginResponseReady>;
1135
1138
  createSessionTanChallenge(req: openApiClient.CreateSessionTanChallengeRequest): Promise<openApiClient.Challenge>;
@@ -2404,6 +2407,13 @@ declare interface ClientConfig {
2404
2407
  * @memberof ClientConfig
2405
2408
  */
2406
2409
  cognitoClientIds: Array<string>;
2410
+ /**
2411
+ * If this is true, crypto trading is allowed for this client. If this is true, clients must send
2412
+ * some requests to the crypto trading service (for crypto orders) which is controlled by the flag `tradingViaCryptoService`.
2413
+ * @type {boolean}
2414
+ * @memberof ClientConfig
2415
+ */
2416
+ cryptoTradingAllowed?: boolean;
2407
2417
  /**
2408
2418
  *
2409
2419
  * @type {boolean}
@@ -2562,6 +2572,12 @@ declare interface ClientConfigUpdate {
2562
2572
  * @memberof ClientConfigUpdate
2563
2573
  */
2564
2574
  cognitoClientIds?: Array<string>;
2575
+ /**
2576
+ * If this is true, crypto trading is allowed for this client.
2577
+ * @type {boolean}
2578
+ * @memberof ClientConfigUpdate
2579
+ */
2580
+ cryptoTradingAllowed?: boolean;
2565
2581
  /**
2566
2582
  *
2567
2583
  * @type {boolean}
@@ -3683,6 +3699,28 @@ declare class DefaultApi extends runtime.BaseAPI {
3683
3699
  /**
3684
3700
  */
3685
3701
  getPortfolioQuotes(requestParameters: GetPortfolioQuotesRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<GetPortfolioQuotesResponse>;
3702
+ /**
3703
+ * Load statistics based on the trade list for selected date ranges. The statistics (such as `longestWinningStreak` or `tradeCount`) are computed for each of the requested date ranges.
3704
+ */
3705
+ getPortfolioTradeStatisticsRaw(requestParameters: GetPortfolioTradeStatisticsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<GetPortfolioTradeStatisticsResponse>>;
3706
+ /**
3707
+ * Load statistics based on the trade list for selected date ranges. The statistics (such as `longestWinningStreak` or `tradeCount`) are computed for each of the requested date ranges.
3708
+ */
3709
+ getPortfolioTradeStatistics(requestParameters: GetPortfolioTradeStatisticsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<GetPortfolioTradeStatisticsResponse>;
3710
+ /**
3711
+ */
3712
+ getPortfolioTradeWarningsRaw(requestParameters: GetPortfolioTradeWarningsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<Array<TradeWarning>>>;
3713
+ /**
3714
+ */
3715
+ getPortfolioTradeWarnings(requestParameters: GetPortfolioTradeWarningsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<Array<TradeWarning>>;
3716
+ /**
3717
+ * Load a list of completed trades in a portfolio. A completed trade corresponds to *one* closing of a position. Technically each closing of a position corresponds to one execution of an order with `intent=close` (usually those are sell orders, but in the case of short selling, opening a position is a sell order with intent=open). The analysis follows the FIFO (First In, First Out) principle to accurately summarize trades. Each time a position is closed (note that partial executions are possible. In this case, each individual execution is regarded as a transaction), the system identifies the earliest corresponding \"open position execution\" that contributed to that closing. The result includes a single entry for each closing transaction, detailing key metrics such as profit/loss and holding period, based on the matched opening transactions. This could be a real world example: - 2020-01-01: buy 5 stock1 for 100 USD each - 2021-06-01: buy 3 stock1 for 200 USD each - 2021-06-06: sell 6 stock1 for 300 USD each In this case, the result would be one completed trade (corresponding to the last sell) with a profit of `(300*6)-(100*5+1*200)=1800-700=1100 USD`. There is an open position remaining (2 units of stock1, which correspond to the second buy transaction). When we add this sell: - 2021-06-07: sell 2 stock1 for 400 USD each It would add a second complete trade with a profit of `(400*2)-(200*2)=800-400=400 USD`. For some brokers, the order history may be incomplete (e.g. only reveals the latest 90 days), so that we do not know if there could be older transactions. Thus, our implementation might detect (given the current set of open positions together with the list of order executions) that we cannot figure out the corresponding opening transactions for a closing transaction. Affected trades will be ignored for this analysis and might appear as warning items in the `/warnings` endpoint. Frontends should show those warnings so that users can understand why the analysis is incomplete.
3718
+ */
3719
+ getPortfolioTradesRaw(requestParameters: GetPortfolioTradesRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<GetPortfolioTradesResponse>>;
3720
+ /**
3721
+ * Load a list of completed trades in a portfolio. A completed trade corresponds to *one* closing of a position. Technically each closing of a position corresponds to one execution of an order with `intent=close` (usually those are sell orders, but in the case of short selling, opening a position is a sell order with intent=open). The analysis follows the FIFO (First In, First Out) principle to accurately summarize trades. Each time a position is closed (note that partial executions are possible. In this case, each individual execution is regarded as a transaction), the system identifies the earliest corresponding \"open position execution\" that contributed to that closing. The result includes a single entry for each closing transaction, detailing key metrics such as profit/loss and holding period, based on the matched opening transactions. This could be a real world example: - 2020-01-01: buy 5 stock1 for 100 USD each - 2021-06-01: buy 3 stock1 for 200 USD each - 2021-06-06: sell 6 stock1 for 300 USD each In this case, the result would be one completed trade (corresponding to the last sell) with a profit of `(300*6)-(100*5+1*200)=1800-700=1100 USD`. There is an open position remaining (2 units of stock1, which correspond to the second buy transaction). When we add this sell: - 2021-06-07: sell 2 stock1 for 400 USD each It would add a second complete trade with a profit of `(400*2)-(200*2)=800-400=400 USD`. For some brokers, the order history may be incomplete (e.g. only reveals the latest 90 days), so that we do not know if there could be older transactions. Thus, our implementation might detect (given the current set of open positions together with the list of order executions) that we cannot figure out the corresponding opening transactions for a closing transaction. Affected trades will be ignored for this analysis and might appear as warning items in the `/warnings` endpoint. Frontends should show those warnings so that users can understand why the analysis is incomplete.
3722
+ */
3723
+ getPortfolioTrades(requestParameters: GetPortfolioTradesRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<GetPortfolioTradesResponse>;
3686
3724
  /**
3687
3725
  */
3688
3726
  getPortfoliosRaw(initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<PortfoliosResponse>>;
@@ -3716,11 +3754,11 @@ declare class DefaultApi extends runtime.BaseAPI {
3716
3754
  /**
3717
3755
  * Obtain a new access token using a refresh token as specified in https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.4. If `CreateGuestUser` has provided a `refresh_token`, this endpoint may be used to obtain a new `access_token` after the original token has expired.
3718
3756
  */
3719
- obtainTokenRaw(requestParameters: ObtainTokenRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<ObtainToken200Response>>;
3757
+ obtainTokenRaw(requestParameters: ObtainTokenRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<TokenResponse>>;
3720
3758
  /**
3721
3759
  * Obtain a new access token using a refresh token as specified in https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.4. If `CreateGuestUser` has provided a `refresh_token`, this endpoint may be used to obtain a new `access_token` after the original token has expired.
3722
3760
  */
3723
- obtainToken(requestParameters: ObtainTokenRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<ObtainToken200Response>;
3761
+ obtainToken(requestParameters: ObtainTokenRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<TokenResponse>;
3724
3762
  /**
3725
3763
  * This endpoint can be used to rename the display name of a specified portfolio. To restore the original portfolio name, send a rename request with an empty string as the new name. **Note**: This does not change the original portfolio name at your broker.
3726
3764
  */
@@ -6438,6 +6476,71 @@ declare function GetPortfolioQuotesResponseToJSON(value?: GetPortfolioQuotesResp
6438
6476
 
6439
6477
  declare function GetPortfolioQuotesResponseToJSONRecursive(value?: GetPortfolioQuotesResponse | null, ignoreParent?: boolean): any;
6440
6478
 
6479
+ declare interface GetPortfolioTradesRequest {
6480
+ portfolioId: string;
6481
+ take?: number;
6482
+ skip?: number;
6483
+ }
6484
+
6485
+ /**
6486
+ *
6487
+ * @export
6488
+ * @interface GetPortfolioTradesResponse
6489
+ */
6490
+ declare interface GetPortfolioTradesResponse {
6491
+ /**
6492
+ *
6493
+ * @type {number}
6494
+ * @memberof GetPortfolioTradesResponse
6495
+ */
6496
+ totalCount: number;
6497
+ /**
6498
+ *
6499
+ * @type {Array<SummarizedTrade>}
6500
+ * @memberof GetPortfolioTradesResponse
6501
+ */
6502
+ trades: Array<SummarizedTrade>;
6503
+ }
6504
+
6505
+ declare function GetPortfolioTradesResponseFromJSON(json: any): GetPortfolioTradesResponse;
6506
+
6507
+ declare function GetPortfolioTradesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortfolioTradesResponse;
6508
+
6509
+ declare function GetPortfolioTradesResponseToJSON(value?: GetPortfolioTradesResponse | null): any;
6510
+
6511
+ declare function GetPortfolioTradesResponseToJSONRecursive(value?: GetPortfolioTradesResponse | null, ignoreParent?: boolean): any;
6512
+
6513
+ declare interface GetPortfolioTradeStatisticsRequest {
6514
+ portfolioId: string;
6515
+ dateRanges: string;
6516
+ }
6517
+
6518
+ /**
6519
+ *
6520
+ * @export
6521
+ * @interface GetPortfolioTradeStatisticsResponse
6522
+ */
6523
+ declare interface GetPortfolioTradeStatisticsResponse {
6524
+ /**
6525
+ *
6526
+ * @type {Array<TradeStatisticsItem>}
6527
+ * @memberof GetPortfolioTradeStatisticsResponse
6528
+ */
6529
+ data: Array<TradeStatisticsItem>;
6530
+ }
6531
+
6532
+ declare function GetPortfolioTradeStatisticsResponseFromJSON(json: any): GetPortfolioTradeStatisticsResponse;
6533
+
6534
+ declare function GetPortfolioTradeStatisticsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortfolioTradeStatisticsResponse;
6535
+
6536
+ declare function GetPortfolioTradeStatisticsResponseToJSON(value?: GetPortfolioTradeStatisticsResponse | null): any;
6537
+
6538
+ declare function GetPortfolioTradeStatisticsResponseToJSONRecursive(value?: GetPortfolioTradeStatisticsResponse | null, ignoreParent?: boolean): any;
6539
+
6540
+ declare interface GetPortfolioTradeWarningsRequest {
6541
+ portfolioId: string;
6542
+ }
6543
+
6441
6544
  /**
6442
6545
  *
6443
6546
  * @export
@@ -7372,7 +7475,13 @@ declare namespace Models {
7372
7475
  SecurityQuotes,
7373
7476
  SecurityQuote,
7374
7477
  OrderIntent,
7375
- OrderIntentAvailability
7478
+ OrderIntentAvailability,
7479
+ SummarizedTrade,
7480
+ TradeWarning,
7481
+ GetPortfolioTradesResponse,
7482
+ GetPortfolioTradeStatisticsResponse,
7483
+ TradeStatisticsItem,
7484
+ TradeStatistics
7376
7485
  }
7377
7486
  }
7378
7487
  export { Models }
@@ -7455,62 +7564,6 @@ declare function OAuthLoginFormConfigToJSON(value?: OAuthLoginFormConfig | null)
7455
7564
 
7456
7565
  declare function OAuthLoginFormConfigToJSONRecursive(value?: OAuthLoginFormConfig | null, ignoreParent?: boolean): any;
7457
7566
 
7458
- /**
7459
- * brokerize
7460
- * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
7461
- *
7462
- *
7463
- *
7464
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7465
- * https://openapi-generator.tech
7466
- * Do not edit the class manually.
7467
- */
7468
- /**
7469
- *
7470
- * @export
7471
- * @interface ObtainToken200Response
7472
- */
7473
- declare interface ObtainToken200Response {
7474
- /**
7475
- *
7476
- * @type {string}
7477
- * @memberof ObtainToken200Response
7478
- */
7479
- accessToken: string;
7480
- /**
7481
- *
7482
- * @type {number}
7483
- * @memberof ObtainToken200Response
7484
- */
7485
- expiresIn: number;
7486
- /**
7487
- *
7488
- * @type {string}
7489
- * @memberof ObtainToken200Response
7490
- */
7491
- refreshToken: string;
7492
- /**
7493
- *
7494
- * @type {number}
7495
- * @memberof ObtainToken200Response
7496
- */
7497
- refreshTokenExpiresIn: number;
7498
- /**
7499
- *
7500
- * @type {string}
7501
- * @memberof ObtainToken200Response
7502
- */
7503
- tokenType: string;
7504
- }
7505
-
7506
- declare function ObtainToken200ResponseFromJSON(json: any): ObtainToken200Response;
7507
-
7508
- declare function ObtainToken200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObtainToken200Response;
7509
-
7510
- declare function ObtainToken200ResponseToJSON(value?: ObtainToken200Response | null): any;
7511
-
7512
- declare function ObtainToken200ResponseToJSONRecursive(value?: ObtainToken200Response | null, ignoreParent?: boolean): any;
7513
-
7514
7567
  declare interface ObtainTokenRequest {
7515
7568
  grantType: string;
7516
7569
  refreshToken: string;
@@ -7615,6 +7668,9 @@ declare namespace openApiClient {
7615
7668
  GetPortfolioOrdersRequest,
7616
7669
  GetPortfolioPositionsRequest,
7617
7670
  GetPortfolioQuotesRequest,
7671
+ GetPortfolioTradeStatisticsRequest,
7672
+ GetPortfolioTradeWarningsRequest,
7673
+ GetPortfolioTradesRequest,
7618
7674
  LogoutSessionRequest,
7619
7675
  ObtainTokenRequest,
7620
7676
  RenamePortfolioOperationRequest,
@@ -8324,6 +8380,16 @@ declare namespace openApiClient {
8324
8380
  GetPortfolioQuotesResponseToJSONRecursive,
8325
8381
  GetPortfolioQuotesResponseToJSON,
8326
8382
  GetPortfolioQuotesResponse,
8383
+ GetPortfolioTradeStatisticsResponseFromJSON,
8384
+ GetPortfolioTradeStatisticsResponseFromJSONTyped,
8385
+ GetPortfolioTradeStatisticsResponseToJSONRecursive,
8386
+ GetPortfolioTradeStatisticsResponseToJSON,
8387
+ GetPortfolioTradeStatisticsResponse,
8388
+ GetPortfolioTradesResponseFromJSON,
8389
+ GetPortfolioTradesResponseFromJSONTyped,
8390
+ GetPortfolioTradesResponseToJSONRecursive,
8391
+ GetPortfolioTradesResponseToJSON,
8392
+ GetPortfolioTradesResponse,
8327
8393
  GetQuoteParamsFromJSON,
8328
8394
  GetQuoteParamsFromJSONTyped,
8329
8395
  GetQuoteParamsToJSONRecursive,
@@ -8412,11 +8478,6 @@ declare namespace openApiClient {
8412
8478
  OAuthLoginFormConfig,
8413
8479
  OAuthLoginFormConfigRedirectStyleEnum,
8414
8480
  OAuthLoginFormConfigRedirectStyleBitpandaEnum,
8415
- ObtainToken200ResponseFromJSON,
8416
- ObtainToken200ResponseFromJSONTyped,
8417
- ObtainToken200ResponseToJSONRecursive,
8418
- ObtainToken200ResponseToJSON,
8419
- ObtainToken200Response,
8420
8481
  OkResponseBodyFromJSON,
8421
8482
  OkResponseBodyFromJSONTyped,
8422
8483
  OkResponseBodyToJSONRecursive,
@@ -8738,6 +8799,11 @@ declare namespace openApiClient {
8738
8799
  StringMapByOrderModelToJSONRecursive,
8739
8800
  StringMapByOrderModelToJSON,
8740
8801
  StringMapByOrderModel,
8802
+ SummarizedTradeFromJSON,
8803
+ SummarizedTradeFromJSONTyped,
8804
+ SummarizedTradeToJSONRecursive,
8805
+ SummarizedTradeToJSON,
8806
+ SummarizedTrade,
8741
8807
  SyncErrorFromJSON,
8742
8808
  SyncErrorFromJSONTyped,
8743
8809
  SyncErrorToJSONRecursive,
@@ -8753,6 +8819,11 @@ declare namespace openApiClient {
8753
8819
  TakeProfitStopLossDetailToJSONRecursive,
8754
8820
  TakeProfitStopLossDetailToJSON,
8755
8821
  TakeProfitStopLossDetail,
8822
+ TokenResponseFromJSON,
8823
+ TokenResponseFromJSONTyped,
8824
+ TokenResponseToJSONRecursive,
8825
+ TokenResponseToJSON,
8826
+ TokenResponse,
8756
8827
  TradeDraftFromJSON,
8757
8828
  TradeDraftFromJSONTyped,
8758
8829
  TradeDraftToJSONRecursive,
@@ -8773,11 +8844,31 @@ declare namespace openApiClient {
8773
8844
  TradeDraftUpdateParamsToJSONRecursive,
8774
8845
  TradeDraftUpdateParamsToJSON,
8775
8846
  TradeDraftUpdateParams,
8776
- TradeDraftUpdateParamsOrderIdFromJSON,
8777
- TradeDraftUpdateParamsOrderIdFromJSONTyped,
8778
- TradeDraftUpdateParamsOrderIdToJSONRecursive,
8779
- TradeDraftUpdateParamsOrderIdToJSON,
8780
- TradeDraftUpdateParamsOrderId,
8847
+ TradeStatisticsFromJSON,
8848
+ TradeStatisticsFromJSONTyped,
8849
+ TradeStatisticsToJSONRecursive,
8850
+ TradeStatisticsToJSON,
8851
+ TradeStatistics,
8852
+ TradeStatisticsDateRangeFromJSON,
8853
+ TradeStatisticsDateRangeFromJSONTyped,
8854
+ TradeStatisticsDateRangeToJSONRecursive,
8855
+ TradeStatisticsDateRangeToJSON,
8856
+ TradeStatisticsDateRange,
8857
+ TradeStatisticsHoldingPeriodInDaysFromJSON,
8858
+ TradeStatisticsHoldingPeriodInDaysFromJSONTyped,
8859
+ TradeStatisticsHoldingPeriodInDaysToJSONRecursive,
8860
+ TradeStatisticsHoldingPeriodInDaysToJSON,
8861
+ TradeStatisticsHoldingPeriodInDays,
8862
+ TradeStatisticsItemFromJSON,
8863
+ TradeStatisticsItemFromJSONTyped,
8864
+ TradeStatisticsItemToJSONRecursive,
8865
+ TradeStatisticsItemToJSON,
8866
+ TradeStatisticsItem,
8867
+ TradeWarningFromJSON,
8868
+ TradeWarningFromJSONTyped,
8869
+ TradeWarningToJSONRecursive,
8870
+ TradeWarningToJSON,
8871
+ TradeWarning,
8781
8872
  TrailingDistanceFromJSON,
8782
8873
  TrailingDistanceFromJSONTyped,
8783
8874
  TrailingDistanceToJSONRecursive,
@@ -12437,6 +12528,76 @@ export declare type Subscription = {
12437
12528
  unsubscribe: () => void;
12438
12529
  };
12439
12530
 
12531
+ /**
12532
+ *
12533
+ * @export
12534
+ * @interface SummarizedTrade
12535
+ */
12536
+ declare interface SummarizedTrade {
12537
+ /**
12538
+ *
12539
+ * @type {Date}
12540
+ * @memberof SummarizedTrade
12541
+ */
12542
+ closeDateTime: Date;
12543
+ /**
12544
+ *
12545
+ * @type {string}
12546
+ * @memberof SummarizedTrade
12547
+ */
12548
+ details: string;
12549
+ /**
12550
+ *
12551
+ * @type {Amount}
12552
+ * @memberof SummarizedTrade
12553
+ */
12554
+ fees?: Amount;
12555
+ /**
12556
+ *
12557
+ * @type {string}
12558
+ * @memberof SummarizedTrade
12559
+ */
12560
+ id: string;
12561
+ /**
12562
+ *
12563
+ * @type {Date}
12564
+ * @memberof SummarizedTrade
12565
+ */
12566
+ openDateTime: Date;
12567
+ /**
12568
+ *
12569
+ * @type {Amount}
12570
+ * @memberof SummarizedTrade
12571
+ */
12572
+ profitLossAbs: Amount;
12573
+ /**
12574
+ *
12575
+ * @type {number}
12576
+ * @memberof SummarizedTrade
12577
+ */
12578
+ profitLossRel: number;
12579
+ /**
12580
+ *
12581
+ * @type {Security}
12582
+ * @memberof SummarizedTrade
12583
+ */
12584
+ security: Security;
12585
+ /**
12586
+ *
12587
+ * @type {Amount}
12588
+ * @memberof SummarizedTrade
12589
+ */
12590
+ size: Amount;
12591
+ }
12592
+
12593
+ declare function SummarizedTradeFromJSON(json: any): SummarizedTrade;
12594
+
12595
+ declare function SummarizedTradeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SummarizedTrade;
12596
+
12597
+ declare function SummarizedTradeToJSON(value?: SummarizedTrade | null): any;
12598
+
12599
+ declare function SummarizedTradeToJSONRecursive(value?: SummarizedTrade | null, ignoreParent?: boolean): any;
12600
+
12440
12601
  /**
12441
12602
  * brokerize
12442
12603
  * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
@@ -12551,6 +12712,62 @@ declare class TextApiResponse {
12551
12712
  */
12552
12713
  export declare type TokenRefreshCallback = (cfg: AuthContextConfiguration) => void;
12553
12714
 
12715
+ /**
12716
+ * brokerize
12717
+ * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
12718
+ *
12719
+ *
12720
+ *
12721
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12722
+ * https://openapi-generator.tech
12723
+ * Do not edit the class manually.
12724
+ */
12725
+ /**
12726
+ *
12727
+ * @export
12728
+ * @interface TokenResponse
12729
+ */
12730
+ declare interface TokenResponse {
12731
+ /**
12732
+ *
12733
+ * @type {string}
12734
+ * @memberof TokenResponse
12735
+ */
12736
+ accessToken: string;
12737
+ /**
12738
+ *
12739
+ * @type {number}
12740
+ * @memberof TokenResponse
12741
+ */
12742
+ expiresIn: number;
12743
+ /**
12744
+ *
12745
+ * @type {string}
12746
+ * @memberof TokenResponse
12747
+ */
12748
+ refreshToken: string;
12749
+ /**
12750
+ *
12751
+ * @type {number}
12752
+ * @memberof TokenResponse
12753
+ */
12754
+ refreshTokenExpiresIn: number;
12755
+ /**
12756
+ * token_type, it should always be "bearer"
12757
+ * @type {string}
12758
+ * @memberof TokenResponse
12759
+ */
12760
+ tokenType: string;
12761
+ }
12762
+
12763
+ declare function TokenResponseFromJSON(json: any): TokenResponse;
12764
+
12765
+ declare function TokenResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenResponse;
12766
+
12767
+ declare function TokenResponseToJSON(value?: TokenResponse | null): any;
12768
+
12769
+ declare function TokenResponseToJSONRecursive(value?: TokenResponse | null, ignoreParent?: boolean): any;
12770
+
12554
12771
  export declare type TokenSet = {
12555
12772
  idToken: string;
12556
12773
  refreshToken: string;
@@ -12861,6 +13078,16 @@ declare function TradeDraftToJSON(value?: TradeDraft | null): any;
12861
13078
 
12862
13079
  declare function TradeDraftToJSONRecursive(value?: TradeDraft | null, ignoreParent?: boolean): any;
12863
13080
 
13081
+ /**
13082
+ * brokerize
13083
+ * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
13084
+ *
13085
+ *
13086
+ *
13087
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13088
+ * https://openapi-generator.tech
13089
+ * Do not edit the class manually.
13090
+ */
12864
13091
  /**
12865
13092
  *
12866
13093
  * @export
@@ -12881,16 +13108,71 @@ declare interface TradeDraftUpdateParams {
12881
13108
  inactive?: boolean;
12882
13109
  /**
12883
13110
  *
12884
- * @type {TradeDraftUpdateParamsOrderId}
13111
+ * @type {string}
12885
13112
  * @memberof TradeDraftUpdateParams
12886
13113
  */
12887
- orderId?: TradeDraftUpdateParamsOrderId;
13114
+ orderId?: string;
12888
13115
  }
12889
13116
 
12890
13117
  declare function TradeDraftUpdateParamsFromJSON(json: any): TradeDraftUpdateParams;
12891
13118
 
12892
13119
  declare function TradeDraftUpdateParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeDraftUpdateParams;
12893
13120
 
13121
+ declare function TradeDraftUpdateParamsToJSON(value?: TradeDraftUpdateParams | null): any;
13122
+
13123
+ declare function TradeDraftUpdateParamsToJSONRecursive(value?: TradeDraftUpdateParams | null, ignoreParent?: boolean): any;
13124
+
13125
+ /**
13126
+ *
13127
+ * @export
13128
+ * @interface TradeStatistics
13129
+ */
13130
+ declare interface TradeStatistics {
13131
+ /**
13132
+ * Which fraction of the trades where winners. 1 is 100%, so a value of 1 would indicate
13133
+ * "all trades were winners".
13134
+ * @type {number}
13135
+ * @memberof TradeStatistics
13136
+ */
13137
+ hitRate: number;
13138
+ /**
13139
+ *
13140
+ * @type {TradeStatisticsHoldingPeriodInDays}
13141
+ * @memberof TradeStatistics
13142
+ */
13143
+ holdingPeriodInDays: TradeStatisticsHoldingPeriodInDays;
13144
+ /**
13145
+ * The maximum number of consecutive losing trades in the given list of trades.
13146
+ * @type {number}
13147
+ * @memberof TradeStatistics
13148
+ */
13149
+ longestLosingStreak: number;
13150
+ /**
13151
+ * The maximum number of consecutive winning trades in the given list of trades.
13152
+ * @type {number}
13153
+ * @memberof TradeStatistics
13154
+ */
13155
+ longestWinningStreak: number;
13156
+ /**
13157
+ * How many trades had a negative profit/loss.
13158
+ * @type {number}
13159
+ * @memberof TradeStatistics
13160
+ */
13161
+ loserCount: number;
13162
+ /**
13163
+ * How many trades are part of the calculation.
13164
+ * @type {number}
13165
+ * @memberof TradeStatistics
13166
+ */
13167
+ tradeCount: number;
13168
+ /**
13169
+ * How many trades had a positive profit/loss.
13170
+ * @type {number}
13171
+ * @memberof TradeStatistics
13172
+ */
13173
+ winnerCount: number;
13174
+ }
13175
+
12894
13176
  /**
12895
13177
  * brokerize
12896
13178
  * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
@@ -12904,22 +13186,148 @@ declare function TradeDraftUpdateParamsFromJSONTyped(json: any, ignoreDiscrimina
12904
13186
  /**
12905
13187
  *
12906
13188
  * @export
12907
- * @interface TradeDraftUpdateParamsOrderId
13189
+ * @interface TradeStatisticsDateRange
12908
13190
  */
12909
- declare interface TradeDraftUpdateParamsOrderId {
13191
+ declare interface TradeStatisticsDateRange {
13192
+ /**
13193
+ *
13194
+ * @type {string}
13195
+ * @memberof TradeStatisticsDateRange
13196
+ */
13197
+ dateString: string;
13198
+ /**
13199
+ *
13200
+ * @type {Date}
13201
+ * @memberof TradeStatisticsDateRange
13202
+ */
13203
+ from: Date;
13204
+ /**
13205
+ *
13206
+ * @type {Date}
13207
+ * @memberof TradeStatisticsDateRange
13208
+ */
13209
+ to: Date;
12910
13210
  }
12911
13211
 
12912
- declare function TradeDraftUpdateParamsOrderIdFromJSON(json: any): TradeDraftUpdateParamsOrderId;
13212
+ declare function TradeStatisticsDateRangeFromJSON(json: any): TradeStatisticsDateRange;
12913
13213
 
12914
- declare function TradeDraftUpdateParamsOrderIdFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeDraftUpdateParamsOrderId;
13214
+ declare function TradeStatisticsDateRangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeStatisticsDateRange;
12915
13215
 
12916
- declare function TradeDraftUpdateParamsOrderIdToJSON(value?: TradeDraftUpdateParamsOrderId | null): any;
13216
+ declare function TradeStatisticsDateRangeToJSON(value?: TradeStatisticsDateRange | null): any;
12917
13217
 
12918
- declare function TradeDraftUpdateParamsOrderIdToJSONRecursive(value?: TradeDraftUpdateParamsOrderId | null, ignoreParent?: boolean): any;
13218
+ declare function TradeStatisticsDateRangeToJSONRecursive(value?: TradeStatisticsDateRange | null, ignoreParent?: boolean): any;
12919
13219
 
12920
- declare function TradeDraftUpdateParamsToJSON(value?: TradeDraftUpdateParams | null): any;
13220
+ declare function TradeStatisticsFromJSON(json: any): TradeStatistics;
12921
13221
 
12922
- declare function TradeDraftUpdateParamsToJSONRecursive(value?: TradeDraftUpdateParams | null, ignoreParent?: boolean): any;
13222
+ declare function TradeStatisticsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeStatistics;
13223
+
13224
+ /**
13225
+ * brokerize
13226
+ * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
13227
+ *
13228
+ *
13229
+ *
13230
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13231
+ * https://openapi-generator.tech
13232
+ * Do not edit the class manually.
13233
+ */
13234
+ /**
13235
+ *
13236
+ * @export
13237
+ * @interface TradeStatisticsHoldingPeriodInDays
13238
+ */
13239
+ declare interface TradeStatisticsHoldingPeriodInDays {
13240
+ /**
13241
+ * The average holding period in days.
13242
+ * @type {number}
13243
+ * @memberof TradeStatisticsHoldingPeriodInDays
13244
+ */
13245
+ average: number;
13246
+ /**
13247
+ * The maximum holding period in days.
13248
+ * @type {number}
13249
+ * @memberof TradeStatisticsHoldingPeriodInDays
13250
+ */
13251
+ max: number;
13252
+ /**
13253
+ * The minimum holding period in days.
13254
+ * @type {number}
13255
+ * @memberof TradeStatisticsHoldingPeriodInDays
13256
+ */
13257
+ min: number;
13258
+ }
13259
+
13260
+ declare function TradeStatisticsHoldingPeriodInDaysFromJSON(json: any): TradeStatisticsHoldingPeriodInDays;
13261
+
13262
+ declare function TradeStatisticsHoldingPeriodInDaysFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeStatisticsHoldingPeriodInDays;
13263
+
13264
+ declare function TradeStatisticsHoldingPeriodInDaysToJSON(value?: TradeStatisticsHoldingPeriodInDays | null): any;
13265
+
13266
+ declare function TradeStatisticsHoldingPeriodInDaysToJSONRecursive(value?: TradeStatisticsHoldingPeriodInDays | null, ignoreParent?: boolean): any;
13267
+
13268
+ /**
13269
+ *
13270
+ * @export
13271
+ * @interface TradeStatisticsItem
13272
+ */
13273
+ declare interface TradeStatisticsItem {
13274
+ /**
13275
+ *
13276
+ * @type {TradeStatisticsDateRange}
13277
+ * @memberof TradeStatisticsItem
13278
+ */
13279
+ dateRange: TradeStatisticsDateRange;
13280
+ /**
13281
+ *
13282
+ * @type {TradeStatistics}
13283
+ * @memberof TradeStatisticsItem
13284
+ */
13285
+ stats: TradeStatistics;
13286
+ }
13287
+
13288
+ declare function TradeStatisticsItemFromJSON(json: any): TradeStatisticsItem;
13289
+
13290
+ declare function TradeStatisticsItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeStatisticsItem;
13291
+
13292
+ declare function TradeStatisticsItemToJSON(value?: TradeStatisticsItem | null): any;
13293
+
13294
+ declare function TradeStatisticsItemToJSONRecursive(value?: TradeStatisticsItem | null, ignoreParent?: boolean): any;
13295
+
13296
+ declare function TradeStatisticsToJSON(value?: TradeStatistics | null): any;
13297
+
13298
+ declare function TradeStatisticsToJSONRecursive(value?: TradeStatistics | null, ignoreParent?: boolean): any;
13299
+
13300
+ /**
13301
+ * brokerize
13302
+ * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
13303
+ *
13304
+ *
13305
+ *
13306
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13307
+ * https://openapi-generator.tech
13308
+ * Do not edit the class manually.
13309
+ */
13310
+ /**
13311
+ *
13312
+ * @export
13313
+ * @interface TradeWarning
13314
+ */
13315
+ declare interface TradeWarning {
13316
+ /**
13317
+ *
13318
+ * @type {string}
13319
+ * @memberof TradeWarning
13320
+ */
13321
+ message: string;
13322
+ }
13323
+
13324
+ declare function TradeWarningFromJSON(json: any): TradeWarning;
13325
+
13326
+ declare function TradeWarningFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeWarning;
13327
+
13328
+ declare function TradeWarningToJSON(value?: TradeWarning | null): any;
13329
+
13330
+ declare function TradeWarningToJSONRecursive(value?: TradeWarning | null, ignoreParent?: boolean): any;
12923
13331
 
12924
13332
  /**
12925
13333
  * brokerize