pmxtjs 2.35.8 → 2.35.9
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/esm/generated/src/apis/DefaultApi.d.ts +196 -13
- package/dist/esm/generated/src/apis/DefaultApi.js +292 -13
- package/dist/esm/generated/src/models/FetchEventMatchesParams.d.ts +13 -1
- package/dist/esm/generated/src/models/FetchEventMatchesParams.js +4 -0
- package/dist/esm/generated/src/models/FetchMarketMatchesParams.d.ts +34 -1
- package/dist/esm/generated/src/models/FetchMarketMatchesParams.js +16 -0
- package/dist/esm/generated/src/models/FetchMatchedMarkets200Response.d.ts +46 -0
- package/dist/esm/generated/src/models/FetchMatchedMarkets200Response.js +47 -0
- package/dist/esm/generated/src/models/FetchMatchedMarketsParams.d.ts +61 -0
- package/dist/esm/generated/src/models/FetchMatchedMarketsParams.js +57 -0
- package/dist/esm/generated/src/models/MatchResult.d.ts +6 -0
- package/dist/esm/generated/src/models/MatchResult.js +2 -0
- package/dist/esm/generated/src/models/MatchedMarketPair.d.ts +98 -0
- package/dist/esm/generated/src/models/MatchedMarketPair.js +84 -0
- package/dist/esm/generated/src/models/index.d.ts +3 -0
- package/dist/esm/generated/src/models/index.js +3 -0
- package/dist/esm/pmxt/client.js +20 -0
- package/dist/generated/src/apis/DefaultApi.d.ts +196 -13
- package/dist/generated/src/apis/DefaultApi.js +293 -14
- package/dist/generated/src/models/FetchEventMatchesParams.d.ts +13 -1
- package/dist/generated/src/models/FetchEventMatchesParams.js +4 -0
- package/dist/generated/src/models/FetchMarketMatchesParams.d.ts +34 -1
- package/dist/generated/src/models/FetchMarketMatchesParams.js +17 -1
- package/dist/generated/src/models/FetchMatchedMarkets200Response.d.ts +46 -0
- package/dist/generated/src/models/FetchMatchedMarkets200Response.js +54 -0
- package/dist/generated/src/models/FetchMatchedMarketsParams.d.ts +61 -0
- package/dist/generated/src/models/FetchMatchedMarketsParams.js +65 -0
- package/dist/generated/src/models/MatchResult.d.ts +6 -0
- package/dist/generated/src/models/MatchResult.js +2 -0
- package/dist/generated/src/models/MatchedMarketPair.d.ts +98 -0
- package/dist/generated/src/models/MatchedMarketPair.js +92 -0
- package/dist/generated/src/models/index.d.ts +3 -0
- package/dist/generated/src/models/index.js +3 -0
- package/dist/pmxt/client.js +20 -0
- package/generated/.openapi-generator/FILES +6 -0
- package/generated/docs/DefaultApi.md +307 -21
- package/generated/docs/FetchEventMatchesParams.md +4 -0
- package/generated/docs/FetchMarketMatchesParams.md +8 -0
- package/generated/docs/FetchMatchedMarkets200Response.md +38 -0
- package/generated/docs/FetchMatchedMarketsParams.md +40 -0
- package/generated/docs/MatchResult.md +2 -0
- package/generated/docs/MatchedMarketPair.md +52 -0
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +408 -12
- package/generated/src/models/FetchEventMatchesParams.ts +17 -1
- package/generated/src/models/FetchMarketMatchesParams.ts +43 -1
- package/generated/src/models/FetchMatchedMarkets200Response.ts +96 -0
- package/generated/src/models/FetchMatchedMarketsParams.ts +103 -0
- package/generated/src/models/MatchResult.ts +8 -0
- package/generated/src/models/MatchedMarketPair.ts +166 -0
- package/generated/src/models/index.ts +3 -0
- package/package.json +2 -2
- package/pmxt/client.ts +28 -0
|
@@ -27,6 +27,18 @@ import {
|
|
|
27
27
|
* @interface FetchEventMatchesParams
|
|
28
28
|
*/
|
|
29
29
|
export interface FetchEventMatchesParams {
|
|
30
|
+
/**
|
|
31
|
+
* Keyword search across matched event titles.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof FetchEventMatchesParams
|
|
34
|
+
*/
|
|
35
|
+
query?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Filter matches by category.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof FetchEventMatchesParams
|
|
40
|
+
*/
|
|
41
|
+
category?: string;
|
|
30
42
|
/**
|
|
31
43
|
* Pass a UnifiedEvent directly instead of eventId/slug.
|
|
32
44
|
* @type {UnifiedEvent}
|
|
@@ -34,7 +46,7 @@ export interface FetchEventMatchesParams {
|
|
|
34
46
|
*/
|
|
35
47
|
event?: UnifiedEvent;
|
|
36
48
|
/**
|
|
37
|
-
*
|
|
49
|
+
* Lookup a specific event by ID. Omit for browse mode.
|
|
38
50
|
* @type {string}
|
|
39
51
|
* @memberof FetchEventMatchesParams
|
|
40
52
|
*/
|
|
@@ -102,6 +114,8 @@ export function FetchEventMatchesParamsFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
102
114
|
}
|
|
103
115
|
return {
|
|
104
116
|
|
|
117
|
+
'query': json['query'] == null ? undefined : json['query'],
|
|
118
|
+
'category': json['category'] == null ? undefined : json['category'],
|
|
105
119
|
'event': json['event'] == null ? undefined : UnifiedEventFromJSON(json['event']),
|
|
106
120
|
'eventId': json['eventId'] == null ? undefined : json['eventId'],
|
|
107
121
|
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
@@ -123,6 +137,8 @@ export function FetchEventMatchesParamsToJSONTyped(value?: FetchEventMatchesPara
|
|
|
123
137
|
|
|
124
138
|
return {
|
|
125
139
|
|
|
140
|
+
'query': value['query'],
|
|
141
|
+
'category': value['category'],
|
|
126
142
|
'event': UnifiedEventToJSON(value['event']),
|
|
127
143
|
'eventId': value['eventId'],
|
|
128
144
|
'slug': value['slug'],
|
|
@@ -27,6 +27,18 @@ import {
|
|
|
27
27
|
* @interface FetchMarketMatchesParams
|
|
28
28
|
*/
|
|
29
29
|
export interface FetchMarketMatchesParams {
|
|
30
|
+
/**
|
|
31
|
+
* Keyword search across matched market titles.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof FetchMarketMatchesParams
|
|
34
|
+
*/
|
|
35
|
+
query?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Filter matches by category.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof FetchMarketMatchesParams
|
|
40
|
+
*/
|
|
41
|
+
category?: string;
|
|
30
42
|
/**
|
|
31
43
|
* Pass a UnifiedMarket directly instead of marketId/slug/url.
|
|
32
44
|
* @type {UnifiedMarket}
|
|
@@ -34,7 +46,7 @@ export interface FetchMarketMatchesParams {
|
|
|
34
46
|
*/
|
|
35
47
|
market?: UnifiedMarket;
|
|
36
48
|
/**
|
|
37
|
-
*
|
|
49
|
+
* Lookup a specific market by ID. Omit for browse mode.
|
|
38
50
|
* @type {string}
|
|
39
51
|
* @memberof FetchMarketMatchesParams
|
|
40
52
|
*/
|
|
@@ -75,6 +87,18 @@ export interface FetchMarketMatchesParams {
|
|
|
75
87
|
* @memberof FetchMarketMatchesParams
|
|
76
88
|
*/
|
|
77
89
|
includePrices?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Minimum price difference between venues. Browse mode only.
|
|
92
|
+
* @type {number}
|
|
93
|
+
* @memberof FetchMarketMatchesParams
|
|
94
|
+
*/
|
|
95
|
+
minDifference?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Sort order. Browse mode only.
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof FetchMarketMatchesParams
|
|
100
|
+
*/
|
|
101
|
+
sort?: FetchMarketMatchesParamsSortEnum;
|
|
78
102
|
}
|
|
79
103
|
|
|
80
104
|
|
|
@@ -90,6 +114,16 @@ export const FetchMarketMatchesParamsRelationEnum = {
|
|
|
90
114
|
} as const;
|
|
91
115
|
export type FetchMarketMatchesParamsRelationEnum = typeof FetchMarketMatchesParamsRelationEnum[keyof typeof FetchMarketMatchesParamsRelationEnum];
|
|
92
116
|
|
|
117
|
+
/**
|
|
118
|
+
* @export
|
|
119
|
+
*/
|
|
120
|
+
export const FetchMarketMatchesParamsSortEnum = {
|
|
121
|
+
Confidence: 'confidence',
|
|
122
|
+
Volume: 'volume',
|
|
123
|
+
PriceDifference: 'priceDifference'
|
|
124
|
+
} as const;
|
|
125
|
+
export type FetchMarketMatchesParamsSortEnum = typeof FetchMarketMatchesParamsSortEnum[keyof typeof FetchMarketMatchesParamsSortEnum];
|
|
126
|
+
|
|
93
127
|
|
|
94
128
|
/**
|
|
95
129
|
* Check if a given object implements the FetchMarketMatchesParams interface.
|
|
@@ -108,6 +142,8 @@ export function FetchMarketMatchesParamsFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
108
142
|
}
|
|
109
143
|
return {
|
|
110
144
|
|
|
145
|
+
'query': json['query'] == null ? undefined : json['query'],
|
|
146
|
+
'category': json['category'] == null ? undefined : json['category'],
|
|
111
147
|
'market': json['market'] == null ? undefined : UnifiedMarketFromJSON(json['market']),
|
|
112
148
|
'marketId': json['marketId'] == null ? undefined : json['marketId'],
|
|
113
149
|
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
@@ -116,6 +152,8 @@ export function FetchMarketMatchesParamsFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
116
152
|
'minConfidence': json['minConfidence'] == null ? undefined : json['minConfidence'],
|
|
117
153
|
'limit': json['limit'] == null ? undefined : json['limit'],
|
|
118
154
|
'includePrices': json['includePrices'] == null ? undefined : json['includePrices'],
|
|
155
|
+
'minDifference': json['minDifference'] == null ? undefined : json['minDifference'],
|
|
156
|
+
'sort': json['sort'] == null ? undefined : json['sort'],
|
|
119
157
|
};
|
|
120
158
|
}
|
|
121
159
|
|
|
@@ -130,6 +168,8 @@ export function FetchMarketMatchesParamsToJSONTyped(value?: FetchMarketMatchesPa
|
|
|
130
168
|
|
|
131
169
|
return {
|
|
132
170
|
|
|
171
|
+
'query': value['query'],
|
|
172
|
+
'category': value['category'],
|
|
133
173
|
'market': UnifiedMarketToJSON(value['market']),
|
|
134
174
|
'marketId': value['marketId'],
|
|
135
175
|
'slug': value['slug'],
|
|
@@ -138,6 +178,8 @@ export function FetchMarketMatchesParamsToJSONTyped(value?: FetchMarketMatchesPa
|
|
|
138
178
|
'minConfidence': value['minConfidence'],
|
|
139
179
|
'limit': value['limit'],
|
|
140
180
|
'includePrices': value['includePrices'],
|
|
181
|
+
'minDifference': value['minDifference'],
|
|
182
|
+
'sort': value['sort'],
|
|
141
183
|
};
|
|
142
184
|
}
|
|
143
185
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* PMXT Sidecar API
|
|
5
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.4.4
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ErrorDetail } from './ErrorDetail';
|
|
17
|
+
import {
|
|
18
|
+
ErrorDetailFromJSON,
|
|
19
|
+
ErrorDetailFromJSONTyped,
|
|
20
|
+
ErrorDetailToJSON,
|
|
21
|
+
ErrorDetailToJSONTyped,
|
|
22
|
+
} from './ErrorDetail';
|
|
23
|
+
import type { MatchedMarketPair } from './MatchedMarketPair';
|
|
24
|
+
import {
|
|
25
|
+
MatchedMarketPairFromJSON,
|
|
26
|
+
MatchedMarketPairFromJSONTyped,
|
|
27
|
+
MatchedMarketPairToJSON,
|
|
28
|
+
MatchedMarketPairToJSONTyped,
|
|
29
|
+
} from './MatchedMarketPair';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface FetchMatchedMarkets200Response
|
|
35
|
+
*/
|
|
36
|
+
export interface FetchMatchedMarkets200Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof FetchMatchedMarkets200Response
|
|
41
|
+
*/
|
|
42
|
+
success?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {ErrorDetail}
|
|
46
|
+
* @memberof FetchMatchedMarkets200Response
|
|
47
|
+
*/
|
|
48
|
+
error?: ErrorDetail;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {Array<MatchedMarketPair>}
|
|
52
|
+
* @memberof FetchMatchedMarkets200Response
|
|
53
|
+
*/
|
|
54
|
+
data?: Array<MatchedMarketPair>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the FetchMatchedMarkets200Response interface.
|
|
59
|
+
*/
|
|
60
|
+
export function instanceOfFetchMatchedMarkets200Response(value: object): value is FetchMatchedMarkets200Response {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function FetchMatchedMarkets200ResponseFromJSON(json: any): FetchMatchedMarkets200Response {
|
|
65
|
+
return FetchMatchedMarkets200ResponseFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function FetchMatchedMarkets200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FetchMatchedMarkets200Response {
|
|
69
|
+
if (json == null) {
|
|
70
|
+
return json;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'success': json['success'] == null ? undefined : json['success'],
|
|
75
|
+
'error': json['error'] == null ? undefined : ErrorDetailFromJSON(json['error']),
|
|
76
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(MatchedMarketPairFromJSON)),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function FetchMatchedMarkets200ResponseToJSON(json: any): FetchMatchedMarkets200Response {
|
|
81
|
+
return FetchMatchedMarkets200ResponseToJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function FetchMatchedMarkets200ResponseToJSONTyped(value?: FetchMatchedMarkets200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
|
|
91
|
+
'success': value['success'],
|
|
92
|
+
'error': ErrorDetailToJSON(value['error']),
|
|
93
|
+
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(MatchedMarketPairToJSON)),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* PMXT Sidecar API
|
|
5
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.4.4
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface FetchMatchedMarketsParams
|
|
20
|
+
*/
|
|
21
|
+
export interface FetchMatchedMarketsParams {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof FetchMatchedMarketsParams
|
|
26
|
+
*/
|
|
27
|
+
minDifference?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof FetchMatchedMarketsParams
|
|
32
|
+
*/
|
|
33
|
+
category?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof FetchMatchedMarketsParams
|
|
38
|
+
*/
|
|
39
|
+
limit?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Comma-separated relation types to include (default: 'identity').
|
|
42
|
+
* @type {Array<string>}
|
|
43
|
+
* @memberof FetchMatchedMarketsParams
|
|
44
|
+
*/
|
|
45
|
+
relations?: Array<FetchMatchedMarketsParamsRelationsEnum>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export const FetchMatchedMarketsParamsRelationsEnum = {
|
|
53
|
+
Identity: 'identity',
|
|
54
|
+
Subset: 'subset',
|
|
55
|
+
Superset: 'superset',
|
|
56
|
+
Overlap: 'overlap',
|
|
57
|
+
Disjoint: 'disjoint'
|
|
58
|
+
} as const;
|
|
59
|
+
export type FetchMatchedMarketsParamsRelationsEnum = typeof FetchMatchedMarketsParamsRelationsEnum[keyof typeof FetchMatchedMarketsParamsRelationsEnum];
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the FetchMatchedMarketsParams interface.
|
|
64
|
+
*/
|
|
65
|
+
export function instanceOfFetchMatchedMarketsParams(value: object): value is FetchMatchedMarketsParams {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function FetchMatchedMarketsParamsFromJSON(json: any): FetchMatchedMarketsParams {
|
|
70
|
+
return FetchMatchedMarketsParamsFromJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function FetchMatchedMarketsParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): FetchMatchedMarketsParams {
|
|
74
|
+
if (json == null) {
|
|
75
|
+
return json;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'minDifference': json['minDifference'] == null ? undefined : json['minDifference'],
|
|
80
|
+
'category': json['category'] == null ? undefined : json['category'],
|
|
81
|
+
'limit': json['limit'] == null ? undefined : json['limit'],
|
|
82
|
+
'relations': json['relations'] == null ? undefined : json['relations'],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function FetchMatchedMarketsParamsToJSON(json: any): FetchMatchedMarketsParams {
|
|
87
|
+
return FetchMatchedMarketsParamsToJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function FetchMatchedMarketsParamsToJSONTyped(value?: FetchMatchedMarketsParams | null, ignoreDiscriminator: boolean = false): any {
|
|
91
|
+
if (value == null) {
|
|
92
|
+
return value;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'minDifference': value['minDifference'],
|
|
98
|
+
'category': value['category'],
|
|
99
|
+
'limit': value['limit'],
|
|
100
|
+
'relations': value['relations'],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
@@ -33,6 +33,12 @@ export interface MatchResult {
|
|
|
33
33
|
* @memberof MatchResult
|
|
34
34
|
*/
|
|
35
35
|
market: UnifiedMarket;
|
|
36
|
+
/**
|
|
37
|
+
* The source market this was matched against. Present in browse mode (no marketId), absent in lookup mode.
|
|
38
|
+
* @type {UnifiedMarket}
|
|
39
|
+
* @memberof MatchResult
|
|
40
|
+
*/
|
|
41
|
+
sourceMarket?: UnifiedMarket;
|
|
36
42
|
/**
|
|
37
43
|
*
|
|
38
44
|
* @type {string}
|
|
@@ -103,6 +109,7 @@ export function MatchResultFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
103
109
|
return {
|
|
104
110
|
|
|
105
111
|
'market': UnifiedMarketFromJSON(json['market']),
|
|
112
|
+
'sourceMarket': json['sourceMarket'] == null ? undefined : UnifiedMarketFromJSON(json['sourceMarket']),
|
|
106
113
|
'relation': json['relation'],
|
|
107
114
|
'confidence': json['confidence'],
|
|
108
115
|
'reasoning': json['reasoning'],
|
|
@@ -123,6 +130,7 @@ export function MatchResultToJSONTyped(value?: MatchResult | null, ignoreDiscrim
|
|
|
123
130
|
return {
|
|
124
131
|
|
|
125
132
|
'market': UnifiedMarketToJSON(value['market']),
|
|
133
|
+
'sourceMarket': UnifiedMarketToJSON(value['sourceMarket']),
|
|
126
134
|
'relation': value['relation'],
|
|
127
135
|
'confidence': value['confidence'],
|
|
128
136
|
'reasoning': value['reasoning'],
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* PMXT Sidecar API
|
|
5
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.4.4
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { UnifiedMarket } from './UnifiedMarket';
|
|
17
|
+
import {
|
|
18
|
+
UnifiedMarketFromJSON,
|
|
19
|
+
UnifiedMarketFromJSONTyped,
|
|
20
|
+
UnifiedMarketToJSON,
|
|
21
|
+
UnifiedMarketToJSONTyped,
|
|
22
|
+
} from './UnifiedMarket';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface MatchedMarketPair
|
|
28
|
+
*/
|
|
29
|
+
export interface MatchedMarketPair {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {UnifiedMarket}
|
|
33
|
+
* @memberof MatchedMarketPair
|
|
34
|
+
*/
|
|
35
|
+
marketA: UnifiedMarket;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {UnifiedMarket}
|
|
39
|
+
* @memberof MatchedMarketPair
|
|
40
|
+
*/
|
|
41
|
+
marketB: UnifiedMarket;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof MatchedMarketPair
|
|
46
|
+
*/
|
|
47
|
+
priceDifference: number;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof MatchedMarketPair
|
|
52
|
+
*/
|
|
53
|
+
venueA: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof MatchedMarketPair
|
|
58
|
+
*/
|
|
59
|
+
venueB: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof MatchedMarketPair
|
|
64
|
+
*/
|
|
65
|
+
priceA: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof MatchedMarketPair
|
|
70
|
+
*/
|
|
71
|
+
priceB: number;
|
|
72
|
+
/**
|
|
73
|
+
* The set-theoretic relation between the two markets (e.g. identity, subset).
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof MatchedMarketPair
|
|
76
|
+
*/
|
|
77
|
+
relation?: MatchedMarketPairRelationEnum;
|
|
78
|
+
/**
|
|
79
|
+
* Match confidence score (0.0 to 1.0).
|
|
80
|
+
* @type {number}
|
|
81
|
+
* @memberof MatchedMarketPair
|
|
82
|
+
*/
|
|
83
|
+
confidence?: number;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof MatchedMarketPair
|
|
88
|
+
*/
|
|
89
|
+
reasoning?: string | null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
export const MatchedMarketPairRelationEnum = {
|
|
97
|
+
Identity: 'identity',
|
|
98
|
+
Subset: 'subset',
|
|
99
|
+
Superset: 'superset',
|
|
100
|
+
Overlap: 'overlap',
|
|
101
|
+
Disjoint: 'disjoint'
|
|
102
|
+
} as const;
|
|
103
|
+
export type MatchedMarketPairRelationEnum = typeof MatchedMarketPairRelationEnum[keyof typeof MatchedMarketPairRelationEnum];
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Check if a given object implements the MatchedMarketPair interface.
|
|
108
|
+
*/
|
|
109
|
+
export function instanceOfMatchedMarketPair(value: object): value is MatchedMarketPair {
|
|
110
|
+
if (!('marketA' in value) || value['marketA'] === undefined) return false;
|
|
111
|
+
if (!('marketB' in value) || value['marketB'] === undefined) return false;
|
|
112
|
+
if (!('priceDifference' in value) || value['priceDifference'] === undefined) return false;
|
|
113
|
+
if (!('venueA' in value) || value['venueA'] === undefined) return false;
|
|
114
|
+
if (!('venueB' in value) || value['venueB'] === undefined) return false;
|
|
115
|
+
if (!('priceA' in value) || value['priceA'] === undefined) return false;
|
|
116
|
+
if (!('priceB' in value) || value['priceB'] === undefined) return false;
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function MatchedMarketPairFromJSON(json: any): MatchedMarketPair {
|
|
121
|
+
return MatchedMarketPairFromJSONTyped(json, false);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function MatchedMarketPairFromJSONTyped(json: any, ignoreDiscriminator: boolean): MatchedMarketPair {
|
|
125
|
+
if (json == null) {
|
|
126
|
+
return json;
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
|
|
130
|
+
'marketA': UnifiedMarketFromJSON(json['marketA']),
|
|
131
|
+
'marketB': UnifiedMarketFromJSON(json['marketB']),
|
|
132
|
+
'priceDifference': json['priceDifference'],
|
|
133
|
+
'venueA': json['venueA'],
|
|
134
|
+
'venueB': json['venueB'],
|
|
135
|
+
'priceA': json['priceA'],
|
|
136
|
+
'priceB': json['priceB'],
|
|
137
|
+
'relation': json['relation'] == null ? undefined : json['relation'],
|
|
138
|
+
'confidence': json['confidence'] == null ? undefined : json['confidence'],
|
|
139
|
+
'reasoning': json['reasoning'] == null ? undefined : json['reasoning'],
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function MatchedMarketPairToJSON(json: any): MatchedMarketPair {
|
|
144
|
+
return MatchedMarketPairToJSONTyped(json, false);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function MatchedMarketPairToJSONTyped(value?: MatchedMarketPair | null, ignoreDiscriminator: boolean = false): any {
|
|
148
|
+
if (value == null) {
|
|
149
|
+
return value;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return {
|
|
153
|
+
|
|
154
|
+
'marketA': UnifiedMarketToJSON(value['marketA']),
|
|
155
|
+
'marketB': UnifiedMarketToJSON(value['marketB']),
|
|
156
|
+
'priceDifference': value['priceDifference'],
|
|
157
|
+
'venueA': value['venueA'],
|
|
158
|
+
'venueB': value['venueB'],
|
|
159
|
+
'priceA': value['priceA'],
|
|
160
|
+
'priceB': value['priceB'],
|
|
161
|
+
'relation': value['relation'],
|
|
162
|
+
'confidence': value['confidence'],
|
|
163
|
+
'reasoning': value['reasoning'],
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
@@ -37,6 +37,8 @@ export * from './FetchMarketMatches200Response';
|
|
|
37
37
|
export * from './FetchMarketMatchesParams';
|
|
38
38
|
export * from './FetchMarkets200Response';
|
|
39
39
|
export * from './FetchMarketsPaginated200Response';
|
|
40
|
+
export * from './FetchMatchedMarkets200Response';
|
|
41
|
+
export * from './FetchMatchedMarketsParams';
|
|
40
42
|
export * from './FetchMyTrades200Response';
|
|
41
43
|
export * from './FetchOHLCV200Response';
|
|
42
44
|
export * from './FetchOpenOrders200Response';
|
|
@@ -66,6 +68,7 @@ export * from './MarketFilterCriteriaVolume24h';
|
|
|
66
68
|
export * from './MarketFilterParams';
|
|
67
69
|
export * from './MarketOutcome';
|
|
68
70
|
export * from './MatchResult';
|
|
71
|
+
export * from './MatchedMarketPair';
|
|
69
72
|
export * from './MyTradesParams';
|
|
70
73
|
export * from './OHLCVParams';
|
|
71
74
|
export * from './Order';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmxtjs",
|
|
3
|
-
"version": "2.35.
|
|
3
|
+
"version": "2.35.9",
|
|
4
4
|
"description": "Unified prediction market data API - The ccxt for prediction markets",
|
|
5
5
|
"author": "PMXT Contributors",
|
|
6
6
|
"repository": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"unified"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"pmxt-core": "2.35.
|
|
46
|
+
"pmxt-core": "2.35.9"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/jest": "^30.0.0",
|
package/pmxt/client.ts
CHANGED
|
@@ -847,6 +847,13 @@ export abstract class Exchange {
|
|
|
847
847
|
}
|
|
848
848
|
|
|
849
849
|
async submitOrder(built: BuiltOrder): Promise<Order> {
|
|
850
|
+
if (this.isHosted) {
|
|
851
|
+
throw new PmxtError(
|
|
852
|
+
"Trade execution is not available through the hosted API. " +
|
|
853
|
+
"Use the local PMXT SDK with your venue credentials instead. " +
|
|
854
|
+
"See https://pmxt.dev/docs/quickstart for setup instructions."
|
|
855
|
+
);
|
|
856
|
+
}
|
|
850
857
|
await this.initPromise;
|
|
851
858
|
try {
|
|
852
859
|
const args: any[] = [];
|
|
@@ -873,6 +880,13 @@ export abstract class Exchange {
|
|
|
873
880
|
}
|
|
874
881
|
|
|
875
882
|
async cancelOrder(orderId: string): Promise<Order> {
|
|
883
|
+
if (this.isHosted) {
|
|
884
|
+
throw new PmxtError(
|
|
885
|
+
"Trade execution is not available through the hosted API. " +
|
|
886
|
+
"Use the local PMXT SDK with your venue credentials instead. " +
|
|
887
|
+
"See https://pmxt.dev/docs/quickstart for setup instructions."
|
|
888
|
+
);
|
|
889
|
+
}
|
|
876
890
|
await this.initPromise;
|
|
877
891
|
try {
|
|
878
892
|
const args: any[] = [];
|
|
@@ -1591,6 +1605,13 @@ export abstract class Exchange {
|
|
|
1591
1605
|
* ```
|
|
1592
1606
|
*/
|
|
1593
1607
|
async buildOrder(params: CreateOrderParams & { outcome?: MarketOutcome }): Promise<BuiltOrder> {
|
|
1608
|
+
if (this.isHosted) {
|
|
1609
|
+
throw new PmxtError(
|
|
1610
|
+
"Trade execution is not available through the hosted API. " +
|
|
1611
|
+
"Use the local PMXT SDK with your venue credentials instead. " +
|
|
1612
|
+
"See https://pmxt.dev/docs/quickstart for setup instructions."
|
|
1613
|
+
);
|
|
1614
|
+
}
|
|
1594
1615
|
await this.initPromise;
|
|
1595
1616
|
try {
|
|
1596
1617
|
let marketId = params.marketId;
|
|
@@ -1666,6 +1687,13 @@ export abstract class Exchange {
|
|
|
1666
1687
|
* ```
|
|
1667
1688
|
*/
|
|
1668
1689
|
async createOrder(params: any): Promise<Order> {
|
|
1690
|
+
if (this.isHosted) {
|
|
1691
|
+
throw new PmxtError(
|
|
1692
|
+
"Trade execution is not available through the hosted API. " +
|
|
1693
|
+
"Use the local PMXT SDK with your venue credentials instead. " +
|
|
1694
|
+
"See https://pmxt.dev/docs/quickstart for setup instructions."
|
|
1695
|
+
);
|
|
1696
|
+
}
|
|
1669
1697
|
await this.initPromise;
|
|
1670
1698
|
try {
|
|
1671
1699
|
// Resolve outcome shorthand: extract marketId/outcomeId from outcome object
|