@monaco-protocol/client-v2 0.0.88 → 0.0.89-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/dist/models/CreateMarketRequest.d.ts +2 -2
- package/dist/models/CreateOrderRequest.d.ts +1 -1
- package/dist/models/Market.d.ts +2 -2
- package/dist/models/MarketResponse.d.ts +3 -3
- package/dist/models/MarketResponse.js +3 -3
- package/dist/models/Order.d.ts +1 -1
- package/dist/models/PagedMarketResponse.d.ts +3 -3
- package/dist/models/PagedMarketResponse.js +3 -3
- package/dist/models/ParticipantSummary.d.ts +64 -0
- package/dist/models/ParticipantSummary.js +64 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/dist/apis/PricesApi.d.ts +0 -61
- package/dist/apis/PricesApi.js +0 -110
- package/dist/models/PagedMarketWithPricesResponse.d.ts +0 -96
- package/dist/models/PagedMarketWithPricesResponse.js +0 -76
|
@@ -77,13 +77,13 @@ export interface CreateMarketRequest {
|
|
|
77
77
|
*/
|
|
78
78
|
lockAt?: Date;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* Action to take when market is locked - default is to cancel unmatched liquidity
|
|
81
81
|
* @type {string}
|
|
82
82
|
* @memberof CreateMarketRequest
|
|
83
83
|
*/
|
|
84
84
|
marketLockAction?: CreateMarketRequestMarketLockActionEnum;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* Action to take when market's event start time passes, i.e., transitioning a market from PrePlay to InPlay - default is to cancel unmatched liquidity (can be managed per order)
|
|
87
87
|
* @type {string}
|
|
88
88
|
* @memberof CreateMarketRequest
|
|
89
89
|
*/
|
|
@@ -52,7 +52,7 @@ export interface CreateOrderRequest {
|
|
|
52
52
|
*/
|
|
53
53
|
stake: number;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* Optional - whether to keep unmatched portion of the order when its market enters InPlay (only relevant if the market has eventStartAction: CancelUnmatchedLiquidity) - default is false
|
|
56
56
|
* @type {boolean}
|
|
57
57
|
* @memberof CreateOrderRequest
|
|
58
58
|
*/
|
package/dist/models/Market.d.ts
CHANGED
|
@@ -107,13 +107,13 @@ export interface Market {
|
|
|
107
107
|
*/
|
|
108
108
|
settledAt?: Date;
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* Action to take when market locks - default is to cancel unmatched liquidity
|
|
111
111
|
* @type {string}
|
|
112
112
|
* @memberof Market
|
|
113
113
|
*/
|
|
114
114
|
marketLockAction?: MarketMarketLockActionEnum;
|
|
115
115
|
/**
|
|
116
|
-
*
|
|
116
|
+
* Action to take when market's event start time passes, i.e., transitioning a market from PrePlay to InPlay - default is to cancel unmatched liquidity (can be managed per order)
|
|
117
117
|
* @type {string}
|
|
118
118
|
* @memberof Market
|
|
119
119
|
*/
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import type { MarketOutcomeSummary } from './MarketOutcomeSummary';
|
|
13
13
|
import type { Meta } from './Meta';
|
|
14
14
|
import type { ExternalReference } from './ExternalReference';
|
|
15
|
-
import type {
|
|
15
|
+
import type { ParticipantSummary } from './ParticipantSummary';
|
|
16
16
|
import type { CategorySummary } from './CategorySummary';
|
|
17
17
|
import type { EventSummary } from './EventSummary';
|
|
18
18
|
import type { SubcategorySummary } from './SubcategorySummary';
|
|
@@ -81,10 +81,10 @@ export interface MarketResponse {
|
|
|
81
81
|
externalReferences?: Array<ExternalReference>;
|
|
82
82
|
/**
|
|
83
83
|
*
|
|
84
|
-
* @type {Array<
|
|
84
|
+
* @type {Array<ParticipantSummary>}
|
|
85
85
|
* @memberof MarketResponse
|
|
86
86
|
*/
|
|
87
|
-
participants?: Array<
|
|
87
|
+
participants?: Array<ParticipantSummary>;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* Check if a given object implements the MarketResponse interface.
|
|
@@ -21,7 +21,7 @@ exports.MarketResponseToJSONTyped = MarketResponseToJSONTyped;
|
|
|
21
21
|
const MarketOutcomeSummary_1 = require("./MarketOutcomeSummary");
|
|
22
22
|
const Meta_1 = require("./Meta");
|
|
23
23
|
const ExternalReference_1 = require("./ExternalReference");
|
|
24
|
-
const
|
|
24
|
+
const ParticipantSummary_1 = require("./ParticipantSummary");
|
|
25
25
|
const CategorySummary_1 = require("./CategorySummary");
|
|
26
26
|
const EventSummary_1 = require("./EventSummary");
|
|
27
27
|
const SubcategorySummary_1 = require("./SubcategorySummary");
|
|
@@ -51,7 +51,7 @@ function MarketResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
51
|
'subcategories': json['subcategories'] == null ? undefined : (json['subcategories'].map(SubcategorySummary_1.SubcategorySummaryFromJSON)),
|
|
52
52
|
'categories': json['categories'] == null ? undefined : (json['categories'].map(CategorySummary_1.CategorySummaryFromJSON)),
|
|
53
53
|
'externalReferences': json['externalReferences'] == null ? undefined : (json['externalReferences'].map(ExternalReference_1.ExternalReferenceFromJSON)),
|
|
54
|
-
'participants': json['participants'] == null ? undefined : (json['participants'].map(
|
|
54
|
+
'participants': json['participants'] == null ? undefined : (json['participants'].map(ParticipantSummary_1.ParticipantSummaryFromJSON)),
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
function MarketResponseToJSON(json) {
|
|
@@ -71,6 +71,6 @@ function MarketResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
71
71
|
'subcategories': value['subcategories'] == null ? undefined : (value['subcategories'].map(SubcategorySummary_1.SubcategorySummaryToJSON)),
|
|
72
72
|
'categories': value['categories'] == null ? undefined : (value['categories'].map(CategorySummary_1.CategorySummaryToJSON)),
|
|
73
73
|
'externalReferences': value['externalReferences'] == null ? undefined : (value['externalReferences'].map(ExternalReference_1.ExternalReferenceToJSON)),
|
|
74
|
-
'participants': value['participants'] == null ? undefined : (value['participants'].map(
|
|
74
|
+
'participants': value['participants'] == null ? undefined : (value['participants'].map(ParticipantSummary_1.ParticipantSummaryToJSON)),
|
|
75
75
|
};
|
|
76
76
|
}
|
package/dist/models/Order.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ export interface Order {
|
|
|
83
83
|
*/
|
|
84
84
|
stakeVoided?: number;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* Whether to keep unmatched portion of the order when its market enters InPlay (only relevant if the market has eventStartAction: CancelUnmatchedLiquidity)
|
|
87
87
|
* @type {boolean}
|
|
88
88
|
* @memberof Order
|
|
89
89
|
*/
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import type { MarketOutcomeSummary } from './MarketOutcomeSummary';
|
|
13
13
|
import type { Meta } from './Meta';
|
|
14
14
|
import type { ExternalReference } from './ExternalReference';
|
|
15
|
-
import type {
|
|
15
|
+
import type { ParticipantSummary } from './ParticipantSummary';
|
|
16
16
|
import type { CategorySummary } from './CategorySummary';
|
|
17
17
|
import type { EventSummary } from './EventSummary';
|
|
18
18
|
import type { SubcategorySummary } from './SubcategorySummary';
|
|
@@ -81,10 +81,10 @@ export interface PagedMarketResponse {
|
|
|
81
81
|
externalReferences?: Array<ExternalReference>;
|
|
82
82
|
/**
|
|
83
83
|
*
|
|
84
|
-
* @type {Array<
|
|
84
|
+
* @type {Array<ParticipantSummary>}
|
|
85
85
|
* @memberof PagedMarketResponse
|
|
86
86
|
*/
|
|
87
|
-
participants?: Array<
|
|
87
|
+
participants?: Array<ParticipantSummary>;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* Check if a given object implements the PagedMarketResponse interface.
|
|
@@ -21,7 +21,7 @@ exports.PagedMarketResponseToJSONTyped = PagedMarketResponseToJSONTyped;
|
|
|
21
21
|
const MarketOutcomeSummary_1 = require("./MarketOutcomeSummary");
|
|
22
22
|
const Meta_1 = require("./Meta");
|
|
23
23
|
const ExternalReference_1 = require("./ExternalReference");
|
|
24
|
-
const
|
|
24
|
+
const ParticipantSummary_1 = require("./ParticipantSummary");
|
|
25
25
|
const CategorySummary_1 = require("./CategorySummary");
|
|
26
26
|
const EventSummary_1 = require("./EventSummary");
|
|
27
27
|
const SubcategorySummary_1 = require("./SubcategorySummary");
|
|
@@ -51,7 +51,7 @@ function PagedMarketResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
51
|
'subcategories': json['subcategories'] == null ? undefined : (json['subcategories'].map(SubcategorySummary_1.SubcategorySummaryFromJSON)),
|
|
52
52
|
'categories': json['categories'] == null ? undefined : (json['categories'].map(CategorySummary_1.CategorySummaryFromJSON)),
|
|
53
53
|
'externalReferences': json['externalReferences'] == null ? undefined : (json['externalReferences'].map(ExternalReference_1.ExternalReferenceFromJSON)),
|
|
54
|
-
'participants': json['participants'] == null ? undefined : (json['participants'].map(
|
|
54
|
+
'participants': json['participants'] == null ? undefined : (json['participants'].map(ParticipantSummary_1.ParticipantSummaryFromJSON)),
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
function PagedMarketResponseToJSON(json) {
|
|
@@ -71,6 +71,6 @@ function PagedMarketResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
71
71
|
'subcategories': value['subcategories'] == null ? undefined : (value['subcategories'].map(SubcategorySummary_1.SubcategorySummaryToJSON)),
|
|
72
72
|
'categories': value['categories'] == null ? undefined : (value['categories'].map(CategorySummary_1.CategorySummaryToJSON)),
|
|
73
73
|
'externalReferences': value['externalReferences'] == null ? undefined : (value['externalReferences'].map(ExternalReference_1.ExternalReferenceToJSON)),
|
|
74
|
-
'participants': value['participants'] == null ? undefined : (value['participants'].map(
|
|
74
|
+
'participants': value['participants'] == null ? undefined : (value['participants'].map(ParticipantSummary_1.ParticipantSummaryToJSON)),
|
|
75
75
|
};
|
|
76
76
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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 ParticipantSummary
|
|
16
|
+
*/
|
|
17
|
+
export interface ParticipantSummary {
|
|
18
|
+
/**
|
|
19
|
+
* Globally unique ID for this participant across all subcategories
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ParticipantSummary
|
|
22
|
+
*/
|
|
23
|
+
id?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Unique code for this participant across all events in a given subcategory
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ParticipantSummary
|
|
28
|
+
*/
|
|
29
|
+
code?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ParticipantSummary
|
|
34
|
+
*/
|
|
35
|
+
name?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ParticipantSummary
|
|
40
|
+
*/
|
|
41
|
+
type?: ParticipantSummaryTypeEnum;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof ParticipantSummary
|
|
46
|
+
*/
|
|
47
|
+
active?: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export declare const ParticipantSummaryTypeEnum: {
|
|
53
|
+
readonly Individual: "Individual";
|
|
54
|
+
readonly Team: "Team";
|
|
55
|
+
};
|
|
56
|
+
export type ParticipantSummaryTypeEnum = typeof ParticipantSummaryTypeEnum[keyof typeof ParticipantSummaryTypeEnum];
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the ParticipantSummary interface.
|
|
59
|
+
*/
|
|
60
|
+
export declare function instanceOfParticipantSummary(value: object): value is ParticipantSummary;
|
|
61
|
+
export declare function ParticipantSummaryFromJSON(json: any): ParticipantSummary;
|
|
62
|
+
export declare function ParticipantSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ParticipantSummary;
|
|
63
|
+
export declare function ParticipantSummaryToJSON(json: any): ParticipantSummary;
|
|
64
|
+
export declare function ParticipantSummaryToJSONTyped(value?: ParticipantSummary | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
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.ParticipantSummaryTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfParticipantSummary = instanceOfParticipantSummary;
|
|
18
|
+
exports.ParticipantSummaryFromJSON = ParticipantSummaryFromJSON;
|
|
19
|
+
exports.ParticipantSummaryFromJSONTyped = ParticipantSummaryFromJSONTyped;
|
|
20
|
+
exports.ParticipantSummaryToJSON = ParticipantSummaryToJSON;
|
|
21
|
+
exports.ParticipantSummaryToJSONTyped = ParticipantSummaryToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.ParticipantSummaryTypeEnum = {
|
|
26
|
+
Individual: 'Individual',
|
|
27
|
+
Team: 'Team'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the ParticipantSummary interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfParticipantSummary(value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function ParticipantSummaryFromJSON(json) {
|
|
36
|
+
return ParticipantSummaryFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function ParticipantSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
44
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
45
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
46
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
47
|
+
'active': json['active'] == null ? undefined : json['active'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function ParticipantSummaryToJSON(json) {
|
|
51
|
+
return ParticipantSummaryToJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
function ParticipantSummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
54
|
+
if (value == null) {
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
'id': value['id'],
|
|
59
|
+
'code': value['code'],
|
|
60
|
+
'name': value['name'],
|
|
61
|
+
'type': value['type'],
|
|
62
|
+
'active': value['active'],
|
|
63
|
+
};
|
|
64
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -88,6 +88,7 @@ export * from './PagedTradeResponse';
|
|
|
88
88
|
export * from './PagedTransactionResponse';
|
|
89
89
|
export * from './PagedWalletResponse';
|
|
90
90
|
export * from './Participant';
|
|
91
|
+
export * from './ParticipantSummary';
|
|
91
92
|
export * from './ParticipantsResponse';
|
|
92
93
|
export * from './Range';
|
|
93
94
|
export * from './RefreshSessionRequest';
|
package/dist/models/index.js
CHANGED
|
@@ -106,6 +106,7 @@ __exportStar(require("./PagedTradeResponse"), exports);
|
|
|
106
106
|
__exportStar(require("./PagedTransactionResponse"), exports);
|
|
107
107
|
__exportStar(require("./PagedWalletResponse"), exports);
|
|
108
108
|
__exportStar(require("./Participant"), exports);
|
|
109
|
+
__exportStar(require("./ParticipantSummary"), exports);
|
|
109
110
|
__exportStar(require("./ParticipantsResponse"), exports);
|
|
110
111
|
__exportStar(require("./Range"), exports);
|
|
111
112
|
__exportStar(require("./RefreshSessionRequest"), exports);
|
package/package.json
CHANGED
package/dist/apis/PricesApi.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Monaco API
|
|
3
|
-
* A RESTful API that allows you to interact with the Monaco Exchange. Provides endpoints for managing Events, Markets, Sessions, Wallets and Orders. To interact with the API, a client must have an App Id and an API Key to authenticate and create a session.
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 0.1
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import * as runtime from '../runtime';
|
|
13
|
-
import type { PagedMarketWithPricesResponse } from '../models/index';
|
|
14
|
-
export interface GetPricesRequest {
|
|
15
|
-
authorization: string;
|
|
16
|
-
eventStarting?: GetPricesEventStartingEnum;
|
|
17
|
-
fromDateTime?: Date;
|
|
18
|
-
toDateTime?: Date;
|
|
19
|
-
marketStatuses?: Set<GetPricesMarketStatusesEnum>;
|
|
20
|
-
marketIds?: Set<string>;
|
|
21
|
-
page?: number;
|
|
22
|
-
size?: number;
|
|
23
|
-
sort?: Array<string>;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
export declare class PricesApi extends runtime.BaseAPI {
|
|
29
|
-
/**
|
|
30
|
-
* Fetch market prices, filtered by either provided market ids, or event start time - with optional filtering on market status. Paginated by number of markets.
|
|
31
|
-
*/
|
|
32
|
-
getPricesRaw(requestParameters: GetPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PagedMarketWithPricesResponse>>;
|
|
33
|
-
/**
|
|
34
|
-
* Fetch market prices, filtered by either provided market ids, or event start time - with optional filtering on market status. Paginated by number of markets.
|
|
35
|
-
*/
|
|
36
|
-
getPrices(requestParameters: GetPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PagedMarketWithPricesResponse>;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* @export
|
|
40
|
-
*/
|
|
41
|
-
export declare const GetPricesEventStartingEnum: {
|
|
42
|
-
readonly Live: "Live";
|
|
43
|
-
readonly Today: "Today";
|
|
44
|
-
readonly Later: "Later";
|
|
45
|
-
readonly Range: "Range";
|
|
46
|
-
};
|
|
47
|
-
export type GetPricesEventStartingEnum = typeof GetPricesEventStartingEnum[keyof typeof GetPricesEventStartingEnum];
|
|
48
|
-
/**
|
|
49
|
-
* @export
|
|
50
|
-
*/
|
|
51
|
-
export declare const GetPricesMarketStatusesEnum: {
|
|
52
|
-
readonly Initializing: "Initializing";
|
|
53
|
-
readonly Open: "Open";
|
|
54
|
-
readonly Locked: "Locked";
|
|
55
|
-
readonly Settling: "Settling";
|
|
56
|
-
readonly Settled: "Settled";
|
|
57
|
-
readonly Voiding: "Voiding";
|
|
58
|
-
readonly Voided: "Voided";
|
|
59
|
-
readonly Closed: "Closed";
|
|
60
|
-
};
|
|
61
|
-
export type GetPricesMarketStatusesEnum = typeof GetPricesMarketStatusesEnum[keyof typeof GetPricesMarketStatusesEnum];
|
package/dist/apis/PricesApi.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Monaco API
|
|
6
|
-
* A RESTful API that allows you to interact with the Monaco Exchange. Provides endpoints for managing Events, Markets, Sessions, Wallets and Orders. To interact with the API, a client must have an App Id and an API Key to authenticate and create a session.
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.GetPricesMarketStatusesEnum = exports.GetPricesEventStartingEnum = exports.PricesApi = void 0;
|
|
26
|
-
const runtime = require("../runtime");
|
|
27
|
-
const index_1 = require("../models/index");
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
class PricesApi extends runtime.BaseAPI {
|
|
32
|
-
/**
|
|
33
|
-
* Fetch market prices, filtered by either provided market ids, or event start time - with optional filtering on market status. Paginated by number of markets.
|
|
34
|
-
*/
|
|
35
|
-
getPricesRaw(requestParameters, initOverrides) {
|
|
36
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
if (requestParameters['authorization'] == null) {
|
|
38
|
-
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getPrices().');
|
|
39
|
-
}
|
|
40
|
-
const queryParameters = {};
|
|
41
|
-
if (requestParameters['eventStarting'] != null) {
|
|
42
|
-
queryParameters['eventStarting'] = requestParameters['eventStarting'];
|
|
43
|
-
}
|
|
44
|
-
if (requestParameters['fromDateTime'] != null) {
|
|
45
|
-
queryParameters['fromDateTime'] = requestParameters['fromDateTime'].toISOString();
|
|
46
|
-
}
|
|
47
|
-
if (requestParameters['toDateTime'] != null) {
|
|
48
|
-
queryParameters['toDateTime'] = requestParameters['toDateTime'].toISOString();
|
|
49
|
-
}
|
|
50
|
-
if (requestParameters['marketStatuses'] != null) {
|
|
51
|
-
queryParameters['marketStatuses'] = requestParameters['marketStatuses'];
|
|
52
|
-
}
|
|
53
|
-
if (requestParameters['marketIds'] != null) {
|
|
54
|
-
queryParameters['marketIds'] = requestParameters['marketIds'];
|
|
55
|
-
}
|
|
56
|
-
if (requestParameters['page'] != null) {
|
|
57
|
-
queryParameters['page'] = requestParameters['page'];
|
|
58
|
-
}
|
|
59
|
-
if (requestParameters['size'] != null) {
|
|
60
|
-
queryParameters['size'] = requestParameters['size'];
|
|
61
|
-
}
|
|
62
|
-
if (requestParameters['sort'] != null) {
|
|
63
|
-
queryParameters['sort'] = requestParameters['sort'];
|
|
64
|
-
}
|
|
65
|
-
const headerParameters = {};
|
|
66
|
-
if (requestParameters['authorization'] != null) {
|
|
67
|
-
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
68
|
-
}
|
|
69
|
-
const response = yield this.request({
|
|
70
|
-
path: `/prices`,
|
|
71
|
-
method: 'GET',
|
|
72
|
-
headers: headerParameters,
|
|
73
|
-
query: queryParameters,
|
|
74
|
-
}, initOverrides);
|
|
75
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PagedMarketWithPricesResponseFromJSON)(jsonValue));
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Fetch market prices, filtered by either provided market ids, or event start time - with optional filtering on market status. Paginated by number of markets.
|
|
80
|
-
*/
|
|
81
|
-
getPrices(requestParameters, initOverrides) {
|
|
82
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
const response = yield this.getPricesRaw(requestParameters, initOverrides);
|
|
84
|
-
return yield response.value();
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
exports.PricesApi = PricesApi;
|
|
89
|
-
/**
|
|
90
|
-
* @export
|
|
91
|
-
*/
|
|
92
|
-
exports.GetPricesEventStartingEnum = {
|
|
93
|
-
Live: 'Live',
|
|
94
|
-
Today: 'Today',
|
|
95
|
-
Later: 'Later',
|
|
96
|
-
Range: 'Range'
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* @export
|
|
100
|
-
*/
|
|
101
|
-
exports.GetPricesMarketStatusesEnum = {
|
|
102
|
-
Initializing: 'Initializing',
|
|
103
|
-
Open: 'Open',
|
|
104
|
-
Locked: 'Locked',
|
|
105
|
-
Settling: 'Settling',
|
|
106
|
-
Settled: 'Settled',
|
|
107
|
-
Voiding: 'Voiding',
|
|
108
|
-
Voided: 'Voided',
|
|
109
|
-
Closed: 'Closed'
|
|
110
|
-
};
|
|
@@ -1,96 +0,0 @@
|
|
|
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 { MarketOutcomeSummary } from './MarketOutcomeSummary';
|
|
13
|
-
import type { Meta } from './Meta';
|
|
14
|
-
import type { CategorySummary } from './CategorySummary';
|
|
15
|
-
import type { EventSummary } from './EventSummary';
|
|
16
|
-
import type { SubcategorySummary } from './SubcategorySummary';
|
|
17
|
-
import type { Market } from './Market';
|
|
18
|
-
import type { MarketLiquidities } from './MarketLiquidities';
|
|
19
|
-
import type { MarketTypeSummary } from './MarketTypeSummary';
|
|
20
|
-
import type { EventGroupSummary } from './EventGroupSummary';
|
|
21
|
-
import type { EventParticipant } from './EventParticipant';
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @export
|
|
25
|
-
* @interface PagedMarketWithPricesResponse
|
|
26
|
-
*/
|
|
27
|
-
export interface PagedMarketWithPricesResponse {
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {Meta}
|
|
31
|
-
* @memberof PagedMarketWithPricesResponse
|
|
32
|
-
*/
|
|
33
|
-
meta?: Meta;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @type {Array<Market>}
|
|
37
|
-
* @memberof PagedMarketWithPricesResponse
|
|
38
|
-
*/
|
|
39
|
-
markets?: Array<Market>;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @type {Array<MarketTypeSummary>}
|
|
43
|
-
* @memberof PagedMarketWithPricesResponse
|
|
44
|
-
*/
|
|
45
|
-
marketTypes?: Array<MarketTypeSummary>;
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
-
* @type {Array<MarketOutcomeSummary>}
|
|
49
|
-
* @memberof PagedMarketWithPricesResponse
|
|
50
|
-
*/
|
|
51
|
-
marketOutcomes?: Array<MarketOutcomeSummary>;
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* @type {Array<EventSummary>}
|
|
55
|
-
* @memberof PagedMarketWithPricesResponse
|
|
56
|
-
*/
|
|
57
|
-
events?: Array<EventSummary>;
|
|
58
|
-
/**
|
|
59
|
-
*
|
|
60
|
-
* @type {Array<EventGroupSummary>}
|
|
61
|
-
* @memberof PagedMarketWithPricesResponse
|
|
62
|
-
*/
|
|
63
|
-
eventGroups?: Array<EventGroupSummary>;
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* @type {Array<SubcategorySummary>}
|
|
67
|
-
* @memberof PagedMarketWithPricesResponse
|
|
68
|
-
*/
|
|
69
|
-
subcategories?: Array<SubcategorySummary>;
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* @type {Array<CategorySummary>}
|
|
73
|
-
* @memberof PagedMarketWithPricesResponse
|
|
74
|
-
*/
|
|
75
|
-
categories?: Array<CategorySummary>;
|
|
76
|
-
/**
|
|
77
|
-
*
|
|
78
|
-
* @type {Array<MarketLiquidities>}
|
|
79
|
-
* @memberof PagedMarketWithPricesResponse
|
|
80
|
-
*/
|
|
81
|
-
prices?: Array<MarketLiquidities>;
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
* @type {Array<EventParticipant>}
|
|
85
|
-
* @memberof PagedMarketWithPricesResponse
|
|
86
|
-
*/
|
|
87
|
-
participants?: Array<EventParticipant>;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Check if a given object implements the PagedMarketWithPricesResponse interface.
|
|
91
|
-
*/
|
|
92
|
-
export declare function instanceOfPagedMarketWithPricesResponse(value: object): value is PagedMarketWithPricesResponse;
|
|
93
|
-
export declare function PagedMarketWithPricesResponseFromJSON(json: any): PagedMarketWithPricesResponse;
|
|
94
|
-
export declare function PagedMarketWithPricesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PagedMarketWithPricesResponse;
|
|
95
|
-
export declare function PagedMarketWithPricesResponseToJSON(json: any): PagedMarketWithPricesResponse;
|
|
96
|
-
export declare function PagedMarketWithPricesResponseToJSONTyped(value?: PagedMarketWithPricesResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -1,76 +0,0 @@
|
|
|
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.instanceOfPagedMarketWithPricesResponse = instanceOfPagedMarketWithPricesResponse;
|
|
17
|
-
exports.PagedMarketWithPricesResponseFromJSON = PagedMarketWithPricesResponseFromJSON;
|
|
18
|
-
exports.PagedMarketWithPricesResponseFromJSONTyped = PagedMarketWithPricesResponseFromJSONTyped;
|
|
19
|
-
exports.PagedMarketWithPricesResponseToJSON = PagedMarketWithPricesResponseToJSON;
|
|
20
|
-
exports.PagedMarketWithPricesResponseToJSONTyped = PagedMarketWithPricesResponseToJSONTyped;
|
|
21
|
-
const MarketOutcomeSummary_1 = require("./MarketOutcomeSummary");
|
|
22
|
-
const Meta_1 = require("./Meta");
|
|
23
|
-
const CategorySummary_1 = require("./CategorySummary");
|
|
24
|
-
const EventSummary_1 = require("./EventSummary");
|
|
25
|
-
const SubcategorySummary_1 = require("./SubcategorySummary");
|
|
26
|
-
const Market_1 = require("./Market");
|
|
27
|
-
const MarketLiquidities_1 = require("./MarketLiquidities");
|
|
28
|
-
const MarketTypeSummary_1 = require("./MarketTypeSummary");
|
|
29
|
-
const EventGroupSummary_1 = require("./EventGroupSummary");
|
|
30
|
-
const EventParticipant_1 = require("./EventParticipant");
|
|
31
|
-
/**
|
|
32
|
-
* Check if a given object implements the PagedMarketWithPricesResponse interface.
|
|
33
|
-
*/
|
|
34
|
-
function instanceOfPagedMarketWithPricesResponse(value) {
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
function PagedMarketWithPricesResponseFromJSON(json) {
|
|
38
|
-
return PagedMarketWithPricesResponseFromJSONTyped(json, false);
|
|
39
|
-
}
|
|
40
|
-
function PagedMarketWithPricesResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
-
if (json == null) {
|
|
42
|
-
return json;
|
|
43
|
-
}
|
|
44
|
-
return {
|
|
45
|
-
'meta': json['_meta'] == null ? undefined : (0, Meta_1.MetaFromJSON)(json['_meta']),
|
|
46
|
-
'markets': json['markets'] == null ? undefined : (json['markets'].map(Market_1.MarketFromJSON)),
|
|
47
|
-
'marketTypes': json['marketTypes'] == null ? undefined : (json['marketTypes'].map(MarketTypeSummary_1.MarketTypeSummaryFromJSON)),
|
|
48
|
-
'marketOutcomes': json['marketOutcomes'] == null ? undefined : (json['marketOutcomes'].map(MarketOutcomeSummary_1.MarketOutcomeSummaryFromJSON)),
|
|
49
|
-
'events': json['events'] == null ? undefined : (json['events'].map(EventSummary_1.EventSummaryFromJSON)),
|
|
50
|
-
'eventGroups': json['eventGroups'] == null ? undefined : (json['eventGroups'].map(EventGroupSummary_1.EventGroupSummaryFromJSON)),
|
|
51
|
-
'subcategories': json['subcategories'] == null ? undefined : (json['subcategories'].map(SubcategorySummary_1.SubcategorySummaryFromJSON)),
|
|
52
|
-
'categories': json['categories'] == null ? undefined : (json['categories'].map(CategorySummary_1.CategorySummaryFromJSON)),
|
|
53
|
-
'prices': json['prices'] == null ? undefined : (json['prices'].map(MarketLiquidities_1.MarketLiquiditiesFromJSON)),
|
|
54
|
-
'participants': json['participants'] == null ? undefined : (json['participants'].map(EventParticipant_1.EventParticipantFromJSON)),
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
function PagedMarketWithPricesResponseToJSON(json) {
|
|
58
|
-
return PagedMarketWithPricesResponseToJSONTyped(json, false);
|
|
59
|
-
}
|
|
60
|
-
function PagedMarketWithPricesResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
61
|
-
if (value == null) {
|
|
62
|
-
return value;
|
|
63
|
-
}
|
|
64
|
-
return {
|
|
65
|
-
'_meta': (0, Meta_1.MetaToJSON)(value['meta']),
|
|
66
|
-
'markets': value['markets'] == null ? undefined : (value['markets'].map(Market_1.MarketToJSON)),
|
|
67
|
-
'marketTypes': value['marketTypes'] == null ? undefined : (value['marketTypes'].map(MarketTypeSummary_1.MarketTypeSummaryToJSON)),
|
|
68
|
-
'marketOutcomes': value['marketOutcomes'] == null ? undefined : (value['marketOutcomes'].map(MarketOutcomeSummary_1.MarketOutcomeSummaryToJSON)),
|
|
69
|
-
'events': value['events'] == null ? undefined : (value['events'].map(EventSummary_1.EventSummaryToJSON)),
|
|
70
|
-
'eventGroups': value['eventGroups'] == null ? undefined : (value['eventGroups'].map(EventGroupSummary_1.EventGroupSummaryToJSON)),
|
|
71
|
-
'subcategories': value['subcategories'] == null ? undefined : (value['subcategories'].map(SubcategorySummary_1.SubcategorySummaryToJSON)),
|
|
72
|
-
'categories': value['categories'] == null ? undefined : (value['categories'].map(CategorySummary_1.CategorySummaryToJSON)),
|
|
73
|
-
'prices': value['prices'] == null ? undefined : (value['prices'].map(MarketLiquidities_1.MarketLiquiditiesToJSON)),
|
|
74
|
-
'participants': value['participants'] == null ? undefined : (value['participants'].map(EventParticipant_1.EventParticipantToJSON)),
|
|
75
|
-
};
|
|
76
|
-
}
|