@brokerize/client 1.1.2 → 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.
- package/README.md +4 -2
- package/dist/authorizedApiContext.d.ts +3 -0
- package/dist/authorizedApiContext.js +9 -0
- package/dist/client.d.ts +474 -79
- package/dist/modelExports.d.ts +6 -0
- package/dist/swagger/apis/DefaultApi.d.ts +37 -3
- package/dist/swagger/apis/DefaultApi.js +121 -2
- package/dist/swagger/models/GetPortfolioTradeStatisticsResponse.d.ts +28 -0
- package/dist/swagger/models/GetPortfolioTradeStatisticsResponse.js +38 -0
- package/dist/swagger/models/GetPortfolioTradesResponse.d.ts +34 -0
- package/dist/swagger/models/GetPortfolioTradesResponse.js +40 -0
- package/dist/swagger/models/SummarizedTrade.d.ts +77 -0
- package/dist/swagger/models/SummarizedTrade.js +56 -0
- package/dist/swagger/models/TokenResponse.d.ts +51 -0
- package/dist/swagger/models/{ObtainToken200Response.js → TokenResponse.js} +6 -6
- package/dist/swagger/models/TradeDraftUpdateParams.d.ts +2 -3
- package/dist/swagger/models/TradeDraftUpdateParams.js +2 -5
- package/dist/swagger/models/TradeStatistics.d.ts +65 -0
- package/dist/swagger/models/TradeStatistics.js +50 -0
- package/dist/swagger/models/TradeStatisticsDateRange.d.ts +39 -0
- package/dist/swagger/models/TradeStatisticsDateRange.js +41 -0
- package/dist/swagger/models/TradeStatisticsHoldingPeriodInDays.d.ts +39 -0
- package/dist/swagger/models/TradeStatisticsHoldingPeriodInDays.js +41 -0
- package/dist/swagger/models/TradeStatisticsItem.d.ts +35 -0
- package/dist/swagger/models/TradeStatisticsItem.js +41 -0
- package/dist/swagger/models/TradeWarning.d.ts +27 -0
- package/dist/swagger/models/TradeWarning.js +37 -0
- package/dist/swagger/models/index.d.ts +9 -2
- package/dist/swagger/models/index.js +9 -2
- package/package.json +1 -1
- package/dist/swagger/models/ObtainToken200Response.d.ts +0 -51
- package/dist/swagger/models/TradeDraftUpdateParamsOrderId.d.ts +0 -21
- 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<
|
|
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<
|
|
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,71 @@ 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
|
+
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
|
+
|
|
6454
6544
|
/**
|
|
6455
6545
|
*
|
|
6456
6546
|
* @export
|
|
@@ -7385,7 +7475,13 @@ declare namespace Models {
|
|
|
7385
7475
|
SecurityQuotes,
|
|
7386
7476
|
SecurityQuote,
|
|
7387
7477
|
OrderIntent,
|
|
7388
|
-
OrderIntentAvailability
|
|
7478
|
+
OrderIntentAvailability,
|
|
7479
|
+
SummarizedTrade,
|
|
7480
|
+
TradeWarning,
|
|
7481
|
+
GetPortfolioTradesResponse,
|
|
7482
|
+
GetPortfolioTradeStatisticsResponse,
|
|
7483
|
+
TradeStatisticsItem,
|
|
7484
|
+
TradeStatistics
|
|
7389
7485
|
}
|
|
7390
7486
|
}
|
|
7391
7487
|
export { Models }
|
|
@@ -7468,62 +7564,6 @@ declare function OAuthLoginFormConfigToJSON(value?: OAuthLoginFormConfig | null)
|
|
|
7468
7564
|
|
|
7469
7565
|
declare function OAuthLoginFormConfigToJSONRecursive(value?: OAuthLoginFormConfig | null, ignoreParent?: boolean): any;
|
|
7470
7566
|
|
|
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
7567
|
declare interface ObtainTokenRequest {
|
|
7528
7568
|
grantType: string;
|
|
7529
7569
|
refreshToken: string;
|
|
@@ -7628,6 +7668,9 @@ declare namespace openApiClient {
|
|
|
7628
7668
|
GetPortfolioOrdersRequest,
|
|
7629
7669
|
GetPortfolioPositionsRequest,
|
|
7630
7670
|
GetPortfolioQuotesRequest,
|
|
7671
|
+
GetPortfolioTradeStatisticsRequest,
|
|
7672
|
+
GetPortfolioTradeWarningsRequest,
|
|
7673
|
+
GetPortfolioTradesRequest,
|
|
7631
7674
|
LogoutSessionRequest,
|
|
7632
7675
|
ObtainTokenRequest,
|
|
7633
7676
|
RenamePortfolioOperationRequest,
|
|
@@ -8337,6 +8380,16 @@ declare namespace openApiClient {
|
|
|
8337
8380
|
GetPortfolioQuotesResponseToJSONRecursive,
|
|
8338
8381
|
GetPortfolioQuotesResponseToJSON,
|
|
8339
8382
|
GetPortfolioQuotesResponse,
|
|
8383
|
+
GetPortfolioTradeStatisticsResponseFromJSON,
|
|
8384
|
+
GetPortfolioTradeStatisticsResponseFromJSONTyped,
|
|
8385
|
+
GetPortfolioTradeStatisticsResponseToJSONRecursive,
|
|
8386
|
+
GetPortfolioTradeStatisticsResponseToJSON,
|
|
8387
|
+
GetPortfolioTradeStatisticsResponse,
|
|
8388
|
+
GetPortfolioTradesResponseFromJSON,
|
|
8389
|
+
GetPortfolioTradesResponseFromJSONTyped,
|
|
8390
|
+
GetPortfolioTradesResponseToJSONRecursive,
|
|
8391
|
+
GetPortfolioTradesResponseToJSON,
|
|
8392
|
+
GetPortfolioTradesResponse,
|
|
8340
8393
|
GetQuoteParamsFromJSON,
|
|
8341
8394
|
GetQuoteParamsFromJSONTyped,
|
|
8342
8395
|
GetQuoteParamsToJSONRecursive,
|
|
@@ -8425,11 +8478,6 @@ declare namespace openApiClient {
|
|
|
8425
8478
|
OAuthLoginFormConfig,
|
|
8426
8479
|
OAuthLoginFormConfigRedirectStyleEnum,
|
|
8427
8480
|
OAuthLoginFormConfigRedirectStyleBitpandaEnum,
|
|
8428
|
-
ObtainToken200ResponseFromJSON,
|
|
8429
|
-
ObtainToken200ResponseFromJSONTyped,
|
|
8430
|
-
ObtainToken200ResponseToJSONRecursive,
|
|
8431
|
-
ObtainToken200ResponseToJSON,
|
|
8432
|
-
ObtainToken200Response,
|
|
8433
8481
|
OkResponseBodyFromJSON,
|
|
8434
8482
|
OkResponseBodyFromJSONTyped,
|
|
8435
8483
|
OkResponseBodyToJSONRecursive,
|
|
@@ -8751,6 +8799,11 @@ declare namespace openApiClient {
|
|
|
8751
8799
|
StringMapByOrderModelToJSONRecursive,
|
|
8752
8800
|
StringMapByOrderModelToJSON,
|
|
8753
8801
|
StringMapByOrderModel,
|
|
8802
|
+
SummarizedTradeFromJSON,
|
|
8803
|
+
SummarizedTradeFromJSONTyped,
|
|
8804
|
+
SummarizedTradeToJSONRecursive,
|
|
8805
|
+
SummarizedTradeToJSON,
|
|
8806
|
+
SummarizedTrade,
|
|
8754
8807
|
SyncErrorFromJSON,
|
|
8755
8808
|
SyncErrorFromJSONTyped,
|
|
8756
8809
|
SyncErrorToJSONRecursive,
|
|
@@ -8766,6 +8819,11 @@ declare namespace openApiClient {
|
|
|
8766
8819
|
TakeProfitStopLossDetailToJSONRecursive,
|
|
8767
8820
|
TakeProfitStopLossDetailToJSON,
|
|
8768
8821
|
TakeProfitStopLossDetail,
|
|
8822
|
+
TokenResponseFromJSON,
|
|
8823
|
+
TokenResponseFromJSONTyped,
|
|
8824
|
+
TokenResponseToJSONRecursive,
|
|
8825
|
+
TokenResponseToJSON,
|
|
8826
|
+
TokenResponse,
|
|
8769
8827
|
TradeDraftFromJSON,
|
|
8770
8828
|
TradeDraftFromJSONTyped,
|
|
8771
8829
|
TradeDraftToJSONRecursive,
|
|
@@ -8786,11 +8844,31 @@ declare namespace openApiClient {
|
|
|
8786
8844
|
TradeDraftUpdateParamsToJSONRecursive,
|
|
8787
8845
|
TradeDraftUpdateParamsToJSON,
|
|
8788
8846
|
TradeDraftUpdateParams,
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
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,
|
|
8794
8872
|
TrailingDistanceFromJSON,
|
|
8795
8873
|
TrailingDistanceFromJSONTyped,
|
|
8796
8874
|
TrailingDistanceToJSONRecursive,
|
|
@@ -12450,6 +12528,76 @@ export declare type Subscription = {
|
|
|
12450
12528
|
unsubscribe: () => void;
|
|
12451
12529
|
};
|
|
12452
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
|
+
|
|
12453
12601
|
/**
|
|
12454
12602
|
* brokerize
|
|
12455
12603
|
* The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
|
|
@@ -12564,6 +12712,62 @@ declare class TextApiResponse {
|
|
|
12564
12712
|
*/
|
|
12565
12713
|
export declare type TokenRefreshCallback = (cfg: AuthContextConfiguration) => void;
|
|
12566
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
|
+
|
|
12567
12771
|
export declare type TokenSet = {
|
|
12568
12772
|
idToken: string;
|
|
12569
12773
|
refreshToken: string;
|
|
@@ -12874,6 +13078,16 @@ declare function TradeDraftToJSON(value?: TradeDraft | null): any;
|
|
|
12874
13078
|
|
|
12875
13079
|
declare function TradeDraftToJSONRecursive(value?: TradeDraft | null, ignoreParent?: boolean): any;
|
|
12876
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
|
+
*/
|
|
12877
13091
|
/**
|
|
12878
13092
|
*
|
|
12879
13093
|
* @export
|
|
@@ -12894,16 +13108,71 @@ declare interface TradeDraftUpdateParams {
|
|
|
12894
13108
|
inactive?: boolean;
|
|
12895
13109
|
/**
|
|
12896
13110
|
*
|
|
12897
|
-
* @type {
|
|
13111
|
+
* @type {string}
|
|
12898
13112
|
* @memberof TradeDraftUpdateParams
|
|
12899
13113
|
*/
|
|
12900
|
-
orderId?:
|
|
13114
|
+
orderId?: string;
|
|
12901
13115
|
}
|
|
12902
13116
|
|
|
12903
13117
|
declare function TradeDraftUpdateParamsFromJSON(json: any): TradeDraftUpdateParams;
|
|
12904
13118
|
|
|
12905
13119
|
declare function TradeDraftUpdateParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeDraftUpdateParams;
|
|
12906
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
|
+
|
|
12907
13176
|
/**
|
|
12908
13177
|
* brokerize
|
|
12909
13178
|
* The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
|
|
@@ -12917,22 +13186,148 @@ declare function TradeDraftUpdateParamsFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
12917
13186
|
/**
|
|
12918
13187
|
*
|
|
12919
13188
|
* @export
|
|
12920
|
-
* @interface
|
|
13189
|
+
* @interface TradeStatisticsDateRange
|
|
12921
13190
|
*/
|
|
12922
|
-
declare interface
|
|
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;
|
|
12923
13210
|
}
|
|
12924
13211
|
|
|
12925
|
-
declare function
|
|
13212
|
+
declare function TradeStatisticsDateRangeFromJSON(json: any): TradeStatisticsDateRange;
|
|
12926
13213
|
|
|
12927
|
-
declare function
|
|
13214
|
+
declare function TradeStatisticsDateRangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeStatisticsDateRange;
|
|
12928
13215
|
|
|
12929
|
-
declare function
|
|
13216
|
+
declare function TradeStatisticsDateRangeToJSON(value?: TradeStatisticsDateRange | null): any;
|
|
12930
13217
|
|
|
12931
|
-
declare function
|
|
13218
|
+
declare function TradeStatisticsDateRangeToJSONRecursive(value?: TradeStatisticsDateRange | null, ignoreParent?: boolean): any;
|
|
12932
13219
|
|
|
12933
|
-
declare function
|
|
13220
|
+
declare function TradeStatisticsFromJSON(json: any): TradeStatistics;
|
|
12934
13221
|
|
|
12935
|
-
declare function
|
|
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;
|
|
12936
13331
|
|
|
12937
13332
|
/**
|
|
12938
13333
|
* brokerize
|