@brokerize/client 1.2.3 → 1.2.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.
package/dist/client.d.ts CHANGED
@@ -2672,6 +2672,12 @@ declare interface ClientConfig {
2672
2672
  * @memberof ClientConfig
2673
2673
  */
2674
2674
  page: any | null;
2675
+ /**
2676
+ * These flags are used in supporting the reporting logic
2677
+ * @type {Array<string>}
2678
+ * @memberof ClientConfig
2679
+ */
2680
+ reportingFlags?: Array<string>;
2675
2681
  }
2676
2682
 
2677
2683
  declare function ClientConfigFromJSON(json: any): ClientConfig;
@@ -2854,6 +2860,12 @@ declare interface ClientConfigUpdate {
2854
2860
  * @memberof ClientConfigUpdate
2855
2861
  */
2856
2862
  rateLimitPointsToConsume?: ClientConfigUpdateRateLimitPointsToConsume;
2863
+ /**
2864
+ * These flags are used in supporting the reporting logic
2865
+ * @type {Array<string>}
2866
+ * @memberof ClientConfigUpdate
2867
+ */
2868
+ reportingFlags?: Array<string>;
2857
2869
  }
2858
2870
 
2859
2871
  declare function ClientConfigUpdateFromJSON(json: any): ClientConfigUpdate;
@@ -13545,6 +13557,26 @@ declare interface TradeStatistics {
13545
13557
  * @memberof TradeStatistics
13546
13558
  */
13547
13559
  winnerCount: number;
13560
+ /**
13561
+ * The proportion of trading days that ended with a net profit within the selected timeframe.
13562
+ *
13563
+ * - Calculated as the number of profitable trading days divided by the total number of trading days with activity.
13564
+ * - For example, if trades were executed on 10 days and 2 of those days resulted in a net profit, the ratio would be `0.2`.
13565
+ * - If no trades occurred during the selected period, the value is `undefined`.
13566
+ * @type {number}
13567
+ * @memberof TradeStatistics
13568
+ */
13569
+ winnerDaysRatio?: number;
13570
+ /**
13571
+ * The proportion of months that ended with a net profit within the selected timeframe.
13572
+ *
13573
+ * - Calculated as the number of profitable trading months divided by the total number of trading months with activity.
13574
+ * - For example, if trades were executed in 10 months and 2 of those months resulted in a net profit, the ratio would be `0.2`.
13575
+ * - If no trades occurred during the selected period, the value is `undefined`.
13576
+ * @type {number}
13577
+ * @memberof TradeStatistics
13578
+ */
13579
+ winnerMonthsRatio?: number;
13548
13580
  /**
13549
13581
  *
13550
13582
  * @type {SummarizedTrade}
@@ -117,6 +117,12 @@ export interface ClientConfig {
117
117
  * @memberof ClientConfig
118
118
  */
119
119
  page: any | null;
120
+ /**
121
+ * These flags are used in supporting the reporting logic
122
+ * @type {Array<string>}
123
+ * @memberof ClientConfig
124
+ */
125
+ reportingFlags?: Array<string>;
120
126
  }
121
127
  export declare function ClientConfigFromJSON(json: any): ClientConfig;
122
128
  export declare function ClientConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClientConfig;
@@ -51,6 +51,9 @@ export function ClientConfigFromJSONTyped(json, ignoreDiscriminator) {
51
51
  oAuthReturnToRegularExpressions: json["oAuthReturnToRegularExpressions"],
52
52
  oAuthReturnToUrls: json["oAuthReturnToUrls"],
53
53
  page: json["page"],
54
+ reportingFlags: !exists(json, "reportingFlags")
55
+ ? undefined
56
+ : json["reportingFlags"],
54
57
  };
55
58
  }
56
59
  export function ClientConfigToJSONRecursive(value, ignoreParent = false) {
@@ -77,6 +80,7 @@ export function ClientConfigToJSONRecursive(value, ignoreParent = false) {
77
80
  oAuthReturnToRegularExpressions: value.oAuthReturnToRegularExpressions,
78
81
  oAuthReturnToUrls: value.oAuthReturnToUrls,
79
82
  page: value.page,
83
+ reportingFlags: value.reportingFlags,
80
84
  };
81
85
  }
