@monaco-protocol/client-v2 0.0.2-dev.12 → 0.0.2-dev.13

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.
@@ -20,6 +20,8 @@ export interface GetTradesRequest {
20
20
  marketIds?: Array<string>;
21
21
  walletIds?: Array<string>;
22
22
  orderIds?: Array<string>;
23
+ fromCreatedAt?: Date;
24
+ toCreatedAt?: Date;
23
25
  page?: number;
24
26
  size?: number;
25
27
  sort?: Array<string>;
@@ -81,6 +81,12 @@ class TradesApi extends runtime.BaseAPI {
81
81
  if (requestParameters['orderIds'] != null) {
82
82
  queryParameters['orderIds'] = requestParameters['orderIds'];
83
83
  }
84
+ if (requestParameters['fromCreatedAt'] != null) {
85
+ queryParameters['fromCreatedAt'] = requestParameters['fromCreatedAt'].toISOString();
86
+ }
87
+ if (requestParameters['toCreatedAt'] != null) {
88
+ queryParameters['toCreatedAt'] = requestParameters['toCreatedAt'].toISOString();
89
+ }
84
90
  if (requestParameters['page'] != null) {
85
91
  queryParameters['page'] = requestParameters['page'];
86
92
  }
@@ -58,6 +58,11 @@ export interface CreateOrderRequest {
58
58
  */
59
59
  keepWhenInPlay?: boolean;
60
60
  /**
61
+ * Optional - How any unmatched portion of an order is treated:
62
+ * <ul>
63
+ * <li>RetainUnmatched - unmatched portion persists as an offer (default)</li>
64
+ * <li>CancelUnmatched - unmatched portion is cancelled</li>
65
+ * </ul>
61
66
  *
62
67
  * @type {string}
63
68
  * @memberof CreateOrderRequest
@@ -122,6 +122,17 @@ export interface Order {
122
122
  * @memberof Order
123
123
  */
124
124
  status?: OrderStatusEnum;
125
+ /**
126
+ * Optional - How any unmatched portion of an order is treated:
127
+ * <ul>
128
+ * <li>RetainUnmatched - unmatched portion persists as an offer (default)</li>
129
+ * <li>CancelUnmatched - unmatched portion is cancelled</li>
130
+ * </ul>
131
+ *
132
+ * @type {string}
133
+ * @memberof Order
134
+ */
135
+ matchBehavior?: OrderMatchBehaviorEnum;
125
136
  }
126
137
  /**
127
138
  * @export
@@ -144,6 +155,14 @@ export declare const OrderStatusEnum: {
144
155
  readonly Voided: "Voided";
145
156
  };
146
157
  export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
158
+ /**
159
+ * @export
160
+ */
161
+ export declare const OrderMatchBehaviorEnum: {
162
+ readonly RetainUnmatched: "RetainUnmatched";
163
+ readonly CancelUnmatched: "CancelUnmatched";
164
+ };
165
+ export type OrderMatchBehaviorEnum = typeof OrderMatchBehaviorEnum[keyof typeof OrderMatchBehaviorEnum];
147
166
  /**
148
167
  * Check if a given object implements the Order interface.
149
168
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.OrderStatusEnum = exports.OrderSideEnum = void 0;
16
+ exports.OrderMatchBehaviorEnum = exports.OrderStatusEnum = exports.OrderSideEnum = void 0;
17
17
  exports.instanceOfOrder = instanceOfOrder;
18
18
  exports.OrderFromJSON = OrderFromJSON;
19
19
  exports.OrderFromJSONTyped = OrderFromJSONTyped;
@@ -39,6 +39,13 @@ exports.OrderStatusEnum = {
39
39
  Lost: 'Lost',
40
40
  Voided: 'Voided'
41
41
  };
42
+ /**
43
+ * @export
44
+ */
45
+ exports.OrderMatchBehaviorEnum = {
46
+ RetainUnmatched: 'RetainUnmatched',
47
+ CancelUnmatched: 'CancelUnmatched'
48
+ };
42
49
  /**
43
50
  * Check if a given object implements the Order interface.
44
51
  */
@@ -69,6 +76,7 @@ function OrderFromJSONTyped(json, ignoreDiscriminator) {
69
76
  'commissionRateId': json['commissionRateId'] == null ? undefined : json['commissionRateId'],
70
77
  'reference': json['reference'] == null ? undefined : json['reference'],
71
78
  'status': json['status'] == null ? undefined : json['status'],
79
+ 'matchBehavior': json['matchBehavior'] == null ? undefined : json['matchBehavior'],
72
80
  };
73
81
  }
74
82
  function OrderToJSON(json) {
@@ -95,5 +103,6 @@ function OrderToJSONTyped(value, ignoreDiscriminator = false) {
95
103
  'commissionRateId': value['commissionRateId'],
96
104
  'reference': value['reference'],
97
105
  'status': value['status'],
106
+ 'matchBehavior': value['matchBehavior'],
98
107
  };
99
108
  }
@@ -48,12 +48,10 @@ export interface Wallet {
48
48
  description?: string;
49
49
  /**
50
50
  *
51
- * @type {{ [key: string]: WalletBalance; }}
51
+ * @type {Array<WalletBalance>}
52
52
  * @memberof Wallet
53
53
  */
54
- balances?: {
55
- [key: string]: WalletBalance;
56
- };
54
+ balances?: Array<WalletBalance>;
57
55
  }
58
56
  /**
59
57
  * @export
@@ -19,7 +19,6 @@ exports.WalletFromJSON = WalletFromJSON;
19
19
  exports.WalletFromJSONTyped = WalletFromJSONTyped;
20
20
  exports.WalletToJSON = WalletToJSON;
21
21
  exports.WalletToJSONTyped = WalletToJSONTyped;
22
- const runtime_1 = require("../runtime");
23
22
  const WalletBalance_1 = require("./WalletBalance");
24
23
  /**
25
24
  * @export
@@ -49,7 +48,7 @@ function WalletFromJSONTyped(json, ignoreDiscriminator) {
49
48
  'type': json['type'] == null ? undefined : json['type'],
50
49
  'reference': json['reference'] == null ? undefined : json['reference'],
51
50
  'description': json['description'] == null ? undefined : json['description'],
52
- 'balances': json['balances'] == null ? undefined : ((0, runtime_1.mapValues)(json['balances'], WalletBalance_1.WalletBalanceFromJSON)),
51
+ 'balances': json['balances'] == null ? undefined : (json['balances'].map(WalletBalance_1.WalletBalanceFromJSON)),
53
52
  };
54
53
  }
55
54
  function WalletToJSON(json) {
@@ -65,6 +64,6 @@ function WalletToJSONTyped(value, ignoreDiscriminator = false) {
65
64
  'type': value['type'],
66
65
  'reference': value['reference'],
67
66
  'description': value['description'],
68
- 'balances': value['balances'] == null ? undefined : ((0, runtime_1.mapValues)(value['balances'], WalletBalance_1.WalletBalanceToJSON)),
67
+ 'balances': value['balances'] == null ? undefined : (value['balances'].map(WalletBalance_1.WalletBalanceToJSON)),
69
68
  };
70
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monaco-protocol/client-v2",
3
- "version": "0.0.2-dev.12",
3
+ "version": "0.0.2-dev.13",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [