@monaco-protocol/client-v2 0.0.2-dev.0
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 +46 -0
- package/dist/apis/MonacoAPIAPIKeyManagementApi.d.ts +54 -0
- package/dist/apis/MonacoAPIAPIKeyManagementApi.js +141 -0
- package/dist/apis/MonacoAPIAPIStatusApi.d.ts +26 -0
- package/dist/apis/MonacoAPIAPIStatusApi.js +58 -0
- package/dist/apis/MonacoAPIAppManagementApi.d.ts +66 -0
- package/dist/apis/MonacoAPIAppManagementApi.js +170 -0
- package/dist/apis/MonacoAPICurrenciesApi.d.ts +45 -0
- package/dist/apis/MonacoAPICurrenciesApi.js +102 -0
- package/dist/apis/MonacoAPIEventCategoriesApi.d.ts +53 -0
- package/dist/apis/MonacoAPIEventCategoriesApi.js +134 -0
- package/dist/apis/MonacoAPIEventGroupsApi.d.ts +54 -0
- package/dist/apis/MonacoAPIEventGroupsApi.js +137 -0
- package/dist/apis/MonacoAPIEventSubcategoriesApi.d.ts +54 -0
- package/dist/apis/MonacoAPIEventSubcategoriesApi.js +137 -0
- package/dist/apis/MonacoAPIEventsApi.d.ts +68 -0
- package/dist/apis/MonacoAPIEventsApi.js +158 -0
- package/dist/apis/MonacoAPIMarketTypesApi.d.ts +53 -0
- package/dist/apis/MonacoAPIMarketTypesApi.js +134 -0
- package/dist/apis/MonacoAPIMarketsApi.d.ts +214 -0
- package/dist/apis/MonacoAPIMarketsApi.js +566 -0
- package/dist/apis/MonacoAPIOrdersApi.d.ts +112 -0
- package/dist/apis/MonacoAPIOrdersApi.js +283 -0
- package/dist/apis/MonacoAPISessionManagementApi.d.ts +40 -0
- package/dist/apis/MonacoAPISessionManagementApi.js +93 -0
- package/dist/apis/MonacoAPITradesApi.d.ts +44 -0
- package/dist/apis/MonacoAPITradesApi.js +104 -0
- package/dist/apis/MonacoAPIWalletsApi.d.ts +103 -0
- package/dist/apis/MonacoAPIWalletsApi.js +262 -0
- package/dist/apis/index.d.ts +14 -0
- package/dist/apis/index.js +32 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/APIKey.d.ts +62 -0
- package/dist/models/APIKey.js +58 -0
- package/dist/models/APIKeyResponse.d.ts +40 -0
- package/dist/models/APIKeyResponse.js +52 -0
- package/dist/models/AddMarketOutcomeRequest.d.ts +32 -0
- package/dist/models/AddMarketOutcomeRequest.js +48 -0
- package/dist/models/App.d.ts +69 -0
- package/dist/models/App.js +61 -0
- package/dist/models/AppResponse.d.ts +47 -0
- package/dist/models/AppResponse.js +55 -0
- package/dist/models/AppStatus.d.ts +44 -0
- package/dist/models/AppStatus.js +52 -0
- package/dist/models/AppStatusResponse.d.ts +40 -0
- package/dist/models/AppStatusResponse.js +52 -0
- package/dist/models/Category.d.ts +50 -0
- package/dist/models/Category.js +54 -0
- package/dist/models/CategoryResponse.d.ts +40 -0
- package/dist/models/CategoryResponse.js +52 -0
- package/dist/models/CategorySummary.d.ts +38 -0
- package/dist/models/CategorySummary.js +50 -0
- package/dist/models/CommissionRate.d.ts +44 -0
- package/dist/models/CommissionRate.js +52 -0
- package/dist/models/CommissionRateResponse.d.ts +40 -0
- package/dist/models/CommissionRateResponse.js +52 -0
- package/dist/models/CreateAPIKeyRequest.d.ts +32 -0
- package/dist/models/CreateAPIKeyRequest.js +48 -0
- package/dist/models/CreateAppRequest.d.ts +38 -0
- package/dist/models/CreateAppRequest.js +50 -0
- package/dist/models/CreateCategoryRequest.d.ts +38 -0
- package/dist/models/CreateCategoryRequest.js +50 -0
- package/dist/models/CreateEventGroupRequest.d.ts +44 -0
- package/dist/models/CreateEventGroupRequest.js +52 -0
- package/dist/models/CreateEventRequest.d.ts +56 -0
- package/dist/models/CreateEventRequest.js +56 -0
- package/dist/models/CreateMarketRequest.d.ts +114 -0
- package/dist/models/CreateMarketRequest.js +85 -0
- package/dist/models/CreateMarketTypeRequest.d.ts +45 -0
- package/dist/models/CreateMarketTypeRequest.js +53 -0
- package/dist/models/CreateOrderRequest.d.ts +96 -0
- package/dist/models/CreateOrderRequest.js +79 -0
- package/dist/models/CreateSessionRequest.d.ts +38 -0
- package/dist/models/CreateSessionRequest.js +50 -0
- package/dist/models/CreateSubcategoryRequest.d.ts +44 -0
- package/dist/models/CreateSubcategoryRequest.js +52 -0
- package/dist/models/CreateWalletRequest.d.ts +54 -0
- package/dist/models/CreateWalletRequest.js +62 -0
- package/dist/models/Currency.d.ts +70 -0
- package/dist/models/Currency.js +66 -0
- package/dist/models/CurrencyResponse.d.ts +40 -0
- package/dist/models/CurrencyResponse.js +52 -0
- package/dist/models/DeactivateAPIKeyRequest.d.ts +38 -0
- package/dist/models/DeactivateAPIKeyRequest.js +50 -0
- package/dist/models/DocumentReference.d.ts +38 -0
- package/dist/models/DocumentReference.js +50 -0
- package/dist/models/Event.d.ts +93 -0
- package/dist/models/Event.js +69 -0
- package/dist/models/EventGroup.d.ts +57 -0
- package/dist/models/EventGroup.js +57 -0
- package/dist/models/EventGroupResponse.d.ts +54 -0
- package/dist/models/EventGroupResponse.js +58 -0
- package/dist/models/EventGroupSummary.d.ts +45 -0
- package/dist/models/EventGroupSummary.js +53 -0
- package/dist/models/EventResponse.d.ts +61 -0
- package/dist/models/EventResponse.js +61 -0
- package/dist/models/EventSummary.d.ts +57 -0
- package/dist/models/EventSummary.js +57 -0
- package/dist/models/Market.d.ts +177 -0
- package/dist/models/Market.js +115 -0
- package/dist/models/MarketLiquidity.d.ts +64 -0
- package/dist/models/MarketLiquidity.js +64 -0
- package/dist/models/MarketLiquidityResponse.d.ts +40 -0
- package/dist/models/MarketLiquidityResponse.js +52 -0
- package/dist/models/MarketOutcomeSummary.d.ts +44 -0
- package/dist/models/MarketOutcomeSummary.js +52 -0
- package/dist/models/MarketPosition.d.ts +45 -0
- package/dist/models/MarketPosition.js +53 -0
- package/dist/models/MarketResponse.d.ts +82 -0
- package/dist/models/MarketResponse.js +70 -0
- package/dist/models/MarketResultRequest.d.ts +33 -0
- package/dist/models/MarketResultRequest.js +49 -0
- package/dist/models/MarketSummary.d.ts +76 -0
- package/dist/models/MarketSummary.js +72 -0
- package/dist/models/MarketType.d.ts +57 -0
- package/dist/models/MarketType.js +57 -0
- package/dist/models/MarketTypeResponse.d.ts +40 -0
- package/dist/models/MarketTypeResponse.js +52 -0
- package/dist/models/MarketTypeSummary.d.ts +45 -0
- package/dist/models/MarketTypeSummary.js +53 -0
- package/dist/models/Meta.d.ts +38 -0
- package/dist/models/Meta.js +50 -0
- package/dist/models/Order.d.ts +125 -0
- package/dist/models/Order.js +85 -0
- package/dist/models/OrderResponse.d.ts +54 -0
- package/dist/models/OrderResponse.js +58 -0
- package/dist/models/OrderSummary.d.ts +89 -0
- package/dist/models/OrderSummary.js +73 -0
- package/dist/models/OutcomeResult.d.ts +38 -0
- package/dist/models/OutcomeResult.js +50 -0
- package/dist/models/PageRequest.d.ts +50 -0
- package/dist/models/PageRequest.js +54 -0
- package/dist/models/PagedEventResponse.d.ts +85 -0
- package/dist/models/PagedEventResponse.js +69 -0
- package/dist/models/PagedMarketPositionResponse.d.ts +71 -0
- package/dist/models/PagedMarketPositionResponse.js +63 -0
- package/dist/models/PagedOrderResponse.d.ts +78 -0
- package/dist/models/PagedOrderResponse.js +66 -0
- package/dist/models/PagedTradeResponse.d.ts +85 -0
- package/dist/models/PagedTradeResponse.js +69 -0
- package/dist/models/PagedTransactionResponse.d.ts +64 -0
- package/dist/models/PagedTransactionResponse.js +60 -0
- package/dist/models/Range.d.ts +38 -0
- package/dist/models/Range.js +50 -0
- package/dist/models/RefreshSessionRequest.d.ts +32 -0
- package/dist/models/RefreshSessionRequest.js +48 -0
- package/dist/models/RenameAPIKeyRequest.d.ts +44 -0
- package/dist/models/RenameAPIKeyRequest.js +52 -0
- package/dist/models/Session.d.ts +50 -0
- package/dist/models/Session.js +54 -0
- package/dist/models/SessionResponse.d.ts +40 -0
- package/dist/models/SessionResponse.js +52 -0
- package/dist/models/Subcategory.d.ts +57 -0
- package/dist/models/Subcategory.js +57 -0
- package/dist/models/SubcategoryResponse.d.ts +47 -0
- package/dist/models/SubcategoryResponse.js +55 -0
- package/dist/models/SubcategorySummary.d.ts +45 -0
- package/dist/models/SubcategorySummary.js +53 -0
- package/dist/models/ToggleActionRequest.d.ts +32 -0
- package/dist/models/ToggleActionRequest.js +48 -0
- package/dist/models/Trade.d.ts +95 -0
- package/dist/models/Trade.js +75 -0
- package/dist/models/TradeResponse.d.ts +61 -0
- package/dist/models/TradeResponse.js +61 -0
- package/dist/models/Transaction.d.ts +81 -0
- package/dist/models/Transaction.js +73 -0
- package/dist/models/TransferResponse.d.ts +46 -0
- package/dist/models/TransferResponse.js +54 -0
- package/dist/models/UpdateAppCommissionRateRequest.d.ts +32 -0
- package/dist/models/UpdateAppCommissionRateRequest.js +48 -0
- package/dist/models/Wallet.d.ts +75 -0
- package/dist/models/Wallet.js +70 -0
- package/dist/models/WalletBalance.d.ts +44 -0
- package/dist/models/WalletBalance.js +52 -0
- package/dist/models/WalletResponse.d.ts +40 -0
- package/dist/models/WalletResponse.js +52 -0
- package/dist/models/index.d.ts +72 -0
- package/dist/models/index.js +90 -0
- package/dist/runtime.d.ts +182 -0
- package/dist/runtime.js +346 -0
- package/package.json +28 -0
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
## @monaco-protocol/client-v2@0.1
|
|
2
|
+
|
|
3
|
+
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
|
+
|
|
5
|
+
Environment
|
|
6
|
+
* Node.js
|
|
7
|
+
* Webpack
|
|
8
|
+
* Browserify
|
|
9
|
+
|
|
10
|
+
Language level
|
|
11
|
+
* ES5 - you must have a Promises/A+ library installed
|
|
12
|
+
* ES6
|
|
13
|
+
|
|
14
|
+
Module system
|
|
15
|
+
* CommonJS
|
|
16
|
+
* ES6 module system
|
|
17
|
+
|
|
18
|
+
It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
|
|
19
|
+
|
|
20
|
+
### Building
|
|
21
|
+
|
|
22
|
+
To build and compile the typescript sources to javascript use:
|
|
23
|
+
```
|
|
24
|
+
npm install
|
|
25
|
+
npm run build
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Publishing
|
|
29
|
+
|
|
30
|
+
First build the package then run `npm publish`
|
|
31
|
+
|
|
32
|
+
### Consuming
|
|
33
|
+
|
|
34
|
+
navigate to the folder of your consuming project and run one of the following commands.
|
|
35
|
+
|
|
36
|
+
_published:_
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
npm install @monaco-protocol/client-v2@0.1 --save
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
_unPublished (not recommended):_
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
npm install PATH_TO_GENERATED_PACKAGE --save
|
|
46
|
+
```
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { APIKeyResponse, CreateAPIKeyRequest, DeactivateAPIKeyRequest, RenameAPIKeyRequest } from '../models/index';
|
|
14
|
+
export interface Create5Request {
|
|
15
|
+
authorization: string;
|
|
16
|
+
createAPIKeyRequest: CreateAPIKeyRequest;
|
|
17
|
+
}
|
|
18
|
+
export interface DeactivateRequest {
|
|
19
|
+
authorization: string;
|
|
20
|
+
deactivateAPIKeyRequest: DeactivateAPIKeyRequest;
|
|
21
|
+
}
|
|
22
|
+
export interface RenameRequest {
|
|
23
|
+
authorization: string;
|
|
24
|
+
renameAPIKeyRequest: RenameAPIKeyRequest;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export declare class MonacoAPIAPIKeyManagementApi extends runtime.BaseAPI {
|
|
30
|
+
/**
|
|
31
|
+
* Create api key
|
|
32
|
+
*/
|
|
33
|
+
create5Raw(requestParameters: Create5Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<APIKeyResponse>>;
|
|
34
|
+
/**
|
|
35
|
+
* Create api key
|
|
36
|
+
*/
|
|
37
|
+
create5(requestParameters: Create5Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<APIKeyResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Deactivate api key
|
|
40
|
+
*/
|
|
41
|
+
deactivateRaw(requestParameters: DeactivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<APIKeyResponse>>;
|
|
42
|
+
/**
|
|
43
|
+
* Deactivate api key
|
|
44
|
+
*/
|
|
45
|
+
deactivate(requestParameters: DeactivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<APIKeyResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Rename api key
|
|
48
|
+
*/
|
|
49
|
+
renameRaw(requestParameters: RenameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<APIKeyResponse>>;
|
|
50
|
+
/**
|
|
51
|
+
* Rename api key
|
|
52
|
+
*/
|
|
53
|
+
rename(requestParameters: RenameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<APIKeyResponse>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
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.MonacoAPIAPIKeyManagementApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class MonacoAPIAPIKeyManagementApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Create api key
|
|
34
|
+
*/
|
|
35
|
+
create5Raw(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 create5().');
|
|
39
|
+
}
|
|
40
|
+
if (requestParameters['createAPIKeyRequest'] == null) {
|
|
41
|
+
throw new runtime.RequiredError('createAPIKeyRequest', 'Required parameter "createAPIKeyRequest" was null or undefined when calling create5().');
|
|
42
|
+
}
|
|
43
|
+
const queryParameters = {};
|
|
44
|
+
const headerParameters = {};
|
|
45
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
46
|
+
if (requestParameters['authorization'] != null) {
|
|
47
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
48
|
+
}
|
|
49
|
+
const response = yield this.request({
|
|
50
|
+
path: `/api-keys`,
|
|
51
|
+
method: 'POST',
|
|
52
|
+
headers: headerParameters,
|
|
53
|
+
query: queryParameters,
|
|
54
|
+
body: (0, index_1.CreateAPIKeyRequestToJSON)(requestParameters['createAPIKeyRequest']),
|
|
55
|
+
}, initOverrides);
|
|
56
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.APIKeyResponseFromJSON)(jsonValue));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Create api key
|
|
61
|
+
*/
|
|
62
|
+
create5(requestParameters, initOverrides) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const response = yield this.create5Raw(requestParameters, initOverrides);
|
|
65
|
+
return yield response.value();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Deactivate api key
|
|
70
|
+
*/
|
|
71
|
+
deactivateRaw(requestParameters, initOverrides) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
if (requestParameters['authorization'] == null) {
|
|
74
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling deactivate().');
|
|
75
|
+
}
|
|
76
|
+
if (requestParameters['deactivateAPIKeyRequest'] == null) {
|
|
77
|
+
throw new runtime.RequiredError('deactivateAPIKeyRequest', 'Required parameter "deactivateAPIKeyRequest" was null or undefined when calling deactivate().');
|
|
78
|
+
}
|
|
79
|
+
const queryParameters = {};
|
|
80
|
+
const headerParameters = {};
|
|
81
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
82
|
+
if (requestParameters['authorization'] != null) {
|
|
83
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
84
|
+
}
|
|
85
|
+
const response = yield this.request({
|
|
86
|
+
path: `/api-keys/deactivate`,
|
|
87
|
+
method: 'POST',
|
|
88
|
+
headers: headerParameters,
|
|
89
|
+
query: queryParameters,
|
|
90
|
+
body: (0, index_1.DeactivateAPIKeyRequestToJSON)(requestParameters['deactivateAPIKeyRequest']),
|
|
91
|
+
}, initOverrides);
|
|
92
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.APIKeyResponseFromJSON)(jsonValue));
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Deactivate api key
|
|
97
|
+
*/
|
|
98
|
+
deactivate(requestParameters, initOverrides) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
const response = yield this.deactivateRaw(requestParameters, initOverrides);
|
|
101
|
+
return yield response.value();
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Rename api key
|
|
106
|
+
*/
|
|
107
|
+
renameRaw(requestParameters, initOverrides) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
if (requestParameters['authorization'] == null) {
|
|
110
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling rename().');
|
|
111
|
+
}
|
|
112
|
+
if (requestParameters['renameAPIKeyRequest'] == null) {
|
|
113
|
+
throw new runtime.RequiredError('renameAPIKeyRequest', 'Required parameter "renameAPIKeyRequest" was null or undefined when calling rename().');
|
|
114
|
+
}
|
|
115
|
+
const queryParameters = {};
|
|
116
|
+
const headerParameters = {};
|
|
117
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
118
|
+
if (requestParameters['authorization'] != null) {
|
|
119
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
120
|
+
}
|
|
121
|
+
const response = yield this.request({
|
|
122
|
+
path: `/api-keys/rename`,
|
|
123
|
+
method: 'POST',
|
|
124
|
+
headers: headerParameters,
|
|
125
|
+
query: queryParameters,
|
|
126
|
+
body: (0, index_1.RenameAPIKeyRequestToJSON)(requestParameters['renameAPIKeyRequest']),
|
|
127
|
+
}, initOverrides);
|
|
128
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.APIKeyResponseFromJSON)(jsonValue));
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Rename api key
|
|
133
|
+
*/
|
|
134
|
+
rename(requestParameters, initOverrides) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
const response = yield this.renameRaw(requestParameters, initOverrides);
|
|
137
|
+
return yield response.value();
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
exports.MonacoAPIAPIKeyManagementApi = MonacoAPIAPIKeyManagementApi;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { AppStatusResponse } from '../models/index';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export declare class MonacoAPIAPIStatusApi extends runtime.BaseAPI {
|
|
18
|
+
/**
|
|
19
|
+
* Exchange status
|
|
20
|
+
*/
|
|
21
|
+
statusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppStatusResponse>>;
|
|
22
|
+
/**
|
|
23
|
+
* Exchange status
|
|
24
|
+
*/
|
|
25
|
+
status(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppStatusResponse>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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.MonacoAPIAPIStatusApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class MonacoAPIAPIStatusApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Exchange status
|
|
34
|
+
*/
|
|
35
|
+
statusRaw(initOverrides) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
const response = yield this.request({
|
|
40
|
+
path: `/status`,
|
|
41
|
+
method: 'GET',
|
|
42
|
+
headers: headerParameters,
|
|
43
|
+
query: queryParameters,
|
|
44
|
+
}, initOverrides);
|
|
45
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AppStatusResponseFromJSON)(jsonValue));
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Exchange status
|
|
50
|
+
*/
|
|
51
|
+
status(initOverrides) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const response = yield this.statusRaw(initOverrides);
|
|
54
|
+
return yield response.value();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.MonacoAPIAPIStatusApi = MonacoAPIAPIStatusApi;
|
|
@@ -0,0 +1,66 @@
|
|
|
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 { AppResponse, CommissionRateResponse, CreateAppRequest, UpdateAppCommissionRateRequest } from '../models/index';
|
|
14
|
+
export interface Create4Request {
|
|
15
|
+
createAppRequest: CreateAppRequest;
|
|
16
|
+
}
|
|
17
|
+
export interface GetById4Request {
|
|
18
|
+
authorization: string;
|
|
19
|
+
id: string;
|
|
20
|
+
}
|
|
21
|
+
export interface GetCommissionRatesRequest {
|
|
22
|
+
authorization: string;
|
|
23
|
+
id: string;
|
|
24
|
+
}
|
|
25
|
+
export interface UpdateCommissionRateRequest {
|
|
26
|
+
authorization: string;
|
|
27
|
+
id: string;
|
|
28
|
+
updateAppCommissionRateRequest: UpdateAppCommissionRateRequest;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
export declare class MonacoAPIAppManagementApi extends runtime.BaseAPI {
|
|
34
|
+
/**
|
|
35
|
+
* Create app
|
|
36
|
+
*/
|
|
37
|
+
create4Raw(requestParameters: Create4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppResponse>>;
|
|
38
|
+
/**
|
|
39
|
+
* Create app
|
|
40
|
+
*/
|
|
41
|
+
create4(requestParameters: Create4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Fetch app by id
|
|
44
|
+
*/
|
|
45
|
+
getById4Raw(requestParameters: GetById4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppResponse>>;
|
|
46
|
+
/**
|
|
47
|
+
* Fetch app by id
|
|
48
|
+
*/
|
|
49
|
+
getById4(requestParameters: GetById4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Fetch commission rates
|
|
52
|
+
*/
|
|
53
|
+
getCommissionRatesRaw(requestParameters: GetCommissionRatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CommissionRateResponse>>;
|
|
54
|
+
/**
|
|
55
|
+
* Fetch commission rates
|
|
56
|
+
*/
|
|
57
|
+
getCommissionRates(requestParameters: GetCommissionRatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CommissionRateResponse>;
|
|
58
|
+
/**
|
|
59
|
+
* Fetch commission rates
|
|
60
|
+
*/
|
|
61
|
+
updateCommissionRateRaw(requestParameters: UpdateCommissionRateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppResponse>>;
|
|
62
|
+
/**
|
|
63
|
+
* Fetch commission rates
|
|
64
|
+
*/
|
|
65
|
+
updateCommissionRate(requestParameters: UpdateCommissionRateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppResponse>;
|
|
66
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
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.MonacoAPIAppManagementApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class MonacoAPIAppManagementApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Create app
|
|
34
|
+
*/
|
|
35
|
+
create4Raw(requestParameters, initOverrides) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['createAppRequest'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('createAppRequest', 'Required parameter "createAppRequest" was null or undefined when calling create4().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
43
|
+
const response = yield this.request({
|
|
44
|
+
path: `/apps`,
|
|
45
|
+
method: 'POST',
|
|
46
|
+
headers: headerParameters,
|
|
47
|
+
query: queryParameters,
|
|
48
|
+
body: (0, index_1.CreateAppRequestToJSON)(requestParameters['createAppRequest']),
|
|
49
|
+
}, initOverrides);
|
|
50
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AppResponseFromJSON)(jsonValue));
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Create app
|
|
55
|
+
*/
|
|
56
|
+
create4(requestParameters, initOverrides) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const response = yield this.create4Raw(requestParameters, initOverrides);
|
|
59
|
+
return yield response.value();
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Fetch app by id
|
|
64
|
+
*/
|
|
65
|
+
getById4Raw(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
if (requestParameters['authorization'] == null) {
|
|
68
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getById4().');
|
|
69
|
+
}
|
|
70
|
+
if (requestParameters['id'] == null) {
|
|
71
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getById4().');
|
|
72
|
+
}
|
|
73
|
+
const queryParameters = {};
|
|
74
|
+
const headerParameters = {};
|
|
75
|
+
if (requestParameters['authorization'] != null) {
|
|
76
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
77
|
+
}
|
|
78
|
+
const response = yield this.request({
|
|
79
|
+
path: `/apps/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
80
|
+
method: 'GET',
|
|
81
|
+
headers: headerParameters,
|
|
82
|
+
query: queryParameters,
|
|
83
|
+
}, initOverrides);
|
|
84
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AppResponseFromJSON)(jsonValue));
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Fetch app by id
|
|
89
|
+
*/
|
|
90
|
+
getById4(requestParameters, initOverrides) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
const response = yield this.getById4Raw(requestParameters, initOverrides);
|
|
93
|
+
return yield response.value();
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Fetch commission rates
|
|
98
|
+
*/
|
|
99
|
+
getCommissionRatesRaw(requestParameters, initOverrides) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
if (requestParameters['authorization'] == null) {
|
|
102
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getCommissionRates().');
|
|
103
|
+
}
|
|
104
|
+
if (requestParameters['id'] == null) {
|
|
105
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCommissionRates().');
|
|
106
|
+
}
|
|
107
|
+
const queryParameters = {};
|
|
108
|
+
const headerParameters = {};
|
|
109
|
+
if (requestParameters['authorization'] != null) {
|
|
110
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
111
|
+
}
|
|
112
|
+
const response = yield this.request({
|
|
113
|
+
path: `/apps/{id}/commission-rates`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
114
|
+
method: 'GET',
|
|
115
|
+
headers: headerParameters,
|
|
116
|
+
query: queryParameters,
|
|
117
|
+
}, initOverrides);
|
|
118
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CommissionRateResponseFromJSON)(jsonValue));
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Fetch commission rates
|
|
123
|
+
*/
|
|
124
|
+
getCommissionRates(requestParameters, initOverrides) {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
const response = yield this.getCommissionRatesRaw(requestParameters, initOverrides);
|
|
127
|
+
return yield response.value();
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Fetch commission rates
|
|
132
|
+
*/
|
|
133
|
+
updateCommissionRateRaw(requestParameters, initOverrides) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
if (requestParameters['authorization'] == null) {
|
|
136
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling updateCommissionRate().');
|
|
137
|
+
}
|
|
138
|
+
if (requestParameters['id'] == null) {
|
|
139
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateCommissionRate().');
|
|
140
|
+
}
|
|
141
|
+
if (requestParameters['updateAppCommissionRateRequest'] == null) {
|
|
142
|
+
throw new runtime.RequiredError('updateAppCommissionRateRequest', 'Required parameter "updateAppCommissionRateRequest" was null or undefined when calling updateCommissionRate().');
|
|
143
|
+
}
|
|
144
|
+
const queryParameters = {};
|
|
145
|
+
const headerParameters = {};
|
|
146
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
147
|
+
if (requestParameters['authorization'] != null) {
|
|
148
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
149
|
+
}
|
|
150
|
+
const response = yield this.request({
|
|
151
|
+
path: `/apps/{id}/commission-rates`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
152
|
+
method: 'POST',
|
|
153
|
+
headers: headerParameters,
|
|
154
|
+
query: queryParameters,
|
|
155
|
+
body: (0, index_1.UpdateAppCommissionRateRequestToJSON)(requestParameters['updateAppCommissionRateRequest']),
|
|
156
|
+
}, initOverrides);
|
|
157
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AppResponseFromJSON)(jsonValue));
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Fetch commission rates
|
|
162
|
+
*/
|
|
163
|
+
updateCommissionRate(requestParameters, initOverrides) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
const response = yield this.updateCommissionRateRaw(requestParameters, initOverrides);
|
|
166
|
+
return yield response.value();
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
exports.MonacoAPIAppManagementApi = MonacoAPIAppManagementApi;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { CurrencyResponse } from '../models/index';
|
|
14
|
+
export interface CurrenciesRequest {
|
|
15
|
+
authorization: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetById2Request {
|
|
18
|
+
authorization: string;
|
|
19
|
+
id: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
export declare class MonacoAPICurrenciesApi extends runtime.BaseAPI {
|
|
25
|
+
/**
|
|
26
|
+
* Returns the list of currencies supported by the exchange
|
|
27
|
+
* Fetch a list of supported currencies
|
|
28
|
+
*/
|
|
29
|
+
currenciesRaw(requestParameters: CurrenciesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CurrencyResponse>>;
|
|
30
|
+
/**
|
|
31
|
+
* Returns the list of currencies supported by the exchange
|
|
32
|
+
* Fetch a list of supported currencies
|
|
33
|
+
*/
|
|
34
|
+
currencies(requestParameters: CurrenciesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CurrencyResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* Returns the currency or 404
|
|
37
|
+
* Fetch currency by its ID
|
|
38
|
+
*/
|
|
39
|
+
getById2Raw(requestParameters: GetById2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CurrencyResponse>>;
|
|
40
|
+
/**
|
|
41
|
+
* Returns the currency or 404
|
|
42
|
+
* Fetch currency by its ID
|
|
43
|
+
*/
|
|
44
|
+
getById2(requestParameters: GetById2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CurrencyResponse>;
|
|
45
|
+
}
|