82
86
  export function ClientConfigToJSON(value) {
@@ -149,6 +149,12 @@ export interface ClientConfigUpdate {
149
149
  * @memberof ClientConfigUpdate
150
150
  */
151
151
  rateLimitPointsToConsume?: ClientConfigUpdateRateLimitPointsToConsume;
152
+ /**
153
+ * These flags are used in supporting the reporting logic
154
+ * @type {Array<string>}
155
+ * @memberof ClientConfigUpdate
156
+ */
157
+ reportingFlags?: Array<string>;
152
158
  }
153
159
  export declare function ClientConfigUpdateFromJSON(json: any): ClientConfigUpdate;
154
160
  export declare function ClientConfigUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClientConfigUpdate;
@@ -85,6 +85,9 @@ export function ClientConfigUpdateFromJSONTyped(json, ignoreDiscriminator) {
85
85
  rateLimitPointsToConsume: !exists(json, "rateLimitPointsToConsume")
86
86
  ? undefined
87
87
  : ClientConfigUpdateRateLimitPointsToConsumeFromJSON(json["rateLimitPointsToConsume"]),
88
+ reportingFlags: !exists(json, "reportingFlags")
89
+ ? undefined
90
+ : json["reportingFlags"],
88
91
  };
89
92
  }
90
93
  export function ClientConfigUpdateToJSONRecursive(value, ignoreParent = false) {
@@ -118,6 +121,7 @@ export function ClientConfigUpdateToJSONRecursive(value, ignoreParent = false) {
118
121
  optionalClientSecrets: value.optionalClientSecrets,
119
122
  page: ClientConfigUpdatePageToJSON(value.page),
120
123
  rateLimitPointsToConsume: ClientConfigUpdateRateLimitPointsToConsumeToJSON(value.rateLimitPointsToConsume),
124
+ reportingFlags: value.reportingFlags,
121
125
  };
122
126
  }
123
127
  export function ClientConfigUpdateToJSON(value) {
@@ -97,6 +97,26 @@ export interface TradeStatistics {
97
97
  * @memberof TradeStatistics
98
98
  */
99
99
  winnerCount: number;
100
+ /**
101
+ * The proportion of trading days that ended with a net profit within the selected timeframe.
102
+ *
103
+ * - Calculated as the number of profitable trading days divided by the total number of trading days with activity.
104
+ * - For example, if trades were executed on 10 days and 2 of those days resulted in a net profit, the ratio would be `0.2`.
105
+ * - If no trades occurred during the selected period, the value is `undefined`.
106
+ * @type {number}
107
+ * @memberof TradeStatistics
108
+ */
109
+ winnerDaysRatio?: number;
110
+ /**
111
+ * The proportion of months that ended with a net profit within the selected timeframe.
112
+ *
113
+ * - Calculated as the number of profitable trading months divided by the total number of trading months with activity.
114
+ * - For example, if trades were executed in 10 months and 2 of those months resulted in a net profit, the ratio would be `0.2`.
115
+ * - If no trades occurred during the selected period, the value is `undefined`.
116
+ * @type {number}
117
+ * @memberof TradeStatistics
118
+ */
119
+ winnerMonthsRatio?: number;
100
120
  /**
101
121
  *
102
122
  * @type {SummarizedTrade}
@@ -47,6 +47,12 @@ export function TradeStatisticsFromJSONTyped(json, ignoreDiscriminator) {
47
47
  : AmountFromJSON(json["profitLossAbs"]),
48
48
  tradeCount: json["tradeCount"],
49
49
  winnerCount: json["winnerCount"],
50
+ winnerDaysRatio: !exists(json, "winnerDaysRatio")
51
+ ? undefined
52
+ : json["winnerDaysRatio"],
53
+ winnerMonthsRatio: !exists(json, "winnerMonthsRatio")
54
+ ? undefined
55
+ : json["winnerMonthsRatio"],
50
56
  worstTrade: !exists(json, "worstTrade")
51
57
  ? undefined
52
58
  : SummarizedTradeFromJSON(json["worstTrade"]),
@@ -73,6 +79,8 @@ export function TradeStatisticsToJSONRecursive(value, ignoreParent = false) {
73
79
  profitLossAbs: AmountToJSON(value.profitLossAbs),
74
80
  tradeCount: value.tradeCount,
75
81
  winnerCount: value.winnerCount,
82
+ winnerDaysRatio: value.winnerDaysRatio,
83
+ winnerMonthsRatio: value.winnerMonthsRatio,
76
84
  worstTrade: SummarizedTradeToJSON(value.worstTrade),
77
85
  };
78
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brokerize/client",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Client for the brokerize.com API",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/brokerize/client-js#readme",