@brokerize/client 1.1.2 → 1.1.4

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 (33) 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 +530 -79
  5. package/dist/modelExports.d.ts +6 -0
  6. package/dist/swagger/apis/DefaultApi.d.ts +38 -3
  7. package/dist/swagger/apis/DefaultApi.js +124 -2
  8. package/dist/swagger/models/GetPortfolioTradeStatisticsResponse.d.ts +28 -0
  9. package/dist/swagger/models/GetPortfolioTradeStatisticsResponse.js +38 -0
  10. package/dist/swagger/models/GetPortfolioTradesResponse.d.ts +34 -0
  11. package/dist/swagger/models/GetPortfolioTradesResponse.js +40 -0
  12. package/dist/swagger/models/SummarizedTrade.d.ts +89 -0
  13. package/dist/swagger/models/SummarizedTrade.js +60 -0
  14. package/dist/swagger/models/TokenResponse.d.ts +51 -0
  15. package/dist/swagger/models/{ObtainToken200Response.js → TokenResponse.js} +6 -6
  16. package/dist/swagger/models/TradeDraftUpdateParams.d.ts +2 -3
  17. package/dist/swagger/models/TradeDraftUpdateParams.js +2 -5
  18. package/dist/swagger/models/TradeStatistics.d.ts +110 -0
  19. package/dist/swagger/models/TradeStatistics.js +81 -0
  20. package/dist/swagger/models/TradeStatisticsDateRange.d.ts +39 -0
  21. package/dist/swagger/models/TradeStatisticsDateRange.js +41 -0
  22. package/dist/swagger/models/TradeStatisticsHoldingPeriodInDays.d.ts +39 -0
  23. package/dist/swagger/models/TradeStatisticsHoldingPeriodInDays.js +41 -0
  24. package/dist/swagger/models/TradeStatisticsItem.d.ts +35 -0
  25. package/dist/swagger/models/TradeStatisticsItem.js +41 -0
  26. package/dist/swagger/models/TradeWarning.d.ts +27 -0
  27. package/dist/swagger/models/TradeWarning.js +37 -0
  28. package/dist/swagger/models/index.d.ts +9 -2
  29. package/dist/swagger/models/index.js +9 -2
  30. package/package.json +1 -1
  31. package/dist/swagger/models/ObtainToken200Response.d.ts +0 -51
  32. package/dist/swagger/models/TradeDraftUpdateParamsOrderId.d.ts +0 -21
  33. 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>;
@@ -3696,6 +3699,28 @@ declare class DefaultApi extends runtime.BaseAPI {
3696
3699
  /**
3697
3700
  */
3698
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>;
3699
3724
  /**
3700
3725
  */
3701
3726
  getPortfoliosRaw(initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<PortfoliosResponse>>;
@@ -3729,11 +3754,11 @@ declare class DefaultApi extends runtime.BaseAPI {
3729
3754
  /**
3730
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.
3731
3756
  */
3732
- obtainTokenRaw(requestParameters: ObtainTokenRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<ObtainToken200Response>>;
3757
+ obtainTokenRaw(requestParameters: ObtainTokenRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<TokenResponse>>;
3733
3758
  /**
3734
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.
3735
3760
  */
3736
- obtainToken(requestParameters: ObtainTokenRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<ObtainToken200Response>;
3761
+ obtainToken(requestParameters: ObtainTokenRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<TokenResponse>;
3737
3762
  /**
3738
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.
3739
3764
  */
@@ -6451,6 +6476,72 @@ declare function GetPortfolioQuotesResponseToJSON(value?: GetPortfolioQuotesResp
6451
6476
 
6452
6477
  declare function GetPortfolioQuotesResponseToJSONRecursive(value?: GetPortfolioQuotesResponse | null, ignoreParent?: boolean): any;
6453
6478
 
6479
+ declare interface GetPortfolioTradesRequest {
6480
+ portfolioId: string;
6481
+ search?: string;
6482
+ take?: number;
6483
+ skip?: number;
6484
+ }
6485
+
6486
+ /**
6487
+ *
6488
+ * @export
6489
+ * @interface GetPortfolioTradesResponse
6490
+ */
6491
+ declare interface GetPortfolioTradesResponse {
6492
+ /**
6493
+ *
6494
+ * @type {number}
6495
+ * @memberof GetPortfolioTradesResponse
6496
+ */
6497
+ totalCount: number;
6498
+ /**
6499
+ *
6500
+ * @type {Array<SummarizedTrade>}
6501
+ * @memberof GetPortfolioTradesResponse
6502
+ */
6503
+ trades: Array<SummarizedTrade>;
6504
+ }
6505
+
6506
+ declare function GetPortfolioTradesResponseFromJSON(json: any): GetPortfolioTradesResponse;
6507
+
6508
+ declare function GetPortfolioTradesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortfolioTradesResponse;
6509
+
6510
+ declare function GetPortfolioTradesResponseToJSON(value?: GetPortfolioTradesResponse | null): any;
6511
+
6512
+ declare function GetPortfolioTradesResponseToJSONRecursive(value?: GetPortfolioTradesResponse | null, ignoreParent?: boolean): any;
6513
+
6514
+ declare interface GetPortfolioTradeStatisticsRequest {
6515
+ portfolioId: string;
6516
+ dateRanges: string;
6517
+ }
6518
+
6519
+ /**
6520
+ *
6521
+ * @export
6522
+ * @interface GetPortfolioTradeStatisticsResponse
6523
+ */
6524
+ declare interface GetPortfolioTradeStatisticsResponse {
6525
+ /**
6526
+ *
6527
+ * @type {Array<TradeStatisticsItem>}
6528
+ * @memberof GetPortfolioTradeStatisticsResponse
6529
+ */
6530
+ data: Array<TradeStatisticsItem>;
6531
+ }
6532
+
6533
+ declare function GetPortfolioTradeStatisticsResponseFromJSON(json: any): GetPortfolioTradeStatisticsResponse;
6534
+
6535
+ declare function GetPortfolioTradeStatisticsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortfolioTradeStatisticsResponse;
6536
+
6537
+ declare function GetPortfolioTradeStatisticsResponseToJSON(value?: GetPortfolioTradeStatisticsResponse | null): any;
6538
+
6539
+ declare function GetPortfolioTradeStatisticsResponseToJSONRecursive(value?: GetPortfolioTradeStatisticsResponse | null, ignoreParent?: boolean): any;
6540
+
6541
+ declare interface GetPortfolioTradeWarningsRequest {
6542
+ portfolioId: string;
6543
+ }
6544
+
6454
6545
  /**
6455
6546
  *
6456
6547
  * @export
@@ -7385,7 +7476,13 @@ declare namespace Models {
7385
7476
  SecurityQuotes,
7386
7477
  SecurityQuote,
7387
7478
  OrderIntent,
7388
- OrderIntentAvailability
7479
+ OrderIntentAvailability,
7480
+ SummarizedTrade,
7481
+ TradeWarning,
7482
+ GetPortfolioTradesResponse,
7483
+ GetPortfolioTradeStatisticsResponse,
7484
+ TradeStatisticsItem,
7485
+ TradeStatistics
7389
7486
  }
7390
7487
  }
7391
7488
  export { Models }
@@ -7468,62 +7565,6 @@ declare function OAuthLoginFormConfigToJSON(value?: OAuthLoginFormConfig | null)
7468
7565
 
7469
7566
  declare function OAuthLoginFormConfigToJSONRecursive(value?: OAuthLoginFormConfig | null, ignoreParent?: boolean): any;
7470
7567
 
7471
- /**
7472
- * brokerize
7473
- * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
7474
- *
7475
- *
7476
- *
7477
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7478
- * https://openapi-generator.tech
7479
- * Do not edit the class manually.
7480
- */
7481
- /**
7482
- *
7483
- * @export
7484
- * @interface ObtainToken200Response
7485
- */
7486
- declare interface ObtainToken200Response {
7487
- /**
7488
- *
7489
- * @type {string}
7490
- * @memberof ObtainToken200Response
7491
- */
7492
- accessToken: string;
7493
- /**
7494
- *
7495
- * @type {number}
7496
- * @memberof ObtainToken200Response
7497
- */
7498
- expiresIn: number;
7499
- /**
7500
- *
7501
- * @type {string}
7502
- * @memberof ObtainToken200Response
7503
- */
7504
- refreshToken: string;
7505
- /**
7506
- *
7507
- * @type {number}
7508
- * @memberof ObtainToken200Response
7509
- */
7510
- refreshTokenExpiresIn: number;
7511
- /**
7512
- *
7513
- * @type {string}
7514
- * @memberof ObtainToken200Response
7515
- */
7516
- tokenType: string;
7517
- }
7518
-
7519
- declare function ObtainToken200ResponseFromJSON(json: any): ObtainToken200Response;
7520
-
7521
- declare function ObtainToken200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObtainToken200Response;
7522
-
7523
- declare function ObtainToken200ResponseToJSON(value?: ObtainToken200Response | null): any;
7524
-
7525
- declare function ObtainToken200ResponseToJSONRecursive(value?: ObtainToken200Response | null, ignoreParent?: boolean): any;
7526
-
7527
7568
  declare interface ObtainTokenRequest {
7528
7569
  grantType: string;
7529
7570
  refreshToken: string;
@@ -7628,6 +7669,9 @@ declare namespace openApiClient {
7628
7669
  GetPortfolioOrdersRequest,
7629
7670
  GetPortfolioPositionsRequest,
7630
7671
  GetPortfolioQuotesRequest,
7672
+ GetPortfolioTradeStatisticsRequest,
7673
+ GetPortfolioTradeWarningsRequest,
7674
+ GetPortfolioTradesRequest,
7631
7675
  LogoutSessionRequest,
7632
7676
  ObtainTokenRequest,
7633
7677
  RenamePortfolioOperationRequest,
@@ -8337,6 +8381,16 @@ declare namespace openApiClient {
8337
8381
  GetPortfolioQuotesResponseToJSONRecursive,
8338
8382
  GetPortfolioQuotesResponseToJSON,
8339
8383
  GetPortfolioQuotesResponse,
8384
+ GetPortfolioTradeStatisticsResponseFromJSON,
8385
+ GetPortfolioTradeStatisticsResponseFromJSONTyped,
8386
+ GetPortfolioTradeStatisticsResponseToJSONRecursive,
8387
+ GetPortfolioTradeStatisticsResponseToJSON,
8388
+ GetPortfolioTradeStatisticsResponse,
8389
+ GetPortfolioTradesResponseFromJSON,
8390
+ GetPortfolioTradesResponseFromJSONTyped,
8391
+ GetPortfolioTradesResponseToJSONRecursive,
8392
+ GetPortfolioTradesResponseToJSON,
8393
+ GetPortfolioTradesResponse,
8340
8394
  GetQuoteParamsFromJSON,
8341
8395
  GetQuoteParamsFromJSONTyped,
8342
8396
  GetQuoteParamsToJSONRecursive,
@@ -8425,11 +8479,6 @@ declare namespace openApiClient {
8425
8479
  OAuthLoginFormConfig,
8426
8480
  OAuthLoginFormConfigRedirectStyleEnum,
8427
8481
  OAuthLoginFormConfigRedirectStyleBitpandaEnum,
8428
- ObtainToken200ResponseFromJSON,
8429
- ObtainToken200ResponseFromJSONTyped,
8430
- ObtainToken200ResponseToJSONRecursive,
8431
- ObtainToken200ResponseToJSON,
8432
- ObtainToken200Response,
8433
8482
  OkResponseBodyFromJSON,
8434
8483
  OkResponseBodyFromJSONTyped,
8435
8484
  OkResponseBodyToJSONRecursive,
@@ -8751,6 +8800,11 @@ declare namespace openApiClient {
8751
8800
  StringMapByOrderModelToJSONRecursive,
8752
8801
  StringMapByOrderModelToJSON,
8753
8802
  StringMapByOrderModel,
8803
+ SummarizedTradeFromJSON,
8804
+ SummarizedTradeFromJSONTyped,
8805
+ SummarizedTradeToJSONRecursive,
8806
+ SummarizedTradeToJSON,
8807
+ SummarizedTrade,
8754
8808
  SyncErrorFromJSON,
8755
8809
  SyncErrorFromJSONTyped,
8756
8810
  SyncErrorToJSONRecursive,
@@ -8766,6 +8820,11 @@ declare namespace openApiClient {
8766
8820
  TakeProfitStopLossDetailToJSONRecursive,
8767
8821
  TakeProfitStopLossDetailToJSON,
8768
8822
  TakeProfitStopLossDetail,
8823
+ TokenResponseFromJSON,
8824
+ TokenResponseFromJSONTyped,
8825
+ TokenResponseToJSONRecursive,
8826
+ TokenResponseToJSON,
8827
+ TokenResponse,
8769
8828
  TradeDraftFromJSON,
8770
8829
  TradeDraftFromJSONTyped,
8771
8830
  TradeDraftToJSONRecursive,
@@ -8786,11 +8845,31 @@ declare namespace openApiClient {
8786
8845
  TradeDraftUpdateParamsToJSONRecursive,
8787
8846
  TradeDraftUpdateParamsToJSON,
8788
8847
  TradeDraftUpdateParams,
8789
- TradeDraftUpdateParamsOrderIdFromJSON,
8790
- TradeDraftUpdateParamsOrderIdFromJSONTyped,
8791
- TradeDraftUpdateParamsOrderIdToJSONRecursive,
8792
- TradeDraftUpdateParamsOrderIdToJSON,
8793
- TradeDraftUpdateParamsOrderId,
8848
+ TradeStatisticsFromJSON,
8849
+ TradeStatisticsFromJSONTyped,
8850
+ TradeStatisticsToJSONRecursive,
8851
+ TradeStatisticsToJSON,
8852
+ TradeStatistics,
8853
+ TradeStatisticsDateRangeFromJSON,
8854
+ TradeStatisticsDateRangeFromJSONTyped,
8855
+ TradeStatisticsDateRangeToJSONRecursive,
8856
+ TradeStatisticsDateRangeToJSON,
8857
+ TradeStatisticsDateRange,
8858
+ TradeStatisticsHoldingPeriodInDaysFromJSON,
8859
+ TradeStatisticsHoldingPeriodInDaysFromJSONTyped,
8860
+ TradeStatisticsHoldingPeriodInDaysToJSONRecursive,
8861
+ TradeStatisticsHoldingPeriodInDaysToJSON,
8862
+ TradeStatisticsHoldingPeriodInDays,
8863
+ TradeStatisticsItemFromJSON,
8864
+ TradeStatisticsItemFromJSONTyped,
8865
+ TradeStatisticsItemToJSONRecursive,
8866
+ TradeStatisticsItemToJSON,
8867
+ TradeStatisticsItem,
8868
+ TradeWarningFromJSON,
8869
+ TradeWarningFromJSONTyped,
8870
+ TradeWarningToJSONRecursive,
8871
+ TradeWarningToJSON,
8872
+ TradeWarning,
8794
8873
  TrailingDistanceFromJSON,
8795
8874
  TrailingDistanceFromJSONTyped,
8796
8875
  TrailingDistanceToJSONRecursive,
@@ -12450,6 +12529,88 @@ export declare type Subscription = {
12450
12529
  unsubscribe: () => void;
12451
12530
  };
12452
12531
 
12532
+ /**
12533
+ *
12534
+ * @export
12535
+ * @interface SummarizedTrade
12536
+ */
12537
+ declare interface SummarizedTrade {
12538
+ /**
12539
+ *
12540
+ * @type {Amount}
12541
+ * @memberof SummarizedTrade
12542
+ */
12543
+ closeAvgQuotation: Amount;
12544
+ /**
12545
+ *
12546
+ * @type {Date}
12547
+ * @memberof SummarizedTrade
12548
+ */
12549
+ closeDateTime: Date;
12550
+ /**
12551
+ *
12552
+ * @type {string}
12553
+ * @memberof SummarizedTrade
12554
+ */
12555
+ details: string;
12556
+ /**
12557
+ *
12558
+ * @type {Amount}
12559
+ * @memberof SummarizedTrade
12560
+ */
12561
+ fees?: Amount;
12562
+ /**
12563
+ *
12564
+ * @type {string}
12565
+ * @memberof SummarizedTrade
12566
+ */
12567
+ id: string;
12568
+ /**
12569
+ *
12570
+ * @type {Amount}
12571
+ * @memberof SummarizedTrade
12572
+ */
12573
+ openAvgQuotation: Amount;
12574
+ /**
12575
+ *
12576
+ * @type {Date}
12577
+ * @memberof SummarizedTrade
12578
+ */
12579
+ openDateTime: Date;
12580
+ /**
12581
+ *
12582
+ * @type {Amount}
12583
+ * @memberof SummarizedTrade
12584
+ */
12585
+ profitLossAbs: Amount;
12586
+ /**
12587
+ *
12588
+ * @type {number}
12589
+ * @memberof SummarizedTrade
12590
+ */
12591
+ profitLossRel: number;
12592
+ /**
12593
+ *
12594
+ * @type {Security}
12595
+ * @memberof SummarizedTrade
12596
+ */
12597
+ security: Security;
12598
+ /**
12599
+ *
12600
+ * @type {Amount}
12601
+ * @memberof SummarizedTrade
12602
+ */
12603
+ size: Amount;
12604
+ }
12605
+
12606
+ declare function SummarizedTradeFromJSON(json: any): SummarizedTrade;
12607
+
12608
+ declare function SummarizedTradeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SummarizedTrade;
12609
+
12610
+ declare function SummarizedTradeToJSON(value?: SummarizedTrade | null): any;
12611
+
12612
+ declare function SummarizedTradeToJSONRecursive(value?: SummarizedTrade | null, ignoreParent?: boolean): any;
12613
+
12453
12614
  /**
12454
12615
  * brokerize
12455
12616
  * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
@@ -12564,6 +12725,62 @@ declare class TextApiResponse {
12564
12725
  */
12565
12726
  export declare type TokenRefreshCallback = (cfg: AuthContextConfiguration) => void;
12566
12727
 
12728
+ /**
12729
+ * brokerize
12730
+ * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
12731
+ *
12732
+ *
12733
+ *
12734
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12735
+ * https://openapi-generator.tech
12736
+ * Do not edit the class manually.
12737
+ */
12738
+ /**
12739
+ *
12740
+ * @export
12741
+ * @interface TokenResponse
12742
+ */
12743
+ declare interface TokenResponse {
12744
+ /**
12745
+ *
12746
+ * @type {string}
12747
+ * @memberof TokenResponse
12748
+ */
12749
+ accessToken: string;
12750
+ /**
12751
+ *
12752
+ * @type {number}
12753
+ * @memberof TokenResponse
12754
+ */
12755
+ expiresIn: number;
12756
+ /**
12757
+ *
12758
+ * @type {string}
12759
+ * @memberof TokenResponse
12760
+ */
12761
+ refreshToken: string;
12762
+ /**
12763
+ *
12764
+ * @type {number}
12765
+ * @memberof TokenResponse
12766
+ */
12767
+ refreshTokenExpiresIn: number;
12768
+ /**
12769
+ * token_type, it should always be "bearer"
12770
+ * @type {string}
12771
+ * @memberof TokenResponse
12772
+ */
12773
+ tokenType: string;
12774
+ }
12775
+
12776
+ declare function TokenResponseFromJSON(json: any): TokenResponse;
12777
+
12778
+ declare function TokenResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenResponse;
12779
+
12780
+ declare function TokenResponseToJSON(value?: TokenResponse | null): any;
12781
+
12782
+ declare function TokenResponseToJSONRecursive(value?: TokenResponse | null, ignoreParent?: boolean): any;
12783
+
12567
12784
  export declare type TokenSet = {
12568
12785
  idToken: string;
12569
12786
  refreshToken: string;
@@ -12874,6 +13091,16 @@ declare function TradeDraftToJSON(value?: TradeDraft | null): any;
12874
13091
 
12875
13092
  declare function TradeDraftToJSONRecursive(value?: TradeDraft | null, ignoreParent?: boolean): any;
12876
13093
 
13094
+ /**
13095
+ * brokerize
13096
+ * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
13097
+ *
13098
+ *
13099
+ *
13100
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13101
+ * https://openapi-generator.tech
13102
+ * Do not edit the class manually.
13103
+ */
12877
13104
  /**
12878
13105
  *
12879
13106
  * @export
@@ -12894,16 +13121,114 @@ declare interface TradeDraftUpdateParams {
12894
13121
  inactive?: boolean;
12895
13122
  /**
12896
13123
  *
12897
- * @type {TradeDraftUpdateParamsOrderId}
13124
+ * @type {string}
12898
13125
  * @memberof TradeDraftUpdateParams
12899
13126
  */
12900
- orderId?: TradeDraftUpdateParamsOrderId;
13127
+ orderId?: string;
12901
13128
  }
12902
13129
 
12903
13130
  declare function TradeDraftUpdateParamsFromJSON(json: any): TradeDraftUpdateParams;
12904
13131
 
12905
13132
  declare function TradeDraftUpdateParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeDraftUpdateParams;
12906
13133
 
13134
+ declare function TradeDraftUpdateParamsToJSON(value?: TradeDraftUpdateParams | null): any;
13135
+
13136
+ declare function TradeDraftUpdateParamsToJSONRecursive(value?: TradeDraftUpdateParams | null, ignoreParent?: boolean): any;
13137
+
13138
+ /**
13139
+ *
13140
+ * @export
13141
+ * @interface TradeStatistics
13142
+ */
13143
+ declare interface TradeStatistics {
13144
+ /**
13145
+ *
13146
+ * @type {Amount}
13147
+ * @memberof TradeStatistics
13148
+ */
13149
+ avgLossAbs?: Amount;
13150
+ /**
13151
+ *
13152
+ * @type {Amount}
13153
+ * @memberof TradeStatistics
13154
+ */
13155
+ avgProfitAbs?: Amount;
13156
+ /**
13157
+ *
13158
+ * @type {Amount}
13159
+ * @memberof TradeStatistics
13160
+ */
13161
+ avgProfitLossAbs?: Amount;
13162
+ /**
13163
+ *
13164
+ * @type {SummarizedTrade}
13165
+ * @memberof TradeStatistics
13166
+ */
13167
+ bestTrade?: SummarizedTrade;
13168
+ /**
13169
+ * Which fraction of the trades where winners. 1 is 100%, so a value of 1 would indicate
13170
+ * "all trades were winners".
13171
+ * @type {number}
13172
+ * @memberof TradeStatistics
13173
+ */
13174
+ hitRate: number;
13175
+ /**
13176
+ *
13177
+ * @type {TradeStatisticsHoldingPeriodInDays}
13178
+ * @memberof TradeStatistics
13179
+ */
13180
+ holdingPeriodInDays: TradeStatisticsHoldingPeriodInDays;
13181
+ /**
13182
+ * The maximum number of consecutive losing trades in the given list of trades.
13183
+ * @type {number}
13184
+ * @memberof TradeStatistics
13185
+ */
13186
+ longestLosingStreak: number;
13187
+ /**
13188
+ * The maximum number of consecutive winning trades in the given list of trades.
13189
+ * @type {number}
13190
+ * @memberof TradeStatistics
13191
+ */
13192
+ longestWinningStreak: number;
13193
+ /**
13194
+ * How many trades had a negative profit/loss.
13195
+ * @type {number}
13196
+ * @memberof TradeStatistics
13197
+ */
13198
+ loserCount: number;
13199
+ /**
13200
+ * Profits/Losses. E.g. if there were 2000€ profits in winning trades and 1000€ losses in losing trades,
13201
+ * the profitFactor would be 2000€ / 1000€ = 2.
13202
+ * @type {number}
13203
+ * @memberof TradeStatistics
13204
+ */
13205
+ profitFactor?: number;
13206
+ /**
13207
+ *
13208
+ * @type {Amount}
13209
+ * @memberof TradeStatistics
13210
+ */
13211
+ profitLossAbs?: Amount;
13212
+ /**
13213
+ * How many trades are part of the calculation.
13214
+ * @type {number}
13215
+ * @memberof TradeStatistics
13216
+ */
13217
+ tradeCount: number;
13218
+ /**
13219
+ * How many trades had a positive profit/loss.
13220
+ * @type {number}
13221
+ * @memberof TradeStatistics
13222
+ */
13223
+ winnerCount: number;
13224
+ /**
13225
+ *
13226
+ * @type {SummarizedTrade}
13227
+ * @memberof TradeStatistics
13228
+ */
13229
+ worstTrade?: SummarizedTrade;
13230
+ }
13231
+
12907
13232
  /**
12908
13233
  * brokerize
12909
13234
  * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
@@ -12917,22 +13242,148 @@ declare function TradeDraftUpdateParamsFromJSONTyped(json: any, ignoreDiscrimina
12917
13242
  /**
12918
13243
  *
12919
13244
  * @export
12920
- * @interface TradeDraftUpdateParamsOrderId
13245
+ * @interface TradeStatisticsDateRange
12921
13246
  */
12922
- declare interface TradeDraftUpdateParamsOrderId {
13247
+ declare interface TradeStatisticsDateRange {
13248
+ /**
13249
+ *
13250
+ * @type {string}
13251
+ * @memberof TradeStatisticsDateRange
13252
+ */
13253
+ dateString: string;
13254
+ /**
13255
+ *
13256
+ * @type {Date}
13257
+ * @memberof TradeStatisticsDateRange
13258
+ */
13259
+ from: Date;
13260
+ /**
13261
+ *
13262
+ * @type {Date}
13263
+ * @memberof TradeStatisticsDateRange
13264
+ */
13265
+ to: Date;
12923
13266
  }
12924
13267
 
12925
- declare function TradeDraftUpdateParamsOrderIdFromJSON(json: any): TradeDraftUpdateParamsOrderId;
13268
+ declare function TradeStatisticsDateRangeFromJSON(json: any): TradeStatisticsDateRange;
12926
13269
 
12927
- declare function TradeDraftUpdateParamsOrderIdFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeDraftUpdateParamsOrderId;
13270
+ declare function TradeStatisticsDateRangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeStatisticsDateRange;
12928
13271
 
12929
- declare function TradeDraftUpdateParamsOrderIdToJSON(value?: TradeDraftUpdateParamsOrderId | null): any;
13272
+ declare function TradeStatisticsDateRangeToJSON(value?: TradeStatisticsDateRange | null): any;
12930
13273
 
12931
- declare function TradeDraftUpdateParamsOrderIdToJSONRecursive(value?: TradeDraftUpdateParamsOrderId | null, ignoreParent?: boolean): any;
13274
+ declare function TradeStatisticsDateRangeToJSONRecursive(value?: TradeStatisticsDateRange | null, ignoreParent?: boolean): any;
12932
13275
 
12933
- declare function TradeDraftUpdateParamsToJSON(value?: TradeDraftUpdateParams | null): any;
13276
+ declare function TradeStatisticsFromJSON(json: any): TradeStatistics;
12934
13277
 
12935
- declare function TradeDraftUpdateParamsToJSONRecursive(value?: TradeDraftUpdateParams | null, ignoreParent?: boolean): any;
13278
+ declare function TradeStatisticsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeStatistics;
13279
+
13280
+ /**
13281
+ * brokerize
13282
+ * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
13283
+ *
13284
+ *
13285
+ *
13286
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13287
+ * https://openapi-generator.tech
13288
+ * Do not edit the class manually.
13289
+ */
13290
+ /**
13291
+ *
13292
+ * @export
13293
+ * @interface TradeStatisticsHoldingPeriodInDays
13294
+ */
13295
+ declare interface TradeStatisticsHoldingPeriodInDays {
13296
+ /**
13297
+ * The average holding period in days.
13298
+ * @type {number}
13299
+ * @memberof TradeStatisticsHoldingPeriodInDays
13300
+ */
13301
+ average: number;
13302
+ /**
13303
+ * The maximum holding period in days.
13304
+ * @type {number}
13305
+ * @memberof TradeStatisticsHoldingPeriodInDays
13306
+ */
13307
+ max: number;
13308
+ /**
13309
+ * The minimum holding period in days.
13310
+ * @type {number}
13311
+ * @memberof TradeStatisticsHoldingPeriodInDays
13312
+ */
13313
+ min: number;
13314
+ }
13315
+
13316
+ declare function TradeStatisticsHoldingPeriodInDaysFromJSON(json: any): TradeStatisticsHoldingPeriodInDays;
13317
+
13318
+ declare function TradeStatisticsHoldingPeriodInDaysFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeStatisticsHoldingPeriodInDays;
13319
+
13320
+ declare function TradeStatisticsHoldingPeriodInDaysToJSON(value?: TradeStatisticsHoldingPeriodInDays | null): any;
13321
+
13322
+ declare function TradeStatisticsHoldingPeriodInDaysToJSONRecursive(value?: TradeStatisticsHoldingPeriodInDays | null, ignoreParent?: boolean): any;
13323
+
13324
+ /**
13325
+ *
13326
+ * @export
13327
+ * @interface TradeStatisticsItem
13328
+ */
13329
+ declare interface TradeStatisticsItem {
13330
+ /**
13331
+ *
13332
+ * @type {TradeStatisticsDateRange}
13333
+ * @memberof TradeStatisticsItem
13334
+ */
13335
+ dateRange: TradeStatisticsDateRange;
13336
+ /**
13337
+ *
13338
+ * @type {TradeStatistics}
13339
+ * @memberof TradeStatisticsItem
13340
+ */
13341
+ stats: TradeStatistics;
13342
+ }
13343
+
13344
+ declare function TradeStatisticsItemFromJSON(json: any): TradeStatisticsItem;
13345
+
13346
+ declare function TradeStatisticsItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeStatisticsItem;
13347
+
13348
+ declare function TradeStatisticsItemToJSON(value?: TradeStatisticsItem | null): any;
13349
+
13350
+ declare function TradeStatisticsItemToJSONRecursive(value?: TradeStatisticsItem | null, ignoreParent?: boolean): any;
13351
+
13352
+ declare function TradeStatisticsToJSON(value?: TradeStatistics | null): any;
13353
+
13354
+ declare function TradeStatisticsToJSONRecursive(value?: TradeStatistics | null, ignoreParent?: boolean): any;
13355
+
13356
+ /**
13357
+ * brokerize
13358
+ * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
13359
+ *
13360
+ *
13361
+ *
13362
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13363
+ * https://openapi-generator.tech
13364
+ * Do not edit the class manually.
13365
+ */
13366
+ /**
13367
+ *
13368
+ * @export
13369
+ * @interface TradeWarning
13370
+ */
13371
+ declare interface TradeWarning {
13372
+ /**
13373
+ *
13374
+ * @type {string}
13375
+ * @memberof TradeWarning
13376
+ */
13377
+ message: string;
13378
+ }
13379
+
13380
+ declare function TradeWarningFromJSON(json: any): TradeWarning;
13381
+
13382
+ declare function TradeWarningFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeWarning;
13383
+
13384
+ declare function TradeWarningToJSON(value?: TradeWarning | null): any;
13385
+
13386
+ declare function TradeWarningToJSONRecursive(value?: TradeWarning | null, ignoreParent?: boolean): any;
12936
13387
 
12937
13388
  /**
12938
13389
  * brokerize