@monaco-protocol/client-v2 0.0.64 → 0.0.65-dev.2
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/apis/PricesApi.d.ts +61 -0
- package/dist/apis/PricesApi.js +110 -0
- package/dist/apis/WalletsApi.d.ts +39 -8
- package/dist/apis/WalletsApi.js +100 -11
- package/dist/models/DepositAddress.d.ts +44 -0
- package/dist/models/DepositAddress.js +52 -0
- package/dist/models/DepositAddressResponse.d.ts +40 -0
- package/dist/models/DepositAddressResponse.js +52 -0
- package/dist/models/DepositRequest.d.ts +44 -0
- package/dist/models/DepositRequest.js +52 -0
- package/dist/models/DepositRequestRequest.d.ts +38 -0
- package/dist/models/DepositRequestRequest.js +54 -0
- package/dist/models/DepositRequestResponse.d.ts +40 -0
- package/dist/models/DepositRequestResponse.js +52 -0
- package/dist/models/Meta.d.ts +3 -0
- package/dist/models/Meta.js +4 -1
- package/dist/models/PagedMarketWithPricesResponse.d.ts +96 -0
- package/dist/models/PagedMarketWithPricesResponse.js +76 -0
- package/dist/models/WithdrawalRequest.d.ts +92 -0
- package/dist/models/WithdrawalRequest.js +83 -0
- package/dist/models/WithdrawalRequestRequest.d.ts +44 -0
- package/dist/models/WithdrawalRequestRequest.js +56 -0
- package/dist/models/WithdrawalRequestResponse.d.ts +40 -0
- package/dist/models/WithdrawalRequestResponse.js +52 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/package.json +1 -1
|
@@ -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, WithdrawalRequestResponse } 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;
|
|
@@ -53,9 +58,15 @@ export interface GetWalletsRequest {
|
|
|
53
58
|
size?: number;
|
|
54
59
|
sort?: Array<string>;
|
|
55
60
|
}
|
|
56
|
-
export interface
|
|
61
|
+
export interface RequestDepositRequest {
|
|
57
62
|
authorization: string;
|
|
58
63
|
id: string;
|
|
64
|
+
depositRequestRequest: DepositRequestRequest;
|
|
65
|
+
}
|
|
66
|
+
export interface RequestWithdrawalRequest {
|
|
67
|
+
authorization: string;
|
|
68
|
+
id: string;
|
|
69
|
+
withdrawalRequestRequest: WithdrawalRequestRequest;
|
|
59
70
|
}
|
|
60
71
|
/**
|
|
61
72
|
*
|
|
@@ -79,6 +90,16 @@ export declare class WalletsApi extends runtime.BaseAPI {
|
|
|
79
90
|
* Credit wallet with 1000 units of a given currency
|
|
80
91
|
*/
|
|
81
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>;
|
|
82
103
|
/**
|
|
83
104
|
* Fetch a list of market positions for the specified wallet, filtered by market ids
|
|
84
105
|
* Get Market Positions
|
|
@@ -130,15 +151,25 @@ export declare class WalletsApi extends runtime.BaseAPI {
|
|
|
130
151
|
*/
|
|
131
152
|
getWallets(requestParameters: GetWalletsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PagedWalletResponse>;
|
|
132
153
|
/**
|
|
133
|
-
*
|
|
134
|
-
*
|
|
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
|
|
161
|
+
*/
|
|
162
|
+
requestDeposit(requestParameters: RequestDepositRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DepositRequestResponse>;
|
|
163
|
+
/**
|
|
164
|
+
* Request to withdraw funds to an external address from the current wallet
|
|
165
|
+
* Request to withdraw Funds
|
|
135
166
|
*/
|
|
136
|
-
|
|
167
|
+
requestWithdrawalRaw(requestParameters: RequestWithdrawalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WithdrawalRequestResponse>>;
|
|
137
168
|
/**
|
|
138
|
-
*
|
|
139
|
-
*
|
|
169
|
+
* Request to withdraw funds to an external address from the current wallet
|
|
170
|
+
* Request to withdraw Funds
|
|
140
171
|
*/
|
|
141
|
-
|
|
172
|
+
requestWithdrawal(requestParameters: RequestWithdrawalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WithdrawalRequestResponse>;
|
|
142
173
|
}
|
|
143
174
|
/**
|
|
144
175
|
* @export
|
package/dist/apis/WalletsApi.js
CHANGED
|
@@ -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}/deposits/addresses`.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
|
|
@@ -342,38 +384,85 @@ class WalletsApi extends runtime.BaseAPI {
|
|
|
342
384
|
});
|
|
343
385
|
}
|
|
344
386
|
/**
|
|
345
|
-
*
|
|
346
|
-
*
|
|
387
|
+
* Create and process a deposit request for given external address, wallet id and currency id
|
|
388
|
+
* Create a deposit request
|
|
347
389
|
*/
|
|
348
|
-
|
|
390
|
+
requestDepositRaw(requestParameters, initOverrides) {
|
|
349
391
|
return __awaiter(this, void 0, void 0, function* () {
|
|
350
392
|
if (requestParameters['authorization'] == null) {
|
|
351
|
-
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling
|
|
393
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling requestDeposit().');
|
|
352
394
|
}
|
|
353
395
|
if (requestParameters['id'] == null) {
|
|
354
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling
|
|
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().');
|
|
400
|
+
}
|
|
401
|
+
const queryParameters = {};
|
|
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}/deposits`.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().');
|
|
355
441
|
}
|
|
356
442
|
const queryParameters = {};
|
|
357
443
|
const headerParameters = {};
|
|
444
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
358
445
|
if (requestParameters['authorization'] != null) {
|
|
359
446
|
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
360
447
|
}
|
|
361
448
|
const response = yield this.request({
|
|
362
|
-
path: `/wallets/{id}/
|
|
449
|
+
path: `/wallets/{id}/withdrawals`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
363
450
|
method: 'POST',
|
|
364
451
|
headers: headerParameters,
|
|
365
452
|
query: queryParameters,
|
|
453
|
+
body: (0, index_1.WithdrawalRequestRequestToJSON)(requestParameters['withdrawalRequestRequest']),
|
|
366
454
|
}, initOverrides);
|
|
367
|
-
return new runtime.
|
|
455
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WithdrawalRequestResponseFromJSON)(jsonValue));
|
|
368
456
|
});
|
|
369
457
|
}
|
|
370
458
|
/**
|
|
371
|
-
*
|
|
372
|
-
*
|
|
459
|
+
* Request to withdraw funds to an external address from the current wallet
|
|
460
|
+
* Request to withdraw Funds
|
|
373
461
|
*/
|
|
374
|
-
|
|
462
|
+
requestWithdrawal(requestParameters, initOverrides) {
|
|
375
463
|
return __awaiter(this, void 0, void 0, function* () {
|
|
376
|
-
yield this.
|
|
464
|
+
const response = yield this.requestWithdrawalRaw(requestParameters, initOverrides);
|
|
465
|
+
return yield response.value();
|
|
377
466
|
});
|
|
378
467
|
}
|
|
379
468
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface DepositAddress
|
|
16
|
+
*/
|
|
17
|
+
export interface DepositAddress {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof DepositAddress
|
|
22
|
+
*/
|
|
23
|
+
networkId?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof DepositAddress
|
|
28
|
+
*/
|
|
29
|
+
walletId?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof DepositAddress
|
|
34
|
+
*/
|
|
35
|
+
address?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the DepositAddress interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfDepositAddress(value: object): value is DepositAddress;
|
|
41
|
+
export declare function DepositAddressFromJSON(json: any): DepositAddress;
|
|
42
|
+
export declare function DepositAddressFromJSONTyped(json: any, ignoreDiscriminator: boolean): DepositAddress;
|
|
43
|
+
export declare function DepositAddressToJSON(json: any): DepositAddress;
|
|
44
|
+
export declare function DepositAddressToJSONTyped(value?: DepositAddress | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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.instanceOfDepositAddress = instanceOfDepositAddress;
|
|
17
|
+
exports.DepositAddressFromJSON = DepositAddressFromJSON;
|
|
18
|
+
exports.DepositAddressFromJSONTyped = DepositAddressFromJSONTyped;
|
|
19
|
+
exports.DepositAddressToJSON = DepositAddressToJSON;
|
|
20
|
+
exports.DepositAddressToJSONTyped = DepositAddressToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the DepositAddress interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfDepositAddress(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function DepositAddressFromJSON(json) {
|
|
28
|
+
return DepositAddressFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function DepositAddressFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'networkId': json['networkId'] == null ? undefined : json['networkId'],
|
|
36
|
+
'walletId': json['walletId'] == null ? undefined : json['walletId'],
|
|
37
|
+
'address': json['address'] == null ? undefined : json['address'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function DepositAddressToJSON(json) {
|
|
41
|
+
return DepositAddressToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function DepositAddressToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'networkId': value['networkId'],
|
|
49
|
+
'walletId': value['walletId'],
|
|
50
|
+
'address': value['address'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { Meta } from './Meta';
|
|
13
|
+
import type { DepositAddress } from './DepositAddress';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface DepositAddressResponse
|
|
18
|
+
*/
|
|
19
|
+
export interface DepositAddressResponse {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {Meta}
|
|
23
|
+
* @memberof DepositAddressResponse
|
|
24
|
+
*/
|
|
25
|
+
meta?: Meta;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {Array<DepositAddress>}
|
|
29
|
+
* @memberof DepositAddressResponse
|
|
30
|
+
*/
|
|
31
|
+
depositAddresses?: Array<DepositAddress>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the DepositAddressResponse interface.
|
|
35
|
+
*/
|
|
36
|
+
export declare function instanceOfDepositAddressResponse(value: object): value is DepositAddressResponse;
|
|
37
|
+
export declare function DepositAddressResponseFromJSON(json: any): DepositAddressResponse;
|
|
38
|
+
export declare function DepositAddressResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DepositAddressResponse;
|
|
39
|
+
export declare function DepositAddressResponseToJSON(json: any): DepositAddressResponse;
|
|
40
|
+
export declare function DepositAddressResponseToJSONTyped(value?: DepositAddressResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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.instanceOfDepositAddressResponse = instanceOfDepositAddressResponse;
|
|
17
|
+
exports.DepositAddressResponseFromJSON = DepositAddressResponseFromJSON;
|
|
18
|
+
exports.DepositAddressResponseFromJSONTyped = DepositAddressResponseFromJSONTyped;
|
|
19
|
+
exports.DepositAddressResponseToJSON = DepositAddressResponseToJSON;
|
|
20
|
+
exports.DepositAddressResponseToJSONTyped = DepositAddressResponseToJSONTyped;
|
|
21
|
+
const Meta_1 = require("./Meta");
|
|
22
|
+
const DepositAddress_1 = require("./DepositAddress");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the DepositAddressResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfDepositAddressResponse(value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function DepositAddressResponseFromJSON(json) {
|
|
30
|
+
return DepositAddressResponseFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function DepositAddressResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'meta': json['_meta'] == null ? undefined : (0, Meta_1.MetaFromJSON)(json['_meta']),
|
|
38
|
+
'depositAddresses': json['depositAddresses'] == null ? undefined : (json['depositAddresses'].map(DepositAddress_1.DepositAddressFromJSON)),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function DepositAddressResponseToJSON(json) {
|
|
42
|
+
return DepositAddressResponseToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function DepositAddressResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'_meta': (0, Meta_1.MetaToJSON)(value['meta']),
|
|
50
|
+
'depositAddresses': value['depositAddresses'] == null ? undefined : (value['depositAddresses'].map(DepositAddress_1.DepositAddressToJSON)),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface DepositRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface DepositRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof DepositRequest
|
|
22
|
+
*/
|
|
23
|
+
id?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof DepositRequest
|
|
28
|
+
*/
|
|
29
|
+
address?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof DepositRequest
|
|
34
|
+
*/
|
|
35
|
+
currencyId?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the DepositRequest interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfDepositRequest(value: object): value is DepositRequest;
|
|
41
|
+
export declare function DepositRequestFromJSON(json: any): DepositRequest;
|
|
42
|
+
export declare function DepositRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DepositRequest;
|
|
43
|
+
export declare function DepositRequestToJSON(json: any): DepositRequest;
|
|
44
|
+
export declare function DepositRequestToJSONTyped(value?: DepositRequest | null, ignoreDiscriminator?: boolean): any;
|