@monaco-protocol/client-v2 0.0.59 → 0.0.65-dev.1

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.
Files changed (37) hide show
  1. package/dist/apis/OrdersApi.d.ts +13 -1
  2. package/dist/apis/OrdersApi.js +36 -0
  3. package/dist/apis/PricesApi.d.ts +61 -0
  4. package/dist/apis/PricesApi.js +110 -0
  5. package/dist/apis/WalletsApi.d.ts +53 -11
  6. package/dist/apis/WalletsApi.js +112 -12
  7. package/dist/models/BatchCreateOrderRequest.d.ts +33 -0
  8. package/dist/models/BatchCreateOrderRequest.js +49 -0
  9. package/dist/models/BatchOrderResponse.d.ts +82 -0
  10. package/dist/models/BatchOrderResponse.js +70 -0
  11. package/dist/models/BatchOrderResponseOrdersInner.d.ts +23 -0
  12. package/dist/models/BatchOrderResponseOrdersInner.js +51 -0
  13. package/dist/models/DepositAddress.d.ts +44 -0
  14. package/dist/models/DepositAddress.js +52 -0
  15. package/dist/models/DepositAddressResponse.d.ts +40 -0
  16. package/dist/models/DepositAddressResponse.js +52 -0
  17. package/dist/models/DepositRequest.d.ts +44 -0
  18. package/dist/models/DepositRequest.js +52 -0
  19. package/dist/models/DepositRequestRequest.d.ts +38 -0
  20. package/dist/models/DepositRequestRequest.js +54 -0
  21. package/dist/models/DepositRequestResponse.d.ts +40 -0
  22. package/dist/models/DepositRequestResponse.js +52 -0
  23. package/dist/models/Meta.d.ts +3 -0
  24. package/dist/models/Meta.js +4 -1
  25. package/dist/models/ModelError.d.ts +51 -0
  26. package/dist/models/ModelError.js +50 -0
  27. package/dist/models/PagedMarketWithPricesResponse.d.ts +96 -0
  28. package/dist/models/PagedMarketWithPricesResponse.js +76 -0
  29. package/dist/models/WithdrawalRequest.d.ts +92 -0
  30. package/dist/models/WithdrawalRequest.js +83 -0
  31. package/dist/models/WithdrawalRequestRequest.d.ts +44 -0
  32. package/dist/models/WithdrawalRequestRequest.js +56 -0
  33. package/dist/models/WithdrawalRequestResponse.d.ts +40 -0
  34. package/dist/models/WithdrawalRequestResponse.js +52 -0
  35. package/dist/models/index.d.ts +12 -0
  36. package/dist/models/index.js +12 -0
  37. package/package.json +1 -1
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ChunkOrderResponse, CreateOrderRequest, OrderResponse, PagedOrderResponse, TradeResponse } from '../models/index';
13
+ import type { BatchCreateOrderRequest, BatchOrderResponse, ChunkOrderResponse, CreateOrderRequest, OrderResponse, PagedOrderResponse, TradeResponse } from '../models/index';
14
14
  export interface CancelOrderRequest {
15
15
  authorization: string;
16
16
  id: string;
@@ -26,6 +26,10 @@ export interface CreateOrderOperationRequest {
26
26
  authorization: string;
27
27
  createOrderRequest: CreateOrderRequest;
28
28
  }
29
+ export interface CreateOrdersRequest {
30
+ authorization: string;
31
+ batchCreateOrderRequest: BatchCreateOrderRequest;
32
+ }
29
33
  export interface GetOrderRequest {
30
34
  authorization: string;
31
35
  id: string;
@@ -96,6 +100,14 @@ export declare class OrdersApi extends runtime.BaseAPI {
96
100
  * Create order
97
101
  */
98
102
  createOrder(requestParameters: CreateOrderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
103
+ /**
104
+ * Create multiple orders
105
+ */
106
+ createOrdersRaw(requestParameters: CreateOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BatchOrderResponse>>;
107
+ /**
108
+ * Create multiple orders
109
+ */
110
+ createOrders(requestParameters: CreateOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BatchOrderResponse>;
99
111
  /**
100
112
  * Fetch order by id
101
113
  */
@@ -142,6 +142,42 @@ class OrdersApi extends runtime.BaseAPI {
142
142
  return yield response.value();
143
143
  });
144
144
  }
145
+ /**
146
+ * Create multiple orders
147
+ */
148
+ createOrdersRaw(requestParameters, initOverrides) {
149
+ return __awaiter(this, void 0, void 0, function* () {
150
+ if (requestParameters['authorization'] == null) {
151
+ throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling createOrders().');
152
+ }
153
+ if (requestParameters['batchCreateOrderRequest'] == null) {
154
+ throw new runtime.RequiredError('batchCreateOrderRequest', 'Required parameter "batchCreateOrderRequest" was null or undefined when calling createOrders().');
155
+ }
156
+ const queryParameters = {};
157
+ const headerParameters = {};
158
+ headerParameters['Content-Type'] = 'application/json';
159
+ if (requestParameters['authorization'] != null) {
160
+ headerParameters['authorization'] = String(requestParameters['authorization']);
161
+ }
162
+ const response = yield this.request({
163
+ path: `/orders/batch`,
164
+ method: 'POST',
165
+ headers: headerParameters,
166
+ query: queryParameters,
167
+ body: (0, index_1.BatchCreateOrderRequestToJSON)(requestParameters['batchCreateOrderRequest']),
168
+ }, initOverrides);
169
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BatchOrderResponseFromJSON)(jsonValue));
170
+ });
171
+ }
172
+ /**
173
+ * Create multiple orders
174
+ */
175
+ createOrders(requestParameters, initOverrides) {
176
+ return __awaiter(this, void 0, void 0, function* () {
177
+ const response = yield this.createOrdersRaw(requestParameters, initOverrides);
178
+ return yield response.value();
179
+ });
180
+ }
145
181
  /**
146
182
  * Fetch order by id
147
183
  */
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Monaco API
3
+ * A RESTful API that allows you to interact with the Monaco Exchange. Provides endpoints for managing Events, Markets, Sessions, Wallets and Orders. To interact with the API, a client must have an App Id and an API Key to authenticate and create a session.
4
+ *
5
+ * The version of the OpenAPI document: 0.1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { PagedMarketWithPricesResponse } from '../models/index';
14
+ export interface GetPricesRequest {
15
+ authorization: string;
16
+ eventStarting?: GetPricesEventStartingEnum;
17
+ fromDateTime?: Date;
18
+ toDateTime?: Date;
19
+ marketStatuses?: Set<GetPricesMarketStatusesEnum>;
20
+ marketIds?: Set<string>;
21
+ page?: number;
22
+ size?: number;
23
+ sort?: Array<string>;
24
+ }
25
+ /**
26
+ *
27
+ */
28
+ export declare class PricesApi extends runtime.BaseAPI {
29
+ /**
30
+ * Fetch market prices, filtered by either provided market ids, or event start time - with optional filtering on market status. Paginated by number of markets.
31
+ */
32
+ getPricesRaw(requestParameters: GetPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PagedMarketWithPricesResponse>>;
33
+ /**
34
+ * Fetch market prices, filtered by either provided market ids, or event start time - with optional filtering on market status. Paginated by number of markets.
35
+ */
36
+ getPrices(requestParameters: GetPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PagedMarketWithPricesResponse>;
37
+ }
38
+ /**
39
+ * @export
40
+ */
41
+ export declare const GetPricesEventStartingEnum: {
42
+ readonly Live: "Live";
43
+ readonly Today: "Today";
44
+ readonly Later: "Later";
45
+ readonly Range: "Range";
46
+ };
47
+ export type GetPricesEventStartingEnum = typeof GetPricesEventStartingEnum[keyof typeof GetPricesEventStartingEnum];
48
+ /**
49
+ * @export
50
+ */
51
+ export declare const GetPricesMarketStatusesEnum: {
52
+ readonly Initializing: "Initializing";
53
+ readonly Open: "Open";
54
+ readonly Locked: "Locked";
55
+ readonly Settling: "Settling";
56
+ readonly Settled: "Settled";
57
+ readonly Voiding: "Voiding";
58
+ readonly Voided: "Voided";
59
+ readonly Closed: "Closed";
60
+ };
61
+ export type GetPricesMarketStatusesEnum = typeof GetPricesMarketStatusesEnum[keyof typeof GetPricesMarketStatusesEnum];
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Monaco API
6
+ * A RESTful API that allows you to interact with the Monaco Exchange. Provides endpoints for managing Events, Markets, Sessions, Wallets and Orders. To interact with the API, a client must have an App Id and an API Key to authenticate and create a session.
7
+ *
8
+ * The version of the OpenAPI document: 0.1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.GetPricesMarketStatusesEnum = exports.GetPricesEventStartingEnum = exports.PricesApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class PricesApi extends runtime.BaseAPI {
32
+ /**
33
+ * Fetch market prices, filtered by either provided market ids, or event start time - with optional filtering on market status. Paginated by number of markets.
34
+ */
35
+ getPricesRaw(requestParameters, initOverrides) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (requestParameters['authorization'] == null) {
38
+ throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getPrices().');
39
+ }
40
+ const queryParameters = {};
41
+ if (requestParameters['eventStarting'] != null) {
42
+ queryParameters['eventStarting'] = requestParameters['eventStarting'];
43
+ }
44
+ if (requestParameters['fromDateTime'] != null) {
45
+ queryParameters['fromDateTime'] = requestParameters['fromDateTime'].toISOString();
46
+ }
47
+ if (requestParameters['toDateTime'] != null) {
48
+ queryParameters['toDateTime'] = requestParameters['toDateTime'].toISOString();
49
+ }
50
+ if (requestParameters['marketStatuses'] != null) {
51
+ queryParameters['marketStatuses'] = requestParameters['marketStatuses'];
52
+ }
53
+ if (requestParameters['marketIds'] != null) {
54
+ queryParameters['marketIds'] = requestParameters['marketIds'];
55
+ }
56
+ if (requestParameters['page'] != null) {
57
+ queryParameters['page'] = requestParameters['page'];
58
+ }
59
+ if (requestParameters['size'] != null) {
60
+ queryParameters['size'] = requestParameters['size'];
61
+ }
62
+ if (requestParameters['sort'] != null) {
63
+ queryParameters['sort'] = requestParameters['sort'];
64
+ }
65
+ const headerParameters = {};
66
+ if (requestParameters['authorization'] != null) {
67
+ headerParameters['authorization'] = String(requestParameters['authorization']);
68
+ }
69
+ const response = yield this.request({
70
+ path: `/prices`,
71
+ method: 'GET',
72
+ headers: headerParameters,
73
+ query: queryParameters,
74
+ }, initOverrides);
75
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PagedMarketWithPricesResponseFromJSON)(jsonValue));
76
+ });
77
+ }
78
+ /**
79
+ * Fetch market prices, filtered by either provided market ids, or event start time - with optional filtering on market status. Paginated by number of markets.
80
+ */
81
+ getPrices(requestParameters, initOverrides) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ const response = yield this.getPricesRaw(requestParameters, initOverrides);
84
+ return yield response.value();
85
+ });
86
+ }
87
+ }
88
+ exports.PricesApi = PricesApi;
89
+ /**
90
+ * @export
91
+ */
92
+ exports.GetPricesEventStartingEnum = {
93
+ Live: 'Live',
94
+ Today: 'Today',
95
+ Later: 'Later',
96
+ Range: 'Range'
97
+ };
98
+ /**
99
+ * @export
100
+ */
101
+ exports.GetPricesMarketStatusesEnum = {
102
+ Initializing: 'Initializing',
103
+ Open: 'Open',
104
+ Locked: 'Locked',
105
+ Settling: 'Settling',
106
+ Settled: 'Settled',
107
+ Voiding: 'Voiding',
108
+ Voided: 'Voided',
109
+ Closed: 'Closed'
110
+ };
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateWalletRequest, PagedMarketPositionResponse, PagedTransactionResponse, PagedWalletResponse, TransferResponse, WalletMetricsResponse, WalletResponse } from '../models/index';
13
+ import type { CreateWalletRequest, DepositAddressResponse, DepositRequestRequest, DepositRequestResponse, PagedMarketPositionResponse, PagedTransactionResponse, PagedWalletResponse, TransferResponse, WalletMetricsResponse, WalletResponse, WithdrawalRequestRequest } from '../models/index';
14
14
  export interface CreateWalletOperationRequest {
15
15
  authorization: string;
16
16
  createWalletRequest: CreateWalletRequest;
@@ -20,6 +20,11 @@ export interface CreditWalletRequest {
20
20
  walletId: string;
21
21
  currencyId: string;
22
22
  }
23
+ export interface GetDepositAddressRequest {
24
+ authorization: string;
25
+ id: string;
26
+ currencyId: string;
27
+ }
23
28
  export interface GetMarketPositionsRequest {
24
29
  authorization: string;
25
30
  id: string;
@@ -47,14 +52,21 @@ export interface GetWalletTransactionsRequest {
47
52
  }
48
53
  export interface GetWalletsRequest {
49
54
  authorization: string;
50
- walletIds?: Array<string>;
55
+ walletIds?: Set<string>;
56
+ types?: Set<GetWalletsTypesEnum>;
51
57
  page?: number;
52
58
  size?: number;
53
59
  sort?: Array<string>;
54
60
  }
55
- export interface WalletWithdrawRequest {
61
+ export interface RequestDepositRequest {
56
62
  authorization: string;
57
63
  id: string;
64
+ depositRequestRequest: DepositRequestRequest;
65
+ }
66
+ export interface RequestWithdrawalRequest {
67
+ authorization: string;
68
+ id: string;
69
+ withdrawalRequestRequest: WithdrawalRequestRequest;
58
70
  }
59
71
  /**
60
72
  *
@@ -78,6 +90,16 @@ export declare class WalletsApi extends runtime.BaseAPI {
78
90
  * Credit wallet with 1000 units of a given currency
79
91
  */
80
92
  creditWallet(requestParameters: CreditWalletRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransferResponse>;
93
+ /**
94
+ * Fetch / create a deposit address for given wallet-id and currency-id
95
+ * Fetch / create a deposit address
96
+ */
97
+ getDepositAddressRaw(requestParameters: GetDepositAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DepositAddressResponse>>;
98
+ /**
99
+ * Fetch / create a deposit address for given wallet-id and currency-id
100
+ * Fetch / create a deposit address
101
+ */
102
+ getDepositAddress(requestParameters: GetDepositAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DepositAddressResponse>;
81
103
  /**
82
104
  * Fetch a list of market positions for the specified wallet, filtered by market ids
83
105
  * Get Market Positions
@@ -119,23 +141,43 @@ export declare class WalletsApi extends runtime.BaseAPI {
119
141
  */
120
142
  getWalletTransactions(requestParameters: GetWalletTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PagedTransactionResponse>;
121
143
  /**
122
- * Fetch a list of wallets for the current user, filtered by the provided walletFilter param
144
+ * Fetch a page of wallets for the current application
123
145
  * Fetch a list of wallets
124
146
  */
125
147
  getWalletsRaw(requestParameters: GetWalletsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PagedWalletResponse>>;
126
148
  /**
127
- * Fetch a list of wallets for the current user, filtered by the provided walletFilter param
149
+ * Fetch a page of wallets for the current application
128
150
  * Fetch a list of wallets
129
151
  */
130
152
  getWallets(requestParameters: GetWalletsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PagedWalletResponse>;
131
153
  /**
132
- * Withdraw Funds for the current user\'s wallet
133
- * Withdraw Funds
154
+ * Create and process a deposit request for given external address, wallet id and currency id
155
+ * Create a deposit request
156
+ */
157
+ requestDepositRaw(requestParameters: RequestDepositRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DepositRequestResponse>>;
158
+ /**
159
+ * Create and process a deposit request for given external address, wallet id and currency id
160
+ * Create a deposit request
134
161
  */
135
- walletWithdrawRaw(requestParameters: WalletWithdrawRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
162
+ requestDeposit(requestParameters: RequestDepositRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DepositRequestResponse>;
136
163
  /**
137
- * Withdraw Funds for the current user\'s wallet
138
- * Withdraw Funds
164
+ * Request to withdraw funds to an external address from the current wallet
165
+ * Request to withdraw Funds
139
166
  */
140
- walletWithdraw(requestParameters: WalletWithdrawRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
167
+ requestWithdrawalRaw(requestParameters: RequestWithdrawalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
168
+ /**
169
+ * Request to withdraw funds to an external address from the current wallet
170
+ * Request to withdraw Funds
171
+ */
172
+ requestWithdrawal(requestParameters: RequestWithdrawalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
141
173
  }
174
+ /**
175
+ * @export
176
+ */
177
+ export declare const GetWalletsTypesEnum: {
178
+ readonly Commission: "Commission";
179
+ readonly MarketEscrow: "MarketEscrow";
180
+ readonly System: "System";
181
+ readonly User: "User";
182
+ };
183
+ export type GetWalletsTypesEnum = typeof GetWalletsTypesEnum[keyof typeof GetWalletsTypesEnum];
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.WalletsApi = void 0;
25
+ exports.GetWalletsTypesEnum = exports.WalletsApi = void 0;
26
26
  const runtime = require("../runtime");
27
27
  const index_1 = require("../models/index");
28
28
  /**
@@ -110,6 +110,48 @@ class WalletsApi extends runtime.BaseAPI {
110
110
  return yield response.value();
111
111
  });
112
112
  }
113
+ /**
114
+ * Fetch / create a deposit address for given wallet-id and currency-id
115
+ * Fetch / create a deposit address
116
+ */
117
+ getDepositAddressRaw(requestParameters, initOverrides) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ if (requestParameters['authorization'] == null) {
120
+ throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getDepositAddress().');
121
+ }
122
+ if (requestParameters['id'] == null) {
123
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getDepositAddress().');
124
+ }
125
+ if (requestParameters['currencyId'] == null) {
126
+ throw new runtime.RequiredError('currencyId', 'Required parameter "currencyId" was null or undefined when calling getDepositAddress().');
127
+ }
128
+ const queryParameters = {};
129
+ if (requestParameters['currencyId'] != null) {
130
+ queryParameters['currencyId'] = requestParameters['currencyId'];
131
+ }
132
+ const headerParameters = {};
133
+ if (requestParameters['authorization'] != null) {
134
+ headerParameters['authorization'] = String(requestParameters['authorization']);
135
+ }
136
+ const response = yield this.request({
137
+ path: `/wallets/{id}/deposit/address`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
138
+ method: 'GET',
139
+ headers: headerParameters,
140
+ query: queryParameters,
141
+ }, initOverrides);
142
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DepositAddressResponseFromJSON)(jsonValue));
143
+ });
144
+ }
145
+ /**
146
+ * Fetch / create a deposit address for given wallet-id and currency-id
147
+ * Fetch / create a deposit address
148
+ */
149
+ getDepositAddress(requestParameters, initOverrides) {
150
+ return __awaiter(this, void 0, void 0, function* () {
151
+ const response = yield this.getDepositAddressRaw(requestParameters, initOverrides);
152
+ return yield response.value();
153
+ });
154
+ }
113
155
  /**
114
156
  * Fetch a list of market positions for the specified wallet, filtered by market ids
115
157
  * Get Market Positions
@@ -294,7 +336,7 @@ class WalletsApi extends runtime.BaseAPI {
294
336
  });
295
337
  }
296
338
  /**
297
- * Fetch a list of wallets for the current user, filtered by the provided walletFilter param
339
+ * Fetch a page of wallets for the current application
298
340
  * Fetch a list of wallets
299
341
  */
300
342
  getWalletsRaw(requestParameters, initOverrides) {
@@ -306,6 +348,9 @@ class WalletsApi extends runtime.BaseAPI {
306
348
  if (requestParameters['walletIds'] != null) {
307
349
  queryParameters['walletIds'] = requestParameters['walletIds'];
308
350
  }
351
+ if (requestParameters['types'] != null) {
352
+ queryParameters['types'] = requestParameters['types'];
353
+ }
309
354
  if (requestParameters['page'] != null) {
310
355
  queryParameters['page'] = requestParameters['page'];
311
356
  }
@@ -329,7 +374,7 @@ class WalletsApi extends runtime.BaseAPI {
329
374
  });
330
375
  }
331
376
  /**
332
- * Fetch a list of wallets for the current user, filtered by the provided walletFilter param
377
+ * Fetch a page of wallets for the current application
333
378
  * Fetch a list of wallets
334
379
  */
335
380
  getWallets(requestParameters, initOverrides) {
@@ -339,19 +384,64 @@ class WalletsApi extends runtime.BaseAPI {
339
384
  });
340
385
  }
341
386
  /**
342
- * Withdraw Funds for the current user\'s wallet
343
- * Withdraw Funds
387
+ * Create and process a deposit request for given external address, wallet id and currency id
388
+ * Create a deposit request
344
389
  */
345
- walletWithdrawRaw(requestParameters, initOverrides) {
390
+ requestDepositRaw(requestParameters, initOverrides) {
346
391
  return __awaiter(this, void 0, void 0, function* () {
347
392
  if (requestParameters['authorization'] == null) {
348
- throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling walletWithdraw().');
393
+ throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling requestDeposit().');
349
394
  }
350
395
  if (requestParameters['id'] == null) {
351
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling walletWithdraw().');
396
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling requestDeposit().');
397
+ }
398
+ if (requestParameters['depositRequestRequest'] == null) {
399
+ throw new runtime.RequiredError('depositRequestRequest', 'Required parameter "depositRequestRequest" was null or undefined when calling requestDeposit().');
352
400
  }
353
401
  const queryParameters = {};
354
402
  const headerParameters = {};
403
+ headerParameters['Content-Type'] = 'application/json';
404
+ if (requestParameters['authorization'] != null) {
405
+ headerParameters['authorization'] = String(requestParameters['authorization']);
406
+ }
407
+ const response = yield this.request({
408
+ path: `/wallets/{id}/deposit`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
409
+ method: 'POST',
410
+ headers: headerParameters,
411
+ query: queryParameters,
412
+ body: (0, index_1.DepositRequestRequestToJSON)(requestParameters['depositRequestRequest']),
413
+ }, initOverrides);
414
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DepositRequestResponseFromJSON)(jsonValue));
415
+ });
416
+ }
417
+ /**
418
+ * Create and process a deposit request for given external address, wallet id and currency id
419
+ * Create a deposit request
420
+ */
421
+ requestDeposit(requestParameters, initOverrides) {
422
+ return __awaiter(this, void 0, void 0, function* () {
423
+ const response = yield this.requestDepositRaw(requestParameters, initOverrides);
424
+ return yield response.value();
425
+ });
426
+ }
427
+ /**
428
+ * Request to withdraw funds to an external address from the current wallet
429
+ * Request to withdraw Funds
430
+ */
431
+ requestWithdrawalRaw(requestParameters, initOverrides) {
432
+ return __awaiter(this, void 0, void 0, function* () {
433
+ if (requestParameters['authorization'] == null) {
434
+ throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling requestWithdrawal().');
435
+ }
436
+ if (requestParameters['id'] == null) {
437
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling requestWithdrawal().');
438
+ }
439
+ if (requestParameters['withdrawalRequestRequest'] == null) {
440
+ throw new runtime.RequiredError('withdrawalRequestRequest', 'Required parameter "withdrawalRequestRequest" was null or undefined when calling requestWithdrawal().');
441
+ }
442
+ const queryParameters = {};
443
+ const headerParameters = {};
444
+ headerParameters['Content-Type'] = 'application/json';
355
445
  if (requestParameters['authorization'] != null) {
356
446
  headerParameters['authorization'] = String(requestParameters['authorization']);
357
447
  }
@@ -360,18 +450,28 @@ class WalletsApi extends runtime.BaseAPI {
360
450
  method: 'POST',
361
451
  headers: headerParameters,
362
452
  query: queryParameters,
453
+ body: (0, index_1.WithdrawalRequestRequestToJSON)(requestParameters['withdrawalRequestRequest']),
363
454
  }, initOverrides);
364
455
  return new runtime.VoidApiResponse(response);
365
456
  });
366
457
  }
367
458
  /**
368
- * Withdraw Funds for the current user\'s wallet
369
- * Withdraw Funds
459
+ * Request to withdraw funds to an external address from the current wallet
460
+ * Request to withdraw Funds
370
461
  */
371
- walletWithdraw(requestParameters, initOverrides) {
462
+ requestWithdrawal(requestParameters, initOverrides) {
372
463
  return __awaiter(this, void 0, void 0, function* () {
373
- yield this.walletWithdrawRaw(requestParameters, initOverrides);
464
+ yield this.requestWithdrawalRaw(requestParameters, initOverrides);
374
465
  });
375
466
  }
376
467
  }
377
468
  exports.WalletsApi = WalletsApi;
469
+ /**
470
+ * @export
471
+ */
472
+ exports.GetWalletsTypesEnum = {
473
+ Commission: 'Commission',
474
+ MarketEscrow: 'MarketEscrow',
475
+ System: 'System',
476
+ User: 'User'
477
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Monaco API
3
+ * A RESTful API that allows you to interact with the Monaco Exchange. Provides endpoints for managing Events, Markets, Sessions, Wallets and Orders. To interact with the API, a client must have an App Id and an API Key to authenticate and create a session.
4
+ *
5
+ * The version of the OpenAPI document: 0.1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { CreateOrderRequest } from './CreateOrderRequest';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface BatchCreateOrderRequest
17
+ */
18
+ export interface BatchCreateOrderRequest {
19
+ /**
20
+ * list of individual order requests
21
+ * @type {Array<CreateOrderRequest>}
22
+ * @memberof BatchCreateOrderRequest
23
+ */
24
+ requests?: Array<CreateOrderRequest>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the BatchCreateOrderRequest interface.
28
+ */
29
+ export declare function instanceOfBatchCreateOrderRequest(value: object): value is BatchCreateOrderRequest;
30
+ export declare function BatchCreateOrderRequestFromJSON(json: any): BatchCreateOrderRequest;
31
+ export declare function BatchCreateOrderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BatchCreateOrderRequest;
32
+ export declare function BatchCreateOrderRequestToJSON(json: any): BatchCreateOrderRequest;
33
+ export declare function BatchCreateOrderRequestToJSONTyped(value?: BatchCreateOrderRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Monaco API
6
+ * A RESTful API that allows you to interact with the Monaco Exchange. Provides endpoints for managing Events, Markets, Sessions, Wallets and Orders. To interact with the API, a client must have an App Id and an API Key to authenticate and create a session.
7
+ *
8
+ * The version of the OpenAPI document: 0.1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfBatchCreateOrderRequest = instanceOfBatchCreateOrderRequest;
17
+ exports.BatchCreateOrderRequestFromJSON = BatchCreateOrderRequestFromJSON;
18
+ exports.BatchCreateOrderRequestFromJSONTyped = BatchCreateOrderRequestFromJSONTyped;
19
+ exports.BatchCreateOrderRequestToJSON = BatchCreateOrderRequestToJSON;
20
+ exports.BatchCreateOrderRequestToJSONTyped = BatchCreateOrderRequestToJSONTyped;
21
+ const CreateOrderRequest_1 = require("./CreateOrderRequest");
22
+ /**
23
+ * Check if a given object implements the BatchCreateOrderRequest interface.
24
+ */
25
+ function instanceOfBatchCreateOrderRequest(value) {
26
+ return true;
27
+ }
28
+ function BatchCreateOrderRequestFromJSON(json) {
29
+ return BatchCreateOrderRequestFromJSONTyped(json, false);
30
+ }
31
+ function BatchCreateOrderRequestFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'requests': json['requests'] == null ? undefined : (json['requests'].map(CreateOrderRequest_1.CreateOrderRequestFromJSON)),
37
+ };
38
+ }
39
+ function BatchCreateOrderRequestToJSON(json) {
40
+ return BatchCreateOrderRequestToJSONTyped(json, false);
41
+ }
42
+ function BatchCreateOrderRequestToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'requests': value['requests'] == null ? undefined : (value['requests'].map(CreateOrderRequest_1.CreateOrderRequestToJSON)),
48
+ };
49
+ }