@monaco-protocol/client-v2 0.0.2-dev.0 → 0.0.2-dev.10
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/README.md +32 -26
- package/dist/apis/{MonacoAPIAPIKeyManagementApi.d.ts → APIKeyManagementApi.d.ts} +4 -4
- package/dist/apis/{MonacoAPIAPIKeyManagementApi.js → APIKeyManagementApi.js} +8 -8
- package/dist/apis/{MonacoAPIAppManagementApi.d.ts → AppManagementApi.d.ts} +7 -7
- package/dist/apis/{MonacoAPIAppManagementApi.js → AppManagementApi.js} +12 -12
- package/dist/apis/{MonacoAPICurrenciesApi.d.ts → CurrenciesApi.d.ts} +5 -5
- package/dist/apis/{MonacoAPICurrenciesApi.js → CurrenciesApi.js} +8 -8
- package/dist/apis/EventCategoriesApi.d.ts +53 -0
- package/dist/apis/{MonacoAPIEventCategoriesApi.js → EventCategoriesApi.js} +17 -17
- package/dist/apis/EventGroupsApi.d.ts +54 -0
- package/dist/apis/{MonacoAPIEventGroupsApi.js → EventGroupsApi.js} +19 -19
- package/dist/apis/EventSubcategoriesApi.d.ts +105 -0
- package/dist/apis/EventSubcategoriesApi.js +287 -0
- package/dist/apis/EventsApi.d.ts +175 -0
- package/dist/apis/EventsApi.js +477 -0
- package/dist/apis/HeartbeatManagementApi.d.ts +52 -0
- package/dist/apis/{MonacoAPIEventSubcategoriesApi.js → HeartbeatManagementApi.js} +35 -41
- package/dist/apis/MarketPricesApi.d.ts +41 -0
- package/dist/apis/MarketPricesApi.js +101 -0
- package/dist/apis/{MonacoAPIMarketTypesApi.d.ts → MarketTypesApi.d.ts} +1 -1
- package/dist/apis/{MonacoAPIMarketTypesApi.js → MarketTypesApi.js} +3 -3
- package/dist/apis/{MonacoAPIMarketsApi.d.ts → MarketsApi.d.ts} +79 -25
- package/dist/apis/{MonacoAPIMarketsApi.js → MarketsApi.js} +158 -16
- package/dist/apis/{MonacoAPIOrdersApi.d.ts → OrdersApi.d.ts} +53 -19
- package/dist/apis/{MonacoAPIOrdersApi.js → OrdersApi.js} +110 -11
- package/dist/apis/SessionManagementApi.d.ts +40 -0
- package/dist/apis/{MonacoAPISessionManagementApi.js → SessionManagementApi.js} +15 -15
- package/dist/apis/{MonacoAPIAPIStatusApi.d.ts → StatusApi.d.ts} +1 -1
- package/dist/apis/{MonacoAPIAPIStatusApi.js → StatusApi.js} +3 -3
- package/dist/apis/{MonacoAPITradesApi.d.ts → TradesApi.d.ts} +9 -6
- package/dist/apis/{MonacoAPITradesApi.js → TradesApi.js} +15 -3
- package/dist/apis/{MonacoAPIWalletsApi.d.ts → WalletsApi.d.ts} +24 -5
- package/dist/apis/{MonacoAPIWalletsApi.js → WalletsApi.js} +57 -3
- package/dist/apis/index.d.ts +16 -14
- package/dist/apis/index.js +16 -14
- package/dist/models/AddMarketOutcomeRequest.d.ts +1 -1
- package/dist/models/AddMarketOutcomeRequest.js +2 -2
- package/dist/models/AddParticipantRequest.d.ts +52 -0
- package/dist/models/AddParticipantRequest.js +60 -0
- package/dist/models/AddParticipantsRequest.d.ts +33 -0
- package/dist/models/AddParticipantsRequest.js +49 -0
- package/dist/models/ChunkOrderResponse.d.ts +67 -0
- package/dist/models/ChunkOrderResponse.js +63 -0
- package/dist/models/CommissionRate.d.ts +2 -2
- package/dist/models/CreateEventRequest.d.ts +5 -5
- package/dist/models/CreateEventRequest.js +16 -6
- package/dist/models/CreateMarketRequest.d.ts +2 -2
- package/dist/models/CreateOrderRequest.d.ts +13 -4
- package/dist/models/CreateOrderRequest.js +4 -2
- package/dist/models/CreateSessionRequest.d.ts +2 -2
- package/dist/models/CreateSessionRequest.js +6 -2
- package/dist/models/CreateWalletRequest.d.ts +0 -16
- package/dist/models/CreateWalletRequest.js +0 -12
- package/dist/models/Currency.d.ts +2 -2
- package/dist/models/DocumentReference.js +4 -4
- package/dist/models/Event.d.ts +8 -2
- package/dist/models/Event.js +2 -0
- package/dist/models/EventParticipant.d.ts +52 -0
- package/dist/models/EventParticipant.js +60 -0
- package/dist/models/EventParticipantsResponse.d.ts +40 -0
- package/dist/models/EventParticipantsResponse.js +52 -0
- package/dist/models/EventResponse.d.ts +7 -0
- package/dist/models/EventResponse.js +3 -0
- package/dist/models/EventSummary.d.ts +2 -2
- package/dist/models/EventUpdateResponse.d.ts +40 -0
- package/dist/models/EventUpdateResponse.js +52 -0
- package/dist/models/Heartbeat.d.ts +50 -0
- package/dist/models/Heartbeat.js +54 -0
- package/dist/models/HeartbeatResponse.d.ts +40 -0
- package/dist/models/HeartbeatResponse.js +52 -0
- package/dist/models/Market.d.ts +21 -12
- package/dist/models/Market.js +13 -5
- package/dist/models/MarketLiquidities.d.ts +39 -0
- package/dist/models/MarketLiquidities.js +51 -0
- package/dist/models/MarketLiquiditiesResponse.d.ts +40 -0
- package/dist/models/MarketLiquiditiesResponse.js +52 -0
- package/dist/models/MarketLiquidity.d.ts +2 -2
- package/dist/models/MarketLiquidity.js +2 -2
- package/dist/models/MarketOutcomeResult.d.ts +38 -0
- package/dist/models/MarketOutcomeResult.js +50 -0
- package/dist/models/MarketOutcomeSummary.d.ts +9 -3
- package/dist/models/MarketOutcomeSummary.js +4 -2
- package/dist/models/MarketPosition.d.ts +4 -2
- package/dist/models/MarketPriceLadder.d.ts +32 -0
- package/dist/models/MarketPriceLadder.js +48 -0
- package/dist/models/MarketPriceLadderResponse.d.ts +40 -0
- package/dist/models/MarketPriceLadderResponse.js +52 -0
- package/dist/models/MarketResultRequest.d.ts +3 -3
- package/dist/models/MarketResultRequest.js +3 -3
- package/dist/models/MarketSummary.d.ts +32 -4
- package/dist/models/MarketSummary.js +18 -3
- package/dist/models/MarketUpdateResponse.d.ts +40 -0
- package/dist/models/MarketUpdateResponse.js +52 -0
- package/dist/models/Meta.d.ts +36 -1
- package/dist/models/Meta.js +31 -0
- package/dist/models/ModifyParticipantsRequest.d.ts +32 -0
- package/dist/models/ModifyParticipantsRequest.js +48 -0
- package/dist/models/Order.d.ts +35 -6
- package/dist/models/Order.js +17 -3
- package/dist/models/OrderResponse.d.ts +7 -0
- package/dist/models/OrderResponse.js +3 -0
- package/dist/models/OrderSummary.d.ts +33 -4
- package/dist/models/OrderSummary.js +17 -3
- package/dist/models/OutcomeResult.d.ts +2 -2
- package/dist/models/PageMeta.d.ts +50 -0
- package/dist/models/PageMeta.js +54 -0
- package/dist/models/Pageable.d.ts +44 -0
- package/dist/models/Pageable.js +52 -0
- package/dist/models/PagedEventResponse.d.ts +3 -20
- package/dist/models/PagedEventResponse.js +3 -8
- package/dist/models/PagedMarketPositionResponse.d.ts +0 -24
- package/dist/models/PagedMarketPositionResponse.js +0 -8
- package/dist/models/PagedOrderResponse.d.ts +3 -20
- package/dist/models/PagedOrderResponse.js +3 -8
- package/dist/models/PagedTradeResponse.d.ts +0 -24
- package/dist/models/PagedTradeResponse.js +0 -8
- package/dist/models/PagedTransactionResponse.d.ts +0 -24
- package/dist/models/PagedTransactionResponse.js +0 -8
- package/dist/models/Participant.d.ts +58 -0
- package/dist/models/Participant.js +62 -0
- package/dist/models/ParticipantsResponse.d.ts +40 -0
- package/dist/models/ParticipantsResponse.js +52 -0
- package/dist/models/ToggleActionRequest.d.ts +1 -1
- package/dist/models/Trade.d.ts +4 -4
- package/dist/models/Trade.js +2 -2
- package/dist/models/TradeSummary.d.ts +44 -0
- package/dist/models/TradeSummary.js +52 -0
- package/dist/models/Transaction.d.ts +3 -2
- package/dist/models/Transaction.js +2 -1
- package/dist/models/UpdateDateRequest.d.ts +32 -0
- package/dist/models/UpdateDateRequest.js +50 -0
- package/dist/models/UpdateHeartbeatRequest.d.ts +38 -0
- package/dist/models/UpdateHeartbeatRequest.js +52 -0
- package/dist/models/UpdateNameRequest.d.ts +32 -0
- package/dist/models/UpdateNameRequest.js +50 -0
- package/dist/models/WalletBalance.d.ts +2 -2
- package/dist/models/index.d.ts +22 -2
- package/dist/models/index.js +22 -2
- package/package.json +6 -2
- package/dist/apis/MonacoAPIEventCategoriesApi.d.ts +0 -53
- package/dist/apis/MonacoAPIEventGroupsApi.d.ts +0 -54
- package/dist/apis/MonacoAPIEventSubcategoriesApi.d.ts +0 -54
- package/dist/apis/MonacoAPIEventsApi.d.ts +0 -68
- package/dist/apis/MonacoAPIEventsApi.js +0 -158
- package/dist/apis/MonacoAPISessionManagementApi.d.ts +0 -40
|
@@ -22,20 +22,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
25
|
+
exports.SessionManagementApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const index_1 = require("../models/index");
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
|
-
class
|
|
31
|
+
class SessionManagementApi extends runtime.BaseAPI {
|
|
32
32
|
/**
|
|
33
|
-
* Create session for a given
|
|
33
|
+
* Create session for a given credentials
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
createSessionRaw(requestParameters, initOverrides) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
if (requestParameters['createSessionRequest'] == null) {
|
|
38
|
-
throw new runtime.RequiredError('createSessionRequest', 'Required parameter "createSessionRequest" was null or undefined when calling
|
|
38
|
+
throw new runtime.RequiredError('createSessionRequest', 'Required parameter "createSessionRequest" was null or undefined when calling createSession().');
|
|
39
39
|
}
|
|
40
40
|
const queryParameters = {};
|
|
41
41
|
const headerParameters = {};
|
|
@@ -51,21 +51,21 @@ class MonacoAPISessionManagementApi extends runtime.BaseAPI {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
|
-
* Create session for a given
|
|
54
|
+
* Create session for a given credentials
|
|
55
55
|
*/
|
|
56
|
-
|
|
56
|
+
createSession(requestParameters, initOverrides) {
|
|
57
57
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
const response = yield this.
|
|
58
|
+
const response = yield this.createSessionRaw(requestParameters, initOverrides);
|
|
59
59
|
return yield response.value();
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* Refresh session for a given
|
|
63
|
+
* Refresh session for a given token
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
refreshSessionRaw(requestParameters, initOverrides) {
|
|
66
66
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67
67
|
if (requestParameters['refreshSessionRequest'] == null) {
|
|
68
|
-
throw new runtime.RequiredError('refreshSessionRequest', 'Required parameter "refreshSessionRequest" was null or undefined when calling
|
|
68
|
+
throw new runtime.RequiredError('refreshSessionRequest', 'Required parameter "refreshSessionRequest" was null or undefined when calling refreshSession().');
|
|
69
69
|
}
|
|
70
70
|
const queryParameters = {};
|
|
71
71
|
const headerParameters = {};
|
|
@@ -81,13 +81,13 @@ class MonacoAPISessionManagementApi extends runtime.BaseAPI {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
|
-
* Refresh session for a given
|
|
84
|
+
* Refresh session for a given token
|
|
85
85
|
*/
|
|
86
|
-
|
|
86
|
+
refreshSession(requestParameters, initOverrides) {
|
|
87
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
const response = yield this.
|
|
88
|
+
const response = yield this.refreshSessionRaw(requestParameters, initOverrides);
|
|
89
89
|
return yield response.value();
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
exports.
|
|
93
|
+
exports.SessionManagementApi = SessionManagementApi;
|
|
@@ -22,13 +22,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
25
|
+
exports.StatusApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const index_1 = require("../models/index");
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
|
-
class
|
|
31
|
+
class StatusApi extends runtime.BaseAPI {
|
|
32
32
|
/**
|
|
33
33
|
* Exchange status
|
|
34
34
|
*/
|
|
@@ -55,4 +55,4 @@ class MonacoAPIAPIStatusApi extends runtime.BaseAPI {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
exports.
|
|
58
|
+
exports.StatusApi = StatusApi;
|
|
@@ -10,21 +10,24 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type {
|
|
13
|
+
import type { PagedTradeResponse, TradeResponse } from '../models/index';
|
|
14
14
|
export interface GetTradeRequest {
|
|
15
|
-
|
|
15
|
+
authorization: string;
|
|
16
|
+
id: string;
|
|
16
17
|
}
|
|
17
18
|
export interface GetTradesRequest {
|
|
18
19
|
authorization: string;
|
|
19
|
-
marketIds?: Array<
|
|
20
|
+
marketIds?: Array<string>;
|
|
20
21
|
walletIds?: Array<string>;
|
|
21
|
-
orderIds?: Array<
|
|
22
|
-
page?:
|
|
22
|
+
orderIds?: Array<string>;
|
|
23
|
+
page?: number;
|
|
24
|
+
size?: number;
|
|
25
|
+
sort?: Array<string>;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
28
|
*
|
|
26
29
|
*/
|
|
27
|
-
export declare class
|
|
30
|
+
export declare class TradesApi extends runtime.BaseAPI {
|
|
28
31
|
/**
|
|
29
32
|
* Fetch a trade by ID
|
|
30
33
|
*/
|
|
@@ -22,23 +22,29 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
25
|
+
exports.TradesApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const index_1 = require("../models/index");
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
|
-
class
|
|
31
|
+
class TradesApi extends runtime.BaseAPI {
|
|
32
32
|
/**
|
|
33
33
|
* Fetch a trade by ID
|
|
34
34
|
*/
|
|
35
35
|
getTradeRaw(requestParameters, initOverrides) {
|
|
36
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 getTrade().');
|
|
39
|
+
}
|
|
37
40
|
if (requestParameters['id'] == null) {
|
|
38
41
|
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getTrade().');
|
|
39
42
|
}
|
|
40
43
|
const queryParameters = {};
|
|
41
44
|
const headerParameters = {};
|
|
45
|
+
if (requestParameters['authorization'] != null) {
|
|
46
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
47
|
+
}
|
|
42
48
|
const response = yield this.request({
|
|
43
49
|
path: `/trades/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
44
50
|
method: 'GET',
|
|
@@ -78,6 +84,12 @@ class MonacoAPITradesApi extends runtime.BaseAPI {
|
|
|
78
84
|
if (requestParameters['page'] != null) {
|
|
79
85
|
queryParameters['page'] = requestParameters['page'];
|
|
80
86
|
}
|
|
87
|
+
if (requestParameters['size'] != null) {
|
|
88
|
+
queryParameters['size'] = requestParameters['size'];
|
|
89
|
+
}
|
|
90
|
+
if (requestParameters['sort'] != null) {
|
|
91
|
+
queryParameters['sort'] = requestParameters['sort'];
|
|
92
|
+
}
|
|
81
93
|
const headerParameters = {};
|
|
82
94
|
if (requestParameters['authorization'] != null) {
|
|
83
95
|
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
@@ -101,4 +113,4 @@ class MonacoAPITradesApi extends runtime.BaseAPI {
|
|
|
101
113
|
});
|
|
102
114
|
}
|
|
103
115
|
}
|
|
104
|
-
exports.
|
|
116
|
+
exports.TradesApi = TradesApi;
|
|
@@ -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,
|
|
13
|
+
import type { CreateWalletRequest, PagedMarketPositionResponse, PagedTransactionResponse, TransferResponse, WalletResponse } from '../models/index';
|
|
14
14
|
export interface CreateWalletOperationRequest {
|
|
15
15
|
authorization: string;
|
|
16
16
|
createWalletRequest: CreateWalletRequest;
|
|
@@ -18,12 +18,19 @@ export interface CreateWalletOperationRequest {
|
|
|
18
18
|
export interface CreditWalletRequest {
|
|
19
19
|
authorization: string;
|
|
20
20
|
walletId: string;
|
|
21
|
-
currencyId:
|
|
21
|
+
currencyId: string;
|
|
22
22
|
}
|
|
23
23
|
export interface FetchWalletsRequest {
|
|
24
24
|
authorization: string;
|
|
25
25
|
walletFilter?: Array<string>;
|
|
26
|
-
page?:
|
|
26
|
+
page?: number;
|
|
27
|
+
size?: number;
|
|
28
|
+
sort?: Array<string>;
|
|
29
|
+
}
|
|
30
|
+
export interface GetMarketPositionsRequest {
|
|
31
|
+
authorization: string;
|
|
32
|
+
id: string;
|
|
33
|
+
marketIds: Array<string>;
|
|
27
34
|
}
|
|
28
35
|
export interface GetWalletRequest {
|
|
29
36
|
authorization: string;
|
|
@@ -32,7 +39,9 @@ export interface GetWalletRequest {
|
|
|
32
39
|
export interface GetWalletTransactionsRequest {
|
|
33
40
|
authorization: string;
|
|
34
41
|
id: string;
|
|
35
|
-
page?:
|
|
42
|
+
page?: number;
|
|
43
|
+
size?: number;
|
|
44
|
+
sort?: Array<string>;
|
|
36
45
|
}
|
|
37
46
|
export interface WalletWithdrawRequest {
|
|
38
47
|
authorization: string;
|
|
@@ -41,7 +50,7 @@ export interface WalletWithdrawRequest {
|
|
|
41
50
|
/**
|
|
42
51
|
*
|
|
43
52
|
*/
|
|
44
|
-
export declare class
|
|
53
|
+
export declare class WalletsApi extends runtime.BaseAPI {
|
|
45
54
|
/**
|
|
46
55
|
* Creates a wallet that can be used to create orders and receive winnings
|
|
47
56
|
* Create a wallet
|
|
@@ -70,6 +79,16 @@ export declare class MonacoAPIWalletsApi extends runtime.BaseAPI {
|
|
|
70
79
|
* Fetch a list of wallets
|
|
71
80
|
*/
|
|
72
81
|
fetchWallets(requestParameters: FetchWalletsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Fetch a list of market positions for the specified wallet, filtered by market ids
|
|
84
|
+
* Get Market Positions
|
|
85
|
+
*/
|
|
86
|
+
getMarketPositionsRaw(requestParameters: GetMarketPositionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PagedMarketPositionResponse>>;
|
|
87
|
+
/**
|
|
88
|
+
* Fetch a list of market positions for the specified wallet, filtered by market ids
|
|
89
|
+
* Get Market Positions
|
|
90
|
+
*/
|
|
91
|
+
getMarketPositions(requestParameters: GetMarketPositionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PagedMarketPositionResponse>;
|
|
73
92
|
/**
|
|
74
93
|
* Fetch a wallet by id
|
|
75
94
|
* Fetch a wallet by id
|
|
@@ -22,13 +22,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
25
|
+
exports.WalletsApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const index_1 = require("../models/index");
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
|
-
class
|
|
31
|
+
class WalletsApi extends runtime.BaseAPI {
|
|
32
32
|
/**
|
|
33
33
|
* Creates a wallet that can be used to create orders and receive winnings
|
|
34
34
|
* Create a wallet
|
|
@@ -126,6 +126,12 @@ class MonacoAPIWalletsApi extends runtime.BaseAPI {
|
|
|
126
126
|
if (requestParameters['page'] != null) {
|
|
127
127
|
queryParameters['page'] = requestParameters['page'];
|
|
128
128
|
}
|
|
129
|
+
if (requestParameters['size'] != null) {
|
|
130
|
+
queryParameters['size'] = requestParameters['size'];
|
|
131
|
+
}
|
|
132
|
+
if (requestParameters['sort'] != null) {
|
|
133
|
+
queryParameters['sort'] = requestParameters['sort'];
|
|
134
|
+
}
|
|
129
135
|
const headerParameters = {};
|
|
130
136
|
if (requestParameters['authorization'] != null) {
|
|
131
137
|
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
@@ -148,6 +154,48 @@ class MonacoAPIWalletsApi extends runtime.BaseAPI {
|
|
|
148
154
|
yield this.fetchWalletsRaw(requestParameters, initOverrides);
|
|
149
155
|
});
|
|
150
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Fetch a list of market positions for the specified wallet, filtered by market ids
|
|
159
|
+
* Get Market Positions
|
|
160
|
+
*/
|
|
161
|
+
getMarketPositionsRaw(requestParameters, initOverrides) {
|
|
162
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
if (requestParameters['authorization'] == null) {
|
|
164
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getMarketPositions().');
|
|
165
|
+
}
|
|
166
|
+
if (requestParameters['id'] == null) {
|
|
167
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getMarketPositions().');
|
|
168
|
+
}
|
|
169
|
+
if (requestParameters['marketIds'] == null) {
|
|
170
|
+
throw new runtime.RequiredError('marketIds', 'Required parameter "marketIds" was null or undefined when calling getMarketPositions().');
|
|
171
|
+
}
|
|
172
|
+
const queryParameters = {};
|
|
173
|
+
if (requestParameters['marketIds'] != null) {
|
|
174
|
+
queryParameters['marketIds'] = requestParameters['marketIds'];
|
|
175
|
+
}
|
|
176
|
+
const headerParameters = {};
|
|
177
|
+
if (requestParameters['authorization'] != null) {
|
|
178
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
179
|
+
}
|
|
180
|
+
const response = yield this.request({
|
|
181
|
+
path: `/wallets/{id}/positions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
182
|
+
method: 'GET',
|
|
183
|
+
headers: headerParameters,
|
|
184
|
+
query: queryParameters,
|
|
185
|
+
}, initOverrides);
|
|
186
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PagedMarketPositionResponseFromJSON)(jsonValue));
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Fetch a list of market positions for the specified wallet, filtered by market ids
|
|
191
|
+
* Get Market Positions
|
|
192
|
+
*/
|
|
193
|
+
getMarketPositions(requestParameters, initOverrides) {
|
|
194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
195
|
+
const response = yield this.getMarketPositionsRaw(requestParameters, initOverrides);
|
|
196
|
+
return yield response.value();
|
|
197
|
+
});
|
|
198
|
+
}
|
|
151
199
|
/**
|
|
152
200
|
* Fetch a wallet by id
|
|
153
201
|
* Fetch a wallet by id
|
|
@@ -200,6 +248,12 @@ class MonacoAPIWalletsApi extends runtime.BaseAPI {
|
|
|
200
248
|
if (requestParameters['page'] != null) {
|
|
201
249
|
queryParameters['page'] = requestParameters['page'];
|
|
202
250
|
}
|
|
251
|
+
if (requestParameters['size'] != null) {
|
|
252
|
+
queryParameters['size'] = requestParameters['size'];
|
|
253
|
+
}
|
|
254
|
+
if (requestParameters['sort'] != null) {
|
|
255
|
+
queryParameters['sort'] = requestParameters['sort'];
|
|
256
|
+
}
|
|
203
257
|
const headerParameters = {};
|
|
204
258
|
if (requestParameters['authorization'] != null) {
|
|
205
259
|
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
@@ -259,4 +313,4 @@ class MonacoAPIWalletsApi extends runtime.BaseAPI {
|
|
|
259
313
|
});
|
|
260
314
|
}
|
|
261
315
|
}
|
|
262
|
-
exports.
|
|
316
|
+
exports.WalletsApi = WalletsApi;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
1
|
+
export * from './APIKeyManagementApi';
|
|
2
|
+
export * from './AppManagementApi';
|
|
3
|
+
export * from './CurrenciesApi';
|
|
4
|
+
export * from './EventCategoriesApi';
|
|
5
|
+
export * from './EventGroupsApi';
|
|
6
|
+
export * from './EventSubcategoriesApi';
|
|
7
|
+
export * from './EventsApi';
|
|
8
|
+
export * from './HeartbeatManagementApi';
|
|
9
|
+
export * from './MarketPricesApi';
|
|
10
|
+
export * from './MarketTypesApi';
|
|
11
|
+
export * from './MarketsApi';
|
|
12
|
+
export * from './OrdersApi';
|
|
13
|
+
export * from './SessionManagementApi';
|
|
14
|
+
export * from './StatusApi';
|
|
15
|
+
export * from './TradesApi';
|
|
16
|
+
export * from './WalletsApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -16,17 +16,19 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
__exportStar(require("./
|
|
23
|
-
__exportStar(require("./
|
|
24
|
-
__exportStar(require("./
|
|
25
|
-
__exportStar(require("./
|
|
26
|
-
__exportStar(require("./
|
|
27
|
-
__exportStar(require("./
|
|
28
|
-
__exportStar(require("./
|
|
29
|
-
__exportStar(require("./
|
|
30
|
-
__exportStar(require("./
|
|
31
|
-
__exportStar(require("./
|
|
32
|
-
__exportStar(require("./
|
|
19
|
+
__exportStar(require("./APIKeyManagementApi"), exports);
|
|
20
|
+
__exportStar(require("./AppManagementApi"), exports);
|
|
21
|
+
__exportStar(require("./CurrenciesApi"), exports);
|
|
22
|
+
__exportStar(require("./EventCategoriesApi"), exports);
|
|
23
|
+
__exportStar(require("./EventGroupsApi"), exports);
|
|
24
|
+
__exportStar(require("./EventSubcategoriesApi"), exports);
|
|
25
|
+
__exportStar(require("./EventsApi"), exports);
|
|
26
|
+
__exportStar(require("./HeartbeatManagementApi"), exports);
|
|
27
|
+
__exportStar(require("./MarketPricesApi"), exports);
|
|
28
|
+
__exportStar(require("./MarketTypesApi"), exports);
|
|
29
|
+
__exportStar(require("./MarketsApi"), exports);
|
|
30
|
+
__exportStar(require("./OrdersApi"), exports);
|
|
31
|
+
__exportStar(require("./SessionManagementApi"), exports);
|
|
32
|
+
__exportStar(require("./StatusApi"), exports);
|
|
33
|
+
__exportStar(require("./TradesApi"), exports);
|
|
34
|
+
__exportStar(require("./WalletsApi"), exports);
|
|
@@ -32,7 +32,7 @@ function AddMarketOutcomeRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
32
32
|
return json;
|
|
33
33
|
}
|
|
34
34
|
return {
|
|
35
|
-
'
|
|
35
|
+
'title': json['title'] == null ? undefined : json['title'],
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
function AddMarketOutcomeRequestToJSON(json) {
|
|
@@ -43,6 +43,6 @@ function AddMarketOutcomeRequestToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
43
43
|
return value;
|
|
44
44
|
}
|
|
45
45
|
return {
|
|
46
|
-
'
|
|
46
|
+
'title': value['title'],
|
|
47
47
|
};
|
|
48
48
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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 AddParticipantRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface AddParticipantRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AddParticipantRequest
|
|
22
|
+
*/
|
|
23
|
+
code?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof AddParticipantRequest
|
|
28
|
+
*/
|
|
29
|
+
name?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AddParticipantRequest
|
|
34
|
+
*/
|
|
35
|
+
type?: AddParticipantRequestTypeEnum;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const AddParticipantRequestTypeEnum: {
|
|
41
|
+
readonly Individual: "Individual";
|
|
42
|
+
readonly Team: "Team";
|
|
43
|
+
};
|
|
44
|
+
export type AddParticipantRequestTypeEnum = typeof AddParticipantRequestTypeEnum[keyof typeof AddParticipantRequestTypeEnum];
|
|
45
|
+
/**
|
|
46
|
+
* Check if a given object implements the AddParticipantRequest interface.
|
|
47
|
+
*/
|
|
48
|
+
export declare function instanceOfAddParticipantRequest(value: object): value is AddParticipantRequest;
|
|
49
|
+
export declare function AddParticipantRequestFromJSON(json: any): AddParticipantRequest;
|
|
50
|
+
export declare function AddParticipantRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddParticipantRequest;
|
|
51
|
+
export declare function AddParticipantRequestToJSON(json: any): AddParticipantRequest;
|
|
52
|
+
export declare function AddParticipantRequestToJSONTyped(value?: AddParticipantRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,60 @@
|
|
|
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.AddParticipantRequestTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfAddParticipantRequest = instanceOfAddParticipantRequest;
|
|
18
|
+
exports.AddParticipantRequestFromJSON = AddParticipantRequestFromJSON;
|
|
19
|
+
exports.AddParticipantRequestFromJSONTyped = AddParticipantRequestFromJSONTyped;
|
|
20
|
+
exports.AddParticipantRequestToJSON = AddParticipantRequestToJSON;
|
|
21
|
+
exports.AddParticipantRequestToJSONTyped = AddParticipantRequestToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.AddParticipantRequestTypeEnum = {
|
|
26
|
+
Individual: 'Individual',
|
|
27
|
+
Team: 'Team'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the AddParticipantRequest interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfAddParticipantRequest(value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function AddParticipantRequestFromJSON(json) {
|
|
36
|
+
return AddParticipantRequestFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function AddParticipantRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
44
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
45
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function AddParticipantRequestToJSON(json) {
|
|
49
|
+
return AddParticipantRequestToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function AddParticipantRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'code': value['code'],
|
|
57
|
+
'name': value['name'],
|
|
58
|
+
'type': value['type'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -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 { AddParticipantRequest } from './AddParticipantRequest';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AddParticipantsRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface AddParticipantsRequest {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<AddParticipantRequest>}
|
|
22
|
+
* @memberof AddParticipantsRequest
|
|
23
|
+
*/
|
|
24
|
+
participants?: Array<AddParticipantRequest>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the AddParticipantsRequest interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfAddParticipantsRequest(value: object): value is AddParticipantsRequest;
|
|
30
|
+
export declare function AddParticipantsRequestFromJSON(json: any): AddParticipantsRequest;
|
|
31
|
+
export declare function AddParticipantsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddParticipantsRequest;
|
|
32
|
+
export declare function AddParticipantsRequestToJSON(json: any): AddParticipantsRequest;
|
|
33
|
+
export declare function AddParticipantsRequestToJSONTyped(value?: AddParticipantsRequest | 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.instanceOfAddParticipantsRequest = instanceOfAddParticipantsRequest;
|
|
17
|
+
exports.AddParticipantsRequestFromJSON = AddParticipantsRequestFromJSON;
|
|
18
|
+
exports.AddParticipantsRequestFromJSONTyped = AddParticipantsRequestFromJSONTyped;
|
|
19
|
+
exports.AddParticipantsRequestToJSON = AddParticipantsRequestToJSON;
|
|
20
|
+
exports.AddParticipantsRequestToJSONTyped = AddParticipantsRequestToJSONTyped;
|
|
21
|
+
const AddParticipantRequest_1 = require("./AddParticipantRequest");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the AddParticipantsRequest interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfAddParticipantsRequest(value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function AddParticipantsRequestFromJSON(json) {
|
|
29
|
+
return AddParticipantsRequestFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function AddParticipantsRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'participants': json['participants'] == null ? undefined : (json['participants'].map(AddParticipantRequest_1.AddParticipantRequestFromJSON)),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function AddParticipantsRequestToJSON(json) {
|
|
40
|
+
return AddParticipantsRequestToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function AddParticipantsRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'participants': value['participants'] == null ? undefined : (value['participants'].map(AddParticipantRequest_1.AddParticipantRequestToJSON)),
|
|
48
|
+
};
|
|
49
|
+
}
|