@monaco-protocol/client-v2 0.0.71 → 0.0.73

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.
@@ -57,11 +57,13 @@ export declare class AppManagementApi extends runtime.BaseAPI {
57
57
  */
58
58
  getCommissionRates(requestParameters: AppManagementApiGetCommissionRatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CommissionRateResponse>;
59
59
  /**
60
- * Fetch commission rates
60
+ * Create a new commission rate to be applied to profit on risk created via the given app. Commission rates can have a value between 0.0 and 1.0, where e.g., 0.01 would be 1% of the profit.<br /><br />The most recently created rate will be used as the default rate. The default rate is used when no commission rate ID is passed during order creation.<br /><br />NOTE maximum effective commission rate for an app will be <br /><code>1.0 - protocol commission(fee) rate</code>
61
+ * Create a new app commission rate
61
62
  */
62
63
  updateCommissionRateRaw(requestParameters: AppManagementApiUpdateCommissionRateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppResponse>>;
63
64
  /**
64
- * Fetch commission rates
65
+ * Create a new commission rate to be applied to profit on risk created via the given app. Commission rates can have a value between 0.0 and 1.0, where e.g., 0.01 would be 1% of the profit.<br /><br />The most recently created rate will be used as the default rate. The default rate is used when no commission rate ID is passed during order creation.<br /><br />NOTE maximum effective commission rate for an app will be <br /><code>1.0 - protocol commission(fee) rate</code>
66
+ * Create a new app commission rate
65
67
  */
66
68
  updateCommissionRate(requestParameters: AppManagementApiUpdateCommissionRateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppResponse>;
67
69
  }
@@ -134,7 +134,8 @@ class AppManagementApi extends runtime.BaseAPI {
134
134
  });
135
135
  }
136
136
  /**
137
- * Fetch commission rates
137
+ * Create a new commission rate to be applied to profit on risk created via the given app. Commission rates can have a value between 0.0 and 1.0, where e.g., 0.01 would be 1% of the profit.<br /><br />The most recently created rate will be used as the default rate. The default rate is used when no commission rate ID is passed during order creation.<br /><br />NOTE maximum effective commission rate for an app will be <br /><code>1.0 - protocol commission(fee) rate</code>
138
+ * Create a new app commission rate
138
139
  */
139
140
  updateCommissionRateRaw(requestParameters, initOverrides) {
140
141
  return __awaiter(this, void 0, void 0, function* () {
@@ -164,7 +165,8 @@ class AppManagementApi extends runtime.BaseAPI {
164
165
  });
165
166
  }
166
167
  /**
167
- * Fetch commission rates
168
+ * Create a new commission rate to be applied to profit on risk created via the given app. Commission rates can have a value between 0.0 and 1.0, where e.g., 0.01 would be 1% of the profit.<br /><br />The most recently created rate will be used as the default rate. The default rate is used when no commission rate ID is passed during order creation.<br /><br />NOTE maximum effective commission rate for an app will be <br /><code>1.0 - protocol commission(fee) rate</code>
169
+ * Create a new app commission rate
168
170
  */
169
171
  updateCommissionRate(requestParameters, initOverrides) {
170
172
  return __awaiter(this, void 0, void 0, function* () {
@@ -52,6 +52,12 @@ export interface Order {
52
52
  * @memberof Order
53
53
  */
54
54
  outcomeId?: string;
55
+ /**
56
+ *
57
+ * @type {string}
58
+ * @memberof Order
59
+ */
60
+ outcomeTitle?: string;
55
61
  /**
56
62
  *
57
63
  * @type {number}
@@ -66,6 +66,7 @@ function OrderFromJSONTyped(json, ignoreDiscriminator) {
66
66
  'walletId': json['walletId'] == null ? undefined : json['walletId'],
67
67
  'side': json['side'] == null ? undefined : json['side'],
68
68
  'outcomeId': json['outcomeId'] == null ? undefined : json['outcomeId'],
69
+ 'outcomeTitle': json['outcomeTitle'] == null ? undefined : json['outcomeTitle'],
69
70
  'price': json['price'] == null ? undefined : json['price'],
70
71
  'stake': json['stake'] == null ? undefined : json['stake'],
71
72
  'stakeUnmatched': json['stakeUnmatched'] == null ? undefined : json['stakeUnmatched'],
@@ -93,6 +94,7 @@ function OrderToJSONTyped(value, ignoreDiscriminator = false) {
93
94
  'walletId': value['walletId'],
94
95
  'side': value['side'],
95
96
  'outcomeId': value['outcomeId'],
97
+ 'outcomeTitle': value['outcomeTitle'],
96
98
  'price': value['price'],
97
99
  'stake': value['stake'],
98
100
  'stakeUnmatched': value['stakeUnmatched'],
@@ -40,6 +40,12 @@ export interface OrderSummary {
40
40
  * @memberof OrderSummary
41
41
  */
42
42
  outcomeId?: string;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof OrderSummary
47
+ */
48
+ outcomeTitle?: string;
43
49
  /**
44
50
  *
45
51
  * @type {number}
@@ -57,6 +57,7 @@ function OrderSummaryFromJSONTyped(json, ignoreDiscriminator) {
57
57
  'market': json['market'] == null ? undefined : (0, DocumentReference_1.DocumentReferenceFromJSON)(json['market']),
58
58
  'side': json['side'] == null ? undefined : json['side'],
59
59
  'outcomeId': json['outcomeId'] == null ? undefined : json['outcomeId'],
60
+ 'outcomeTitle': json['outcomeTitle'] == null ? undefined : json['outcomeTitle'],
60
61
  'price': json['price'] == null ? undefined : json['price'],
61
62
  'stake': json['stake'] == null ? undefined : json['stake'],
62
63
  'stakeUnmatched': json['stakeUnmatched'] == null ? undefined : json['stakeUnmatched'],
@@ -77,6 +78,7 @@ function OrderSummaryToJSONTyped(value, ignoreDiscriminator = false) {
77
78
  'market': (0, DocumentReference_1.DocumentReferenceToJSON)(value['market']),
78
79
  'side': value['side'],
79
80
  'outcomeId': value['outcomeId'],
81
+ 'outcomeTitle': value['outcomeTitle'],
80
82
  'price': value['price'],
81
83
  'stake': value['stake'],
82
84
  'stakeUnmatched': value['stakeUnmatched'],
@@ -64,6 +64,25 @@ export interface Trade {
64
64
  * @memberof Trade
65
65
  */
66
66
  stake?: number;
67
+ /**
68
+ * Profit or Loss for the trade, calculated as follows:<br>
69
+ * 'For' trades
70
+ * <ul>
71
+ * <li> Winning; profitLoss = stake * (price-1) </li>
72
+ * <li> Losing; profitLoss = (stake * -1) </li>
73
+ * <li> Voided; profitLoss = 0 </li>
74
+ * </ul>
75
+ * 'Against' trades
76
+ * <ul>
77
+ * <li> Winning; profitLoss = stake </li>
78
+ * <li> Losing; profitLoss = stake * (price-1) * (-1) </li>
79
+ * <li> Voided; profitLoss = 0 </li>
80
+ * </ul>
81
+ *
82
+ * @type {number}
83
+ * @memberof Trade
84
+ */
85
+ profitLoss?: number;
67
86
  /**
68
87
  *
69
88
  * @type {Date}
@@ -49,6 +49,7 @@ function TradeFromJSONTyped(json, ignoreDiscriminator) {
49
49
  'outcomeId': json['outcomeId'] == null ? undefined : json['outcomeId'],
50
50
  'price': json['price'] == null ? undefined : json['price'],
51
51
  'stake': json['stake'] == null ? undefined : json['stake'],
52
+ 'profitLoss': json['profitLoss'] == null ? undefined : json['profitLoss'],
52
53
  'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
53
54
  'modifiedAt': json['modifiedAt'] == null ? undefined : (new Date(json['modifiedAt'])),
54
55
  };
@@ -69,6 +70,7 @@ function TradeToJSONTyped(value, ignoreDiscriminator = false) {
69
70
  'outcomeId': value['outcomeId'],
70
71
  'price': value['price'],
71
72
  'stake': value['stake'],
73
+ 'profitLoss': value['profitLoss'],
72
74
  'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
73
75
  'modifiedAt': value['modifiedAt'] == null ? undefined : ((value['modifiedAt']).toISOString()),
74
76
  };
@@ -40,6 +40,25 @@ export interface TradeSummary {
40
40
  * @memberof TradeSummary
41
41
  */
42
42
  stake?: number;
43
+ /**
44
+ * Profit or Loss for the trade, calculated as follows:<br>
45
+ * 'For' trades
46
+ * <ul>
47
+ * <li> Winning trade; profitLoss = stake * (price-1) </li>
48
+ * <li> Losing trade, profitLoss = (stake * -1) </li>
49
+ * <li> Voided trade, profitLoss = 0 </li>
50
+ * </ul>
51
+ * 'Against' trades
52
+ * <ul>
53
+ * <li> Winning trade, profitLoss = stake </li>
54
+ * <li> Losing trade, profitLoss = stake * (price-1) * (-1) </li>
55
+ * <li> Voided trade, profitLoss = 0 </li>
56
+ * </ul>
57
+ *
58
+ * @type {number}
59
+ * @memberof TradeSummary
60
+ */
61
+ profitLoss?: number;
43
62
  /**
44
63
  *
45
64
  * @type {Date}
@@ -37,6 +37,7 @@ function TradeSummaryFromJSONTyped(json, ignoreDiscriminator) {
37
37
  'id': json['id'] == null ? undefined : json['id'],
38
38
  'price': json['price'] == null ? undefined : json['price'],
39
39
  'stake': json['stake'] == null ? undefined : json['stake'],
40
+ 'profitLoss': json['profitLoss'] == null ? undefined : json['profitLoss'],
40
41
  'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
41
42
  };
42
43
  }
@@ -52,6 +53,7 @@ function TradeSummaryToJSONTyped(value, ignoreDiscriminator = false) {
52
53
  'id': value['id'],
53
54
  'price': value['price'],
54
55
  'stake': value['stake'],
56
+ 'profitLoss': value['profitLoss'],
55
57
  'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
56
58
  };
57
59
  }
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface UpdateAppCommissionRateRequest {
18
18
  /**
19
- *
19
+ * A value between 0.00 and 1.0, where e.g., 0.01 is treated as 1%
20
20
  * @type {number}
21
21
  * @memberof UpdateAppCommissionRateRequest
22
22
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monaco-protocol/client-v2",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [