@brokerize/client 1.1.3 → 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.
- package/dist/client.d.ts +56 -0
- package/dist/swagger/apis/DefaultApi.d.ts +1 -0
- package/dist/swagger/apis/DefaultApi.js +3 -0
- package/dist/swagger/models/SummarizedTrade.d.ts +12 -0
- package/dist/swagger/models/SummarizedTrade.js +4 -0
- package/dist/swagger/models/TradeStatistics.d.ts +45 -0
- package/dist/swagger/models/TradeStatistics.js +31 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -6478,6 +6478,7 @@ declare function GetPortfolioQuotesResponseToJSONRecursive(value?: GetPortfolioQ
|
|
|
6478
6478
|
|
|
6479
6479
|
declare interface GetPortfolioTradesRequest {
|
|
6480
6480
|
portfolioId: string;
|
|
6481
|
+
search?: string;
|
|
6481
6482
|
take?: number;
|
|
6482
6483
|
skip?: number;
|
|
6483
6484
|
}
|
|
@@ -12534,6 +12535,12 @@ export declare type Subscription = {
|
|
|
12534
12535
|
* @interface SummarizedTrade
|
|
12535
12536
|
*/
|
|
12536
12537
|
declare interface SummarizedTrade {
|
|
12538
|
+
/**
|
|
12539
|
+
*
|
|
12540
|
+
* @type {Amount}
|
|
12541
|
+
* @memberof SummarizedTrade
|
|
12542
|
+
*/
|
|
12543
|
+
closeAvgQuotation: Amount;
|
|
12537
12544
|
/**
|
|
12538
12545
|
*
|
|
12539
12546
|
* @type {Date}
|
|
@@ -12558,6 +12565,12 @@ declare interface SummarizedTrade {
|
|
|
12558
12565
|
* @memberof SummarizedTrade
|
|
12559
12566
|
*/
|
|
12560
12567
|
id: string;
|
|
12568
|
+
/**
|
|
12569
|
+
*
|
|
12570
|
+
* @type {Amount}
|
|
12571
|
+
* @memberof SummarizedTrade
|
|
12572
|
+
*/
|
|
12573
|
+
openAvgQuotation: Amount;
|
|
12561
12574
|
/**
|
|
12562
12575
|
*
|
|
12563
12576
|
* @type {Date}
|
|
@@ -13128,6 +13141,30 @@ declare function TradeDraftUpdateParamsToJSONRecursive(value?: TradeDraftUpdateP
|
|
|
13128
13141
|
* @interface TradeStatistics
|
|
13129
13142
|
*/
|
|
13130
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;
|
|
13131
13168
|
/**
|
|
13132
13169
|
* Which fraction of the trades where winners. 1 is 100%, so a value of 1 would indicate
|
|
13133
13170
|
* "all trades were winners".
|
|
@@ -13159,6 +13196,19 @@ declare interface TradeStatistics {
|
|
|
13159
13196
|
* @memberof TradeStatistics
|
|
13160
13197
|
*/
|
|
13161
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;
|
|
13162
13212
|
/**
|
|
13163
13213
|
* How many trades are part of the calculation.
|
|
13164
13214
|
* @type {number}
|
|
@@ -13171,6 +13221,12 @@ declare interface TradeStatistics {
|
|
|
13171
13221
|
* @memberof TradeStatistics
|
|
13172
13222
|
*/
|
|
13173
13223
|
winnerCount: number;
|
|
13224
|
+
/**
|
|
13225
|
+
*
|
|
13226
|
+
* @type {SummarizedTrade}
|
|
13227
|
+
* @memberof TradeStatistics
|
|
13228
|
+
*/
|
|
13229
|
+
worstTrade?: SummarizedTrade;
|
|
13174
13230
|
}
|
|
13175
13231
|
|
|
13176
13232
|
/**
|
|
@@ -590,6 +590,9 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
590
590
|
throw new runtime.RequiredError("portfolioId", "Required parameter requestParameters.portfolioId was null or undefined when calling getPortfolioTrades.");
|
|
591
591
|
}
|
|
592
592
|
const queryParameters = {};
|
|
593
|
+
if (requestParameters.search !== undefined) {
|
|
594
|
+
queryParameters["search"] = requestParameters.search;
|
|
595
|
+
}
|
|
593
596
|
if (requestParameters.take !== undefined) {
|
|
594
597
|
queryParameters["take"] = requestParameters.take;
|
|
595
598
|
}
|
|
@@ -16,6 +16,12 @@ import { Security } from "./Security";
|
|
|
16
16
|
* @interface SummarizedTrade
|
|
17
17
|
*/
|
|
18
18
|
export interface SummarizedTrade {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Amount}
|
|
22
|
+
* @memberof SummarizedTrade
|
|
23
|
+
*/
|
|
24
|
+
closeAvgQuotation: Amount;
|
|
19
25
|
/**
|
|
20
26
|
*
|
|
21
27
|
* @type {Date}
|
|
@@ -40,6 +46,12 @@ export interface SummarizedTrade {
|
|
|
40
46
|
* @memberof SummarizedTrade
|
|
41
47
|
*/
|
|
42
48
|
id: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {Amount}
|
|
52
|
+
* @memberof SummarizedTrade
|
|
53
|
+
*/
|
|
54
|
+
openAvgQuotation: Amount;
|
|
43
55
|
/**
|
|
44
56
|
*
|
|
45
57
|
* @type {Date}
|
|
@@ -21,10 +21,12 @@ export function SummarizedTradeFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
21
21
|
return json;
|
|
22
22
|
}
|
|
23
23
|
return {
|
|
24
|
+
closeAvgQuotation: AmountFromJSON(json["closeAvgQuotation"]),
|
|
24
25
|
closeDateTime: new Date(json["closeDateTime"]),
|
|
25
26
|
details: json["details"],
|
|
26
27
|
fees: !exists(json, "fees") ? undefined : AmountFromJSON(json["fees"]),
|
|
27
28
|
id: json["id"],
|
|
29
|
+
openAvgQuotation: AmountFromJSON(json["openAvgQuotation"]),
|
|
28
30
|
openDateTime: new Date(json["openDateTime"]),
|
|
29
31
|
profitLossAbs: AmountFromJSON(json["profitLossAbs"]),
|
|
30
32
|
profitLossRel: json["profitLossRel"],
|
|
@@ -40,10 +42,12 @@ export function SummarizedTradeToJSONRecursive(value, ignoreParent = false) {
|
|
|
40
42
|
return null;
|
|
41
43
|
}
|
|
42
44
|
return {
|
|
45
|
+
closeAvgQuotation: AmountToJSON(value.closeAvgQuotation),
|
|
43
46
|
closeDateTime: value.closeDateTime.toISOString(),
|
|
44
47
|
details: value.details,
|
|
45
48
|
fees: AmountToJSON(value.fees),
|
|
46
49
|
id: value.id,
|
|
50
|
+
openAvgQuotation: AmountToJSON(value.openAvgQuotation),
|
|
47
51
|
openDateTime: value.openDateTime.toISOString(),
|
|
48
52
|
profitLossAbs: AmountToJSON(value.profitLossAbs),
|
|
49
53
|
profitLossRel: value.profitLossRel,
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
* https://openapi-generator.tech
|
|
9
9
|
* Do not edit the class manually.
|
|
10
10
|
*/
|
|
11
|
+
import { Amount } from "./Amount";
|
|
12
|
+
import { SummarizedTrade } from "./SummarizedTrade";
|
|
11
13
|
import { TradeStatisticsHoldingPeriodInDays } from "./TradeStatisticsHoldingPeriodInDays";
|
|
12
14
|
/**
|
|
13
15
|
*
|
|
@@ -15,6 +17,30 @@ import { TradeStatisticsHoldingPeriodInDays } from "./TradeStatisticsHoldingPeri
|
|
|
15
17
|
* @interface TradeStatistics
|
|
16
18
|
*/
|
|
17
19
|
export interface TradeStatistics {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {Amount}
|
|
23
|
+
* @memberof TradeStatistics
|
|
24
|
+
*/
|
|
25
|
+
avgLossAbs?: Amount;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {Amount}
|
|
29
|
+
* @memberof TradeStatistics
|
|
30
|
+
*/
|
|
31
|
+
avgProfitAbs?: Amount;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {Amount}
|
|
35
|
+
* @memberof TradeStatistics
|
|
36
|
+
*/
|
|
37
|
+
avgProfitLossAbs?: Amount;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {SummarizedTrade}
|
|
41
|
+
* @memberof TradeStatistics
|
|
42
|
+
*/
|
|
43
|
+
bestTrade?: SummarizedTrade;
|
|
18
44
|
/**
|
|
19
45
|
* Which fraction of the trades where winners. 1 is 100%, so a value of 1 would indicate
|
|
20
46
|
* "all trades were winners".
|
|
@@ -46,6 +72,19 @@ export interface TradeStatistics {
|
|
|
46
72
|
* @memberof TradeStatistics
|
|
47
73
|
*/
|
|
48
74
|
loserCount: number;
|
|
75
|
+
/**
|
|
76
|
+
* Profits/Losses. E.g. if there were 2000€ profits in winning trades and 1000€ losses in losing trades,
|
|
77
|
+
* the profitFactor would be 2000€ / 1000€ = 2.
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof TradeStatistics
|
|
80
|
+
*/
|
|
81
|
+
profitFactor?: number;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {Amount}
|
|
85
|
+
* @memberof TradeStatistics
|
|
86
|
+
*/
|
|
87
|
+
profitLossAbs?: Amount;
|
|
49
88
|
/**
|
|
50
89
|
* How many trades are part of the calculation.
|
|
51
90
|
* @type {number}
|
|
@@ -58,6 +97,12 @@ export interface TradeStatistics {
|
|
|
58
97
|
* @memberof TradeStatistics
|
|
59
98
|
*/
|
|
60
99
|
winnerCount: number;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {SummarizedTrade}
|
|
103
|
+
* @memberof TradeStatistics
|
|
104
|
+
*/
|
|
105
|
+
worstTrade?: SummarizedTrade;
|
|
61
106
|
}
|
|
62
107
|
export declare function TradeStatisticsFromJSON(json: any): TradeStatistics;
|
|
63
108
|
export declare function TradeStatisticsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradeStatistics;
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
* https://openapi-generator.tech
|
|
11
11
|
* Do not edit the class manually.
|
|
12
12
|
*/
|
|
13
|
+
import { exists } from "../runtime";
|
|
14
|
+
import { AmountFromJSON, AmountToJSON, } from "./Amount";
|
|
15
|
+
import { SummarizedTradeFromJSON, SummarizedTradeToJSON, } from "./SummarizedTrade";
|
|
13
16
|
import { TradeStatisticsHoldingPeriodInDaysFromJSON, TradeStatisticsHoldingPeriodInDaysToJSON, } from "./TradeStatisticsHoldingPeriodInDays";
|
|
14
17
|
export function TradeStatisticsFromJSON(json) {
|
|
15
18
|
return TradeStatisticsFromJSONTyped(json, false);
|
|
@@ -19,13 +22,34 @@ export function TradeStatisticsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
19
22
|
return json;
|
|
20
23
|
}
|
|
21
24
|
return {
|
|
25
|
+
avgLossAbs: !exists(json, "avgLossAbs")
|
|
26
|
+
? undefined
|
|
27
|
+
: AmountFromJSON(json["avgLossAbs"]),
|
|
28
|
+
avgProfitAbs: !exists(json, "avgProfitAbs")
|
|
29
|
+
? undefined
|
|
30
|
+
: AmountFromJSON(json["avgProfitAbs"]),
|
|
31
|
+
avgProfitLossAbs: !exists(json, "avgProfitLossAbs")
|
|
32
|
+
? undefined
|
|
33
|
+
: AmountFromJSON(json["avgProfitLossAbs"]),
|
|
34
|
+
bestTrade: !exists(json, "bestTrade")
|
|
35
|
+
? undefined
|
|
36
|
+
: SummarizedTradeFromJSON(json["bestTrade"]),
|
|
22
37
|
hitRate: json["hitRate"],
|
|
23
38
|
holdingPeriodInDays: TradeStatisticsHoldingPeriodInDaysFromJSON(json["holdingPeriodInDays"]),
|
|
24
39
|
longestLosingStreak: json["longestLosingStreak"],
|
|
25
40
|
longestWinningStreak: json["longestWinningStreak"],
|
|
26
41
|
loserCount: json["loserCount"],
|
|
42
|
+
profitFactor: !exists(json, "profitFactor")
|
|
43
|
+
? undefined
|
|
44
|
+
: json["profitFactor"],
|
|
45
|
+
profitLossAbs: !exists(json, "profitLossAbs")
|
|
46
|
+
? undefined
|
|
47
|
+
: AmountFromJSON(json["profitLossAbs"]),
|
|
27
48
|
tradeCount: json["tradeCount"],
|
|
28
49
|
winnerCount: json["winnerCount"],
|
|
50
|
+
worstTrade: !exists(json, "worstTrade")
|
|
51
|
+
? undefined
|
|
52
|
+
: SummarizedTradeFromJSON(json["worstTrade"]),
|
|
29
53
|
};
|
|
30
54
|
}
|
|
31
55
|
export function TradeStatisticsToJSONRecursive(value, ignoreParent = false) {
|
|
@@ -36,13 +60,20 @@ export function TradeStatisticsToJSONRecursive(value, ignoreParent = false) {
|
|
|
36
60
|
return null;
|
|
37
61
|
}
|
|
38
62
|
return {
|
|
63
|
+
avgLossAbs: AmountToJSON(value.avgLossAbs),
|
|
64
|
+
avgProfitAbs: AmountToJSON(value.avgProfitAbs),
|
|
65
|
+
avgProfitLossAbs: AmountToJSON(value.avgProfitLossAbs),
|
|
66
|
+
bestTrade: SummarizedTradeToJSON(value.bestTrade),
|
|
39
67
|
hitRate: value.hitRate,
|
|
40
68
|
holdingPeriodInDays: TradeStatisticsHoldingPeriodInDaysToJSON(value.holdingPeriodInDays),
|
|
41
69
|
longestLosingStreak: value.longestLosingStreak,
|
|
42
70
|
longestWinningStreak: value.longestWinningStreak,
|
|
43
71
|
loserCount: value.loserCount,
|
|
72
|
+
profitFactor: value.profitFactor,
|
|
73
|
+
profitLossAbs: AmountToJSON(value.profitLossAbs),
|
|
44
74
|
tradeCount: value.tradeCount,
|
|
45
75
|
winnerCount: value.winnerCount,
|
|
76
|
+
worstTrade: SummarizedTradeToJSON(value.worstTrade),
|
|
46
77
|
};
|
|
47
78
|
}
|
|
48
79
|
export function TradeStatisticsToJSON(value) {
|