@monaco-protocol/client-v2 0.0.2-dev.5 → 0.0.2-dev.8
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/MarketPricesApi.d.ts +12 -1
- package/dist/apis/MarketPricesApi.js +31 -0
- package/dist/apis/OrdersApi.d.ts +15 -0
- package/dist/apis/OrdersApi.js +38 -1
- package/dist/models/CreateWalletRequest.d.ts +0 -16
- package/dist/models/CreateWalletRequest.js +0 -12
- package/dist/models/Market.d.ts +6 -0
- package/dist/models/Market.js +2 -0
- 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/MarketSummary.d.ts +12 -0
- package/dist/models/MarketSummary.js +4 -0
- package/dist/models/Meta.d.ts +1 -0
- package/dist/models/Meta.js +1 -0
- package/dist/models/Order.d.ts +3 -0
- package/dist/models/Order.js +4 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { MarketLiquiditiesResponse } from '../models/index';
|
|
13
|
+
import type { MarketLiquiditiesResponse, MarketPriceLadderResponse } from '../models/index';
|
|
14
|
+
export interface GetMarketPriceLadderRequest {
|
|
15
|
+
authorization: string;
|
|
16
|
+
}
|
|
14
17
|
export interface GetMarketsPricesRequest {
|
|
15
18
|
authorization: string;
|
|
16
19
|
marketIds: Array<string>;
|
|
@@ -19,6 +22,14 @@ export interface GetMarketsPricesRequest {
|
|
|
19
22
|
*
|
|
20
23
|
*/
|
|
21
24
|
export declare class MarketPricesApi extends runtime.BaseAPI {
|
|
25
|
+
/**
|
|
26
|
+
* Fetch market price ladder
|
|
27
|
+
*/
|
|
28
|
+
getMarketPriceLadderRaw(requestParameters: GetMarketPriceLadderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MarketPriceLadderResponse>>;
|
|
29
|
+
/**
|
|
30
|
+
* Fetch market price ladder
|
|
31
|
+
*/
|
|
32
|
+
getMarketPriceLadder(requestParameters: GetMarketPriceLadderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MarketPriceLadderResponse>;
|
|
22
33
|
/**
|
|
23
34
|
* Fetch market prices
|
|
24
35
|
*/
|
|
@@ -29,6 +29,37 @@ const index_1 = require("../models/index");
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
class MarketPricesApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Fetch market price ladder
|
|
34
|
+
*/
|
|
35
|
+
getMarketPriceLadderRaw(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 getMarketPriceLadder().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
if (requestParameters['authorization'] != null) {
|
|
43
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
44
|
+
}
|
|
45
|
+
const response = yield this.request({
|
|
46
|
+
path: `/market-prices/ladder`,
|
|
47
|
+
method: 'GET',
|
|
48
|
+
headers: headerParameters,
|
|
49
|
+
query: queryParameters,
|
|
50
|
+
}, initOverrides);
|
|
51
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MarketPriceLadderResponseFromJSON)(jsonValue));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Fetch market price ladder
|
|
56
|
+
*/
|
|
57
|
+
getMarketPriceLadder(requestParameters, initOverrides) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const response = yield this.getMarketPriceLadderRaw(requestParameters, initOverrides);
|
|
60
|
+
return yield response.value();
|
|
61
|
+
});
|
|
62
|
+
}
|
|
32
63
|
/**
|
|
33
64
|
* Fetch market prices
|
|
34
65
|
*/
|
package/dist/apis/OrdersApi.d.ts
CHANGED
|
@@ -29,6 +29,10 @@ export interface GetOrderRequest {
|
|
|
29
29
|
authorization: string;
|
|
30
30
|
id: string;
|
|
31
31
|
}
|
|
32
|
+
export interface GetOrderByReferenceRequest {
|
|
33
|
+
authorization: string;
|
|
34
|
+
reference: string;
|
|
35
|
+
}
|
|
32
36
|
export interface GetOrdersRequest {
|
|
33
37
|
authorization: string;
|
|
34
38
|
appIds?: Array<string>;
|
|
@@ -88,6 +92,14 @@ export declare class OrdersApi extends runtime.BaseAPI {
|
|
|
88
92
|
* Fetch order by id
|
|
89
93
|
*/
|
|
90
94
|
getOrder(requestParameters: GetOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
|
|
95
|
+
/**
|
|
96
|
+
* Fetch order by reference
|
|
97
|
+
*/
|
|
98
|
+
getOrderByReferenceRaw(requestParameters: GetOrderByReferenceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
|
|
99
|
+
/**
|
|
100
|
+
* Fetch order by reference
|
|
101
|
+
*/
|
|
102
|
+
getOrderByReference(requestParameters: GetOrderByReferenceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
|
|
91
103
|
/**
|
|
92
104
|
* Fetch orders by filters
|
|
93
105
|
*/
|
|
@@ -113,5 +125,8 @@ export declare const GetOrdersStatusesEnum: {
|
|
|
113
125
|
readonly Matched: "Matched";
|
|
114
126
|
readonly PartiallyMatched: "PartiallyMatched";
|
|
115
127
|
readonly Unmatched: "Unmatched";
|
|
128
|
+
readonly Won: "Won";
|
|
129
|
+
readonly Lost: "Lost";
|
|
130
|
+
readonly Voided: "Voided";
|
|
116
131
|
};
|
|
117
132
|
export type GetOrdersStatusesEnum = typeof GetOrdersStatusesEnum[keyof typeof GetOrdersStatusesEnum];
|
package/dist/apis/OrdersApi.js
CHANGED
|
@@ -173,6 +173,40 @@ class OrdersApi extends runtime.BaseAPI {
|
|
|
173
173
|
return yield response.value();
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* Fetch order by reference
|
|
178
|
+
*/
|
|
179
|
+
getOrderByReferenceRaw(requestParameters, initOverrides) {
|
|
180
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
+
if (requestParameters['authorization'] == null) {
|
|
182
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getOrderByReference().');
|
|
183
|
+
}
|
|
184
|
+
if (requestParameters['reference'] == null) {
|
|
185
|
+
throw new runtime.RequiredError('reference', 'Required parameter "reference" was null or undefined when calling getOrderByReference().');
|
|
186
|
+
}
|
|
187
|
+
const queryParameters = {};
|
|
188
|
+
const headerParameters = {};
|
|
189
|
+
if (requestParameters['authorization'] != null) {
|
|
190
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
191
|
+
}
|
|
192
|
+
const response = yield this.request({
|
|
193
|
+
path: `/orders/by-reference/{reference}`.replace(`{${"reference"}}`, encodeURIComponent(String(requestParameters['reference']))),
|
|
194
|
+
method: 'GET',
|
|
195
|
+
headers: headerParameters,
|
|
196
|
+
query: queryParameters,
|
|
197
|
+
}, initOverrides);
|
|
198
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OrderResponseFromJSON)(jsonValue));
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Fetch order by reference
|
|
203
|
+
*/
|
|
204
|
+
getOrderByReference(requestParameters, initOverrides) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
const response = yield this.getOrderByReferenceRaw(requestParameters, initOverrides);
|
|
207
|
+
return yield response.value();
|
|
208
|
+
});
|
|
209
|
+
}
|
|
176
210
|
/**
|
|
177
211
|
* Fetch orders by filters
|
|
178
212
|
*/
|
|
@@ -295,5 +329,8 @@ exports.GetOrdersStatusesEnum = {
|
|
|
295
329
|
Cancelled: 'Cancelled',
|
|
296
330
|
Matched: 'Matched',
|
|
297
331
|
PartiallyMatched: 'PartiallyMatched',
|
|
298
|
-
Unmatched: 'Unmatched'
|
|
332
|
+
Unmatched: 'Unmatched',
|
|
333
|
+
Won: 'Won',
|
|
334
|
+
Lost: 'Lost',
|
|
335
|
+
Voided: 'Voided'
|
|
299
336
|
};
|
|
@@ -15,12 +15,6 @@
|
|
|
15
15
|
* @interface CreateWalletRequest
|
|
16
16
|
*/
|
|
17
17
|
export interface CreateWalletRequest {
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof CreateWalletRequest
|
|
22
|
-
*/
|
|
23
|
-
type?: CreateWalletRequestTypeEnum;
|
|
24
18
|
/**
|
|
25
19
|
*
|
|
26
20
|
* @type {string}
|
|
@@ -34,16 +28,6 @@ export interface CreateWalletRequest {
|
|
|
34
28
|
*/
|
|
35
29
|
description?: string;
|
|
36
30
|
}
|
|
37
|
-
/**
|
|
38
|
-
* @export
|
|
39
|
-
*/
|
|
40
|
-
export declare const CreateWalletRequestTypeEnum: {
|
|
41
|
-
readonly Commission: "Commission";
|
|
42
|
-
readonly MarketEscrow: "MarketEscrow";
|
|
43
|
-
readonly System: "System";
|
|
44
|
-
readonly User: "User";
|
|
45
|
-
};
|
|
46
|
-
export type CreateWalletRequestTypeEnum = typeof CreateWalletRequestTypeEnum[keyof typeof CreateWalletRequestTypeEnum];
|
|
47
31
|
/**
|
|
48
32
|
* Check if a given object implements the CreateWalletRequest interface.
|
|
49
33
|
*/
|
|
@@ -13,21 +13,11 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.CreateWalletRequestTypeEnum = void 0;
|
|
17
16
|
exports.instanceOfCreateWalletRequest = instanceOfCreateWalletRequest;
|
|
18
17
|
exports.CreateWalletRequestFromJSON = CreateWalletRequestFromJSON;
|
|
19
18
|
exports.CreateWalletRequestFromJSONTyped = CreateWalletRequestFromJSONTyped;
|
|
20
19
|
exports.CreateWalletRequestToJSON = CreateWalletRequestToJSON;
|
|
21
20
|
exports.CreateWalletRequestToJSONTyped = CreateWalletRequestToJSONTyped;
|
|
22
|
-
/**
|
|
23
|
-
* @export
|
|
24
|
-
*/
|
|
25
|
-
exports.CreateWalletRequestTypeEnum = {
|
|
26
|
-
Commission: 'Commission',
|
|
27
|
-
MarketEscrow: 'MarketEscrow',
|
|
28
|
-
System: 'System',
|
|
29
|
-
User: 'User'
|
|
30
|
-
};
|
|
31
21
|
/**
|
|
32
22
|
* Check if a given object implements the CreateWalletRequest interface.
|
|
33
23
|
*/
|
|
@@ -42,7 +32,6 @@ function CreateWalletRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
32
|
return json;
|
|
43
33
|
}
|
|
44
34
|
return {
|
|
45
|
-
'type': json['type'] == null ? undefined : json['type'],
|
|
46
35
|
'reference': json['reference'] == null ? undefined : json['reference'],
|
|
47
36
|
'description': json['description'] == null ? undefined : json['description'],
|
|
48
37
|
};
|
|
@@ -55,7 +44,6 @@ function CreateWalletRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
55
44
|
return value;
|
|
56
45
|
}
|
|
57
46
|
return {
|
|
58
|
-
'type': value['type'],
|
|
59
47
|
'reference': value['reference'],
|
|
60
48
|
'description': value['description'],
|
|
61
49
|
};
|
package/dist/models/Market.d.ts
CHANGED
package/dist/models/Market.js
CHANGED
|
@@ -82,6 +82,7 @@ function MarketFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
82
82
|
'published': json['published'] == null ? undefined : json['published'],
|
|
83
83
|
'suspended': json['suspended'] == null ? undefined : json['suspended'],
|
|
84
84
|
'lockAt': json['lockAt'] == null ? undefined : (new Date(json['lockAt'])),
|
|
85
|
+
'settledAt': json['settledAt'] == null ? undefined : (new Date(json['settledAt'])),
|
|
85
86
|
'marketLockAction': json['marketLockAction'] == null ? undefined : json['marketLockAction'],
|
|
86
87
|
'eventStartAction': json['eventStartAction'] == null ? undefined : json['eventStartAction'],
|
|
87
88
|
'status': json['status'] == null ? undefined : json['status'],
|
|
@@ -111,6 +112,7 @@ function MarketToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
111
112
|
'published': value['published'],
|
|
112
113
|
'suspended': value['suspended'],
|
|
113
114
|
'lockAt': value['lockAt'] == null ? undefined : ((value['lockAt']).toISOString()),
|
|
115
|
+
'settledAt': value['settledAt'] == null ? undefined : ((value['settledAt']).toISOString()),
|
|
114
116
|
'marketLockAction': value['marketLockAction'],
|
|
115
117
|
'eventStartAction': value['eventStartAction'],
|
|
116
118
|
'status': value['status'],
|
|
@@ -30,10 +30,12 @@ export interface MarketPosition {
|
|
|
30
30
|
walletId?: string;
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
33
|
-
* @type {
|
|
33
|
+
* @type {{ [key: string]: number; }}
|
|
34
34
|
* @memberof MarketPosition
|
|
35
35
|
*/
|
|
36
|
-
exposures?:
|
|
36
|
+
exposures?: {
|
|
37
|
+
[key: string]: number;
|
|
38
|
+
};
|
|
37
39
|
}
|
|
38
40
|
/**
|
|
39
41
|
* Check if a given object implements the MarketPosition interface.
|
|
@@ -0,0 +1,32 @@
|
|
|
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 MarketPriceLadder
|
|
16
|
+
*/
|
|
17
|
+
export interface MarketPriceLadder {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {Array<number>}
|
|
21
|
+
* @memberof MarketPriceLadder
|
|
22
|
+
*/
|
|
23
|
+
prices?: Array<number>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the MarketPriceLadder interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfMarketPriceLadder(value: object): value is MarketPriceLadder;
|
|
29
|
+
export declare function MarketPriceLadderFromJSON(json: any): MarketPriceLadder;
|
|
30
|
+
export declare function MarketPriceLadderFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarketPriceLadder;
|
|
31
|
+
export declare function MarketPriceLadderToJSON(json: any): MarketPriceLadder;
|
|
32
|
+
export declare function MarketPriceLadderToJSONTyped(value?: MarketPriceLadder | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
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.instanceOfMarketPriceLadder = instanceOfMarketPriceLadder;
|
|
17
|
+
exports.MarketPriceLadderFromJSON = MarketPriceLadderFromJSON;
|
|
18
|
+
exports.MarketPriceLadderFromJSONTyped = MarketPriceLadderFromJSONTyped;
|
|
19
|
+
exports.MarketPriceLadderToJSON = MarketPriceLadderToJSON;
|
|
20
|
+
exports.MarketPriceLadderToJSONTyped = MarketPriceLadderToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the MarketPriceLadder interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfMarketPriceLadder(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function MarketPriceLadderFromJSON(json) {
|
|
28
|
+
return MarketPriceLadderFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function MarketPriceLadderFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'prices': json['prices'] == null ? undefined : json['prices'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function MarketPriceLadderToJSON(json) {
|
|
39
|
+
return MarketPriceLadderToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function MarketPriceLadderToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'prices': value['prices'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -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 { MarketPriceLadder } from './MarketPriceLadder';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface MarketPriceLadderResponse
|
|
18
|
+
*/
|
|
19
|
+
export interface MarketPriceLadderResponse {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {Meta}
|
|
23
|
+
* @memberof MarketPriceLadderResponse
|
|
24
|
+
*/
|
|
25
|
+
meta?: Meta;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {Array<MarketPriceLadder>}
|
|
29
|
+
* @memberof MarketPriceLadderResponse
|
|
30
|
+
*/
|
|
31
|
+
marketPriceLadders?: Array<MarketPriceLadder>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the MarketPriceLadderResponse interface.
|
|
35
|
+
*/
|
|
36
|
+
export declare function instanceOfMarketPriceLadderResponse(value: object): value is MarketPriceLadderResponse;
|
|
37
|
+
export declare function MarketPriceLadderResponseFromJSON(json: any): MarketPriceLadderResponse;
|
|
38
|
+
export declare function MarketPriceLadderResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarketPriceLadderResponse;
|
|
39
|
+
export declare function MarketPriceLadderResponseToJSON(json: any): MarketPriceLadderResponse;
|
|
40
|
+
export declare function MarketPriceLadderResponseToJSONTyped(value?: MarketPriceLadderResponse | 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.instanceOfMarketPriceLadderResponse = instanceOfMarketPriceLadderResponse;
|
|
17
|
+
exports.MarketPriceLadderResponseFromJSON = MarketPriceLadderResponseFromJSON;
|
|
18
|
+
exports.MarketPriceLadderResponseFromJSONTyped = MarketPriceLadderResponseFromJSONTyped;
|
|
19
|
+
exports.MarketPriceLadderResponseToJSON = MarketPriceLadderResponseToJSON;
|
|
20
|
+
exports.MarketPriceLadderResponseToJSONTyped = MarketPriceLadderResponseToJSONTyped;
|
|
21
|
+
const Meta_1 = require("./Meta");
|
|
22
|
+
const MarketPriceLadder_1 = require("./MarketPriceLadder");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the MarketPriceLadderResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfMarketPriceLadderResponse(value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function MarketPriceLadderResponseFromJSON(json) {
|
|
30
|
+
return MarketPriceLadderResponseFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function MarketPriceLadderResponseFromJSONTyped(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
|
+
'marketPriceLadders': json['marketPriceLadders'] == null ? undefined : (json['marketPriceLadders'].map(MarketPriceLadder_1.MarketPriceLadderFromJSON)),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function MarketPriceLadderResponseToJSON(json) {
|
|
42
|
+
return MarketPriceLadderResponseToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function MarketPriceLadderResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'_meta': (0, Meta_1.MetaToJSON)(value['meta']),
|
|
50
|
+
'marketPriceLadders': value['marketPriceLadders'] == null ? undefined : (value['marketPriceLadders'].map(MarketPriceLadder_1.MarketPriceLadderToJSON)),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -51,6 +51,18 @@ export interface MarketSummary {
|
|
|
51
51
|
* @memberof MarketSummary
|
|
52
52
|
*/
|
|
53
53
|
status?: MarketSummaryStatusEnum;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Date}
|
|
57
|
+
* @memberof MarketSummary
|
|
58
|
+
*/
|
|
59
|
+
lockAt?: Date;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {Date}
|
|
63
|
+
* @memberof MarketSummary
|
|
64
|
+
*/
|
|
65
|
+
settledAt?: Date;
|
|
54
66
|
}
|
|
55
67
|
/**
|
|
56
68
|
* @export
|
|
@@ -60,6 +60,8 @@ function MarketSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
60
60
|
'published': json['published'] == null ? undefined : json['published'],
|
|
61
61
|
'suspended': json['suspended'] == null ? undefined : json['suspended'],
|
|
62
62
|
'status': json['status'] == null ? undefined : json['status'],
|
|
63
|
+
'lockAt': json['lockAt'] == null ? undefined : (new Date(json['lockAt'])),
|
|
64
|
+
'settledAt': json['settledAt'] == null ? undefined : (new Date(json['settledAt'])),
|
|
63
65
|
};
|
|
64
66
|
}
|
|
65
67
|
function MarketSummaryToJSON(json) {
|
|
@@ -76,5 +78,7 @@ function MarketSummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
76
78
|
'published': value['published'],
|
|
77
79
|
'suspended': value['suspended'],
|
|
78
80
|
'status': value['status'],
|
|
81
|
+
'lockAt': value['lockAt'] == null ? undefined : ((value['lockAt']).toISOString()),
|
|
82
|
+
'settledAt': value['settledAt'] == null ? undefined : ((value['settledAt']).toISOString()),
|
|
79
83
|
};
|
|
80
84
|
}
|
package/dist/models/Meta.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export declare const MetaPrimaryDocumentEnum: {
|
|
|
53
53
|
readonly Orders: "orders";
|
|
54
54
|
readonly Participants: "participants";
|
|
55
55
|
readonly Prices: "prices";
|
|
56
|
+
readonly PriceLadders: "priceLadders";
|
|
56
57
|
readonly Sessions: "sessions";
|
|
57
58
|
readonly Statuses: "statuses";
|
|
58
59
|
readonly Subcategories: "subcategories";
|
package/dist/models/Meta.js
CHANGED
package/dist/models/Order.d.ts
CHANGED
|
@@ -129,6 +129,9 @@ export declare const OrderStatusEnum: {
|
|
|
129
129
|
readonly Matched: "Matched";
|
|
130
130
|
readonly PartiallyMatched: "PartiallyMatched";
|
|
131
131
|
readonly Unmatched: "Unmatched";
|
|
132
|
+
readonly Won: "Won";
|
|
133
|
+
readonly Lost: "Lost";
|
|
134
|
+
readonly Voided: "Voided";
|
|
132
135
|
};
|
|
133
136
|
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
|
134
137
|
/**
|
package/dist/models/Order.js
CHANGED
|
@@ -34,7 +34,10 @@ exports.OrderStatusEnum = {
|
|
|
34
34
|
Cancelled: 'Cancelled',
|
|
35
35
|
Matched: 'Matched',
|
|
36
36
|
PartiallyMatched: 'PartiallyMatched',
|
|
37
|
-
Unmatched: 'Unmatched'
|
|
37
|
+
Unmatched: 'Unmatched',
|
|
38
|
+
Won: 'Won',
|
|
39
|
+
Lost: 'Lost',
|
|
40
|
+
Voided: 'Voided'
|
|
38
41
|
};
|
|
39
42
|
/**
|
|
40
43
|
* Check if a given object implements the Order interface.
|
package/dist/models/index.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ export * from './MarketLiquidityResponse';
|
|
|
44
44
|
export * from './MarketOutcomeResult';
|
|
45
45
|
export * from './MarketOutcomeSummary';
|
|
46
46
|
export * from './MarketPosition';
|
|
47
|
+
export * from './MarketPriceLadder';
|
|
48
|
+
export * from './MarketPriceLadderResponse';
|
|
47
49
|
export * from './MarketResponse';
|
|
48
50
|
export * from './MarketResultRequest';
|
|
49
51
|
export * from './MarketSummary';
|
package/dist/models/index.js
CHANGED
|
@@ -62,6 +62,8 @@ __exportStar(require("./MarketLiquidityResponse"), exports);
|
|
|
62
62
|
__exportStar(require("./MarketOutcomeResult"), exports);
|
|
63
63
|
__exportStar(require("./MarketOutcomeSummary"), exports);
|
|
64
64
|
__exportStar(require("./MarketPosition"), exports);
|
|
65
|
+
__exportStar(require("./MarketPriceLadder"), exports);
|
|
66
|
+
__exportStar(require("./MarketPriceLadderResponse"), exports);
|
|
65
67
|
__exportStar(require("./MarketResponse"), exports);
|
|
66
68
|
__exportStar(require("./MarketResultRequest"), exports);
|
|
67
69
|
__exportStar(require("./MarketSummary"), exports);
|