pmxtjs 2.33.4 → 2.34.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/esm/generated/src/apis/DefaultApi.d.ts +72 -7
- package/dist/esm/generated/src/apis/DefaultApi.js +107 -6
- package/dist/esm/generated/src/models/ArbitrageOpportunity.d.ts +23 -0
- package/dist/esm/generated/src/models/ArbitrageOpportunity.js +14 -0
- package/dist/esm/generated/src/models/CompareMarketPricesRequest.d.ts +3 -3
- package/dist/esm/generated/src/models/CompareMarketPricesRequest.js +3 -3
- package/dist/esm/generated/src/models/FetchArbitrageParams.d.ts +17 -0
- package/dist/esm/generated/src/models/FetchArbitrageParams.js +12 -0
- package/dist/esm/generated/src/models/FetchEventMatchesParams.d.ts +7 -0
- package/dist/esm/generated/src/models/FetchEventMatchesParams.js +3 -0
- package/dist/esm/generated/src/models/FetchMarketMatches200Response.d.ts +46 -0
- package/dist/esm/generated/src/models/{FetchMatches200Response.js → FetchMarketMatches200Response.js} +8 -8
- package/dist/esm/generated/src/models/FetchMarketMatchesParams.d.ts +86 -0
- package/dist/esm/generated/src/models/{FetchMatchesParams.js → FetchMarketMatchesParams.js} +12 -9
- package/dist/esm/generated/src/models/UnifiedEvent.d.ts +6 -0
- package/dist/esm/generated/src/models/UnifiedEvent.js +2 -0
- package/dist/esm/generated/src/models/UnifiedMarket.d.ts +6 -0
- package/dist/esm/generated/src/models/UnifiedMarket.js +2 -0
- package/dist/esm/generated/src/models/index.d.ts +2 -2
- package/dist/esm/generated/src/models/index.js +2 -2
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/pmxt/client.js +2 -0
- package/dist/esm/pmxt/models.d.ts +66 -0
- package/dist/esm/pmxt/router.d.ts +133 -0
- package/dist/esm/pmxt/router.js +338 -0
- package/dist/generated/src/apis/DefaultApi.d.ts +72 -7
- package/dist/generated/src/apis/DefaultApi.js +108 -7
- package/dist/generated/src/models/ArbitrageOpportunity.d.ts +23 -0
- package/dist/generated/src/models/ArbitrageOpportunity.js +15 -0
- package/dist/generated/src/models/CompareMarketPricesRequest.d.ts +3 -3
- package/dist/generated/src/models/CompareMarketPricesRequest.js +3 -3
- package/dist/generated/src/models/FetchArbitrageParams.d.ts +17 -0
- package/dist/generated/src/models/FetchArbitrageParams.js +13 -0
- package/dist/generated/src/models/FetchEventMatchesParams.d.ts +7 -0
- package/dist/generated/src/models/FetchEventMatchesParams.js +3 -0
- package/dist/generated/src/models/FetchMarketMatches200Response.d.ts +46 -0
- package/dist/generated/src/models/{FetchMatches200Response.js → FetchMarketMatches200Response.js} +13 -13
- package/dist/generated/src/models/FetchMarketMatchesParams.d.ts +86 -0
- package/dist/generated/src/models/{FetchMatchesParams.js → FetchMarketMatchesParams.js} +18 -15
- package/dist/generated/src/models/UnifiedEvent.d.ts +6 -0
- package/dist/generated/src/models/UnifiedEvent.js +2 -0
- package/dist/generated/src/models/UnifiedMarket.d.ts +6 -0
- package/dist/generated/src/models/UnifiedMarket.js +2 -0
- package/dist/generated/src/models/index.d.ts +2 -2
- package/dist/generated/src/models/index.js +2 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +5 -1
- package/dist/pmxt/client.js +2 -0
- package/dist/pmxt/models.d.ts +66 -0
- package/dist/pmxt/router.d.ts +133 -0
- package/dist/pmxt/router.js +375 -0
- package/generated/.openapi-generator/FILES +4 -4
- package/generated/docs/ArbitrageOpportunity.md +4 -0
- package/generated/docs/CompareMarketPricesRequest.md +1 -1
- package/generated/docs/DefaultApi.md +112 -10
- package/generated/docs/FetchArbitrageParams.md +2 -0
- package/generated/docs/FetchEventMatchesParams.md +2 -0
- package/generated/docs/{FetchMatches200Response.md → FetchMarketMatches200Response.md} +4 -4
- package/generated/docs/{FetchMatchesParams.md → FetchMarketMatchesParams.md} +6 -4
- package/generated/docs/UnifiedEvent.md +2 -0
- package/generated/docs/UnifiedMarket.md +2 -0
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +159 -10
- package/generated/src/models/ArbitrageOpportunity.ts +30 -0
- package/generated/src/models/CompareMarketPricesRequest.ts +11 -11
- package/generated/src/models/FetchArbitrageParams.ts +22 -0
- package/generated/src/models/FetchEventMatchesParams.ts +16 -0
- package/generated/src/models/{FetchMatches200Response.ts → FetchMarketMatches200Response.ts} +13 -13
- package/generated/src/models/{FetchMatchesParams.ts → FetchMarketMatchesParams.ts} +36 -20
- package/generated/src/models/UnifiedEvent.ts +8 -0
- package/generated/src/models/UnifiedMarket.ts +8 -0
- package/generated/src/models/index.ts +2 -2
- package/index.ts +3 -0
- package/package.json +2 -2
- package/pmxt/client.ts +2 -0
- package/pmxt/models.ts +97 -0
- package/pmxt/router.ts +385 -0
- package/dist/esm/generated/src/models/FetchMatches200Response.d.ts +0 -46
- package/dist/esm/generated/src/models/FetchMatchesParams.d.ts +0 -79
- package/dist/generated/src/models/FetchMatches200Response.d.ts +0 -46
- package/dist/generated/src/models/FetchMatchesParams.d.ts +0 -79
|
@@ -69,8 +69,34 @@ export interface ArbitrageOpportunity {
|
|
|
69
69
|
* @memberof ArbitrageOpportunity
|
|
70
70
|
*/
|
|
71
71
|
sellPrice: number;
|
|
72
|
+
/**
|
|
73
|
+
* The set-theoretic relation between the two markets (e.g. identity, subset).
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof ArbitrageOpportunity
|
|
76
|
+
*/
|
|
77
|
+
relation?: ArbitrageOpportunityRelationEnum;
|
|
78
|
+
/**
|
|
79
|
+
* Match confidence score (0.0 to 1.0).
|
|
80
|
+
* @type {number}
|
|
81
|
+
* @memberof ArbitrageOpportunity
|
|
82
|
+
*/
|
|
83
|
+
confidence?: number;
|
|
72
84
|
}
|
|
73
85
|
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @export
|
|
89
|
+
*/
|
|
90
|
+
export const ArbitrageOpportunityRelationEnum = {
|
|
91
|
+
Identity: 'identity',
|
|
92
|
+
Subset: 'subset',
|
|
93
|
+
Superset: 'superset',
|
|
94
|
+
Overlap: 'overlap',
|
|
95
|
+
Disjoint: 'disjoint'
|
|
96
|
+
} as const;
|
|
97
|
+
export type ArbitrageOpportunityRelationEnum = typeof ArbitrageOpportunityRelationEnum[keyof typeof ArbitrageOpportunityRelationEnum];
|
|
98
|
+
|
|
99
|
+
|
|
74
100
|
/**
|
|
75
101
|
* Check if a given object implements the ArbitrageOpportunity interface.
|
|
76
102
|
*/
|
|
@@ -102,6 +128,8 @@ export function ArbitrageOpportunityFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
102
128
|
'sellVenue': json['sellVenue'],
|
|
103
129
|
'buyPrice': json['buyPrice'],
|
|
104
130
|
'sellPrice': json['sellPrice'],
|
|
131
|
+
'relation': json['relation'] == null ? undefined : json['relation'],
|
|
132
|
+
'confidence': json['confidence'] == null ? undefined : json['confidence'],
|
|
105
133
|
};
|
|
106
134
|
}
|
|
107
135
|
|
|
@@ -123,6 +151,8 @@ export function ArbitrageOpportunityToJSONTyped(value?: ArbitrageOpportunity | n
|
|
|
123
151
|
'sellVenue': value['sellVenue'],
|
|
124
152
|
'buyPrice': value['buyPrice'],
|
|
125
153
|
'sellPrice': value['sellPrice'],
|
|
154
|
+
'relation': value['relation'],
|
|
155
|
+
'confidence': value['confidence'],
|
|
126
156
|
};
|
|
127
157
|
}
|
|
128
158
|
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { FetchMarketMatchesParams } from './FetchMarketMatchesParams';
|
|
17
|
+
import {
|
|
18
|
+
FetchMarketMatchesParamsFromJSON,
|
|
19
|
+
FetchMarketMatchesParamsFromJSONTyped,
|
|
20
|
+
FetchMarketMatchesParamsToJSON,
|
|
21
|
+
FetchMarketMatchesParamsToJSONTyped,
|
|
22
|
+
} from './FetchMarketMatchesParams';
|
|
16
23
|
import type { ExchangeCredentials } from './ExchangeCredentials';
|
|
17
24
|
import {
|
|
18
25
|
ExchangeCredentialsFromJSON,
|
|
@@ -20,13 +27,6 @@ import {
|
|
|
20
27
|
ExchangeCredentialsToJSON,
|
|
21
28
|
ExchangeCredentialsToJSONTyped,
|
|
22
29
|
} from './ExchangeCredentials';
|
|
23
|
-
import type { FetchMatchesParams } from './FetchMatchesParams';
|
|
24
|
-
import {
|
|
25
|
-
FetchMatchesParamsFromJSON,
|
|
26
|
-
FetchMatchesParamsFromJSONTyped,
|
|
27
|
-
FetchMatchesParamsToJSON,
|
|
28
|
-
FetchMatchesParamsToJSONTyped,
|
|
29
|
-
} from './FetchMatchesParams';
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
@@ -36,10 +36,10 @@ import {
|
|
|
36
36
|
export interface CompareMarketPricesRequest {
|
|
37
37
|
/**
|
|
38
38
|
*
|
|
39
|
-
* @type {Array<
|
|
39
|
+
* @type {Array<FetchMarketMatchesParams>}
|
|
40
40
|
* @memberof CompareMarketPricesRequest
|
|
41
41
|
*/
|
|
42
|
-
args: Array<
|
|
42
|
+
args: Array<FetchMarketMatchesParams>;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
45
|
* @type {ExchangeCredentials}
|
|
@@ -66,7 +66,7 @@ export function CompareMarketPricesRequestFromJSONTyped(json: any, ignoreDiscrim
|
|
|
66
66
|
}
|
|
67
67
|
return {
|
|
68
68
|
|
|
69
|
-
'args': ((json['args'] as Array<any>).map(
|
|
69
|
+
'args': ((json['args'] as Array<any>).map(FetchMarketMatchesParamsFromJSON)),
|
|
70
70
|
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
71
71
|
};
|
|
72
72
|
}
|
|
@@ -82,7 +82,7 @@ export function CompareMarketPricesRequestToJSONTyped(value?: CompareMarketPrice
|
|
|
82
82
|
|
|
83
83
|
return {
|
|
84
84
|
|
|
85
|
-
'args': ((value['args'] as Array<any>).map(
|
|
85
|
+
'args': ((value['args'] as Array<any>).map(FetchMarketMatchesParamsToJSON)),
|
|
86
86
|
'credentials': ExchangeCredentialsToJSON(value['credentials']),
|
|
87
87
|
};
|
|
88
88
|
}
|
|
@@ -37,8 +37,28 @@ export interface FetchArbitrageParams {
|
|
|
37
37
|
* @memberof FetchArbitrageParams
|
|
38
38
|
*/
|
|
39
39
|
limit?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Comma-separated relation types to include (default: 'identity').
|
|
42
|
+
* @type {Array<string>}
|
|
43
|
+
* @memberof FetchArbitrageParams
|
|
44
|
+
*/
|
|
45
|
+
relations?: Array<FetchArbitrageParamsRelationsEnum>;
|
|
40
46
|
}
|
|
41
47
|
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export const FetchArbitrageParamsRelationsEnum = {
|
|
53
|
+
Identity: 'identity',
|
|
54
|
+
Subset: 'subset',
|
|
55
|
+
Superset: 'superset',
|
|
56
|
+
Overlap: 'overlap',
|
|
57
|
+
Disjoint: 'disjoint'
|
|
58
|
+
} as const;
|
|
59
|
+
export type FetchArbitrageParamsRelationsEnum = typeof FetchArbitrageParamsRelationsEnum[keyof typeof FetchArbitrageParamsRelationsEnum];
|
|
60
|
+
|
|
61
|
+
|
|
42
62
|
/**
|
|
43
63
|
* Check if a given object implements the FetchArbitrageParams interface.
|
|
44
64
|
*/
|
|
@@ -59,6 +79,7 @@ export function FetchArbitrageParamsFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
59
79
|
'minSpread': json['minSpread'] == null ? undefined : json['minSpread'],
|
|
60
80
|
'category': json['category'] == null ? undefined : json['category'],
|
|
61
81
|
'limit': json['limit'] == null ? undefined : json['limit'],
|
|
82
|
+
'relations': json['relations'] == null ? undefined : json['relations'],
|
|
62
83
|
};
|
|
63
84
|
}
|
|
64
85
|
|
|
@@ -76,6 +97,7 @@ export function FetchArbitrageParamsToJSONTyped(value?: FetchArbitrageParams | n
|
|
|
76
97
|
'minSpread': value['minSpread'],
|
|
77
98
|
'category': value['category'],
|
|
78
99
|
'limit': value['limit'],
|
|
100
|
+
'relations': value['relations'],
|
|
79
101
|
};
|
|
80
102
|
}
|
|
81
103
|
|
|
@@ -13,12 +13,26 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { UnifiedEvent } from './UnifiedEvent';
|
|
17
|
+
import {
|
|
18
|
+
UnifiedEventFromJSON,
|
|
19
|
+
UnifiedEventFromJSONTyped,
|
|
20
|
+
UnifiedEventToJSON,
|
|
21
|
+
UnifiedEventToJSONTyped,
|
|
22
|
+
} from './UnifiedEvent';
|
|
23
|
+
|
|
16
24
|
/**
|
|
17
25
|
*
|
|
18
26
|
* @export
|
|
19
27
|
* @interface FetchEventMatchesParams
|
|
20
28
|
*/
|
|
21
29
|
export interface FetchEventMatchesParams {
|
|
30
|
+
/**
|
|
31
|
+
* Pass a UnifiedEvent directly instead of eventId/slug.
|
|
32
|
+
* @type {UnifiedEvent}
|
|
33
|
+
* @memberof FetchEventMatchesParams
|
|
34
|
+
*/
|
|
35
|
+
event?: UnifiedEvent;
|
|
22
36
|
/**
|
|
23
37
|
*
|
|
24
38
|
* @type {string}
|
|
@@ -88,6 +102,7 @@ export function FetchEventMatchesParamsFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
88
102
|
}
|
|
89
103
|
return {
|
|
90
104
|
|
|
105
|
+
'event': json['event'] == null ? undefined : UnifiedEventFromJSON(json['event']),
|
|
91
106
|
'eventId': json['eventId'] == null ? undefined : json['eventId'],
|
|
92
107
|
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
93
108
|
'relation': json['relation'] == null ? undefined : json['relation'],
|
|
@@ -108,6 +123,7 @@ export function FetchEventMatchesParamsToJSONTyped(value?: FetchEventMatchesPara
|
|
|
108
123
|
|
|
109
124
|
return {
|
|
110
125
|
|
|
126
|
+
'event': UnifiedEventToJSON(value['event']),
|
|
111
127
|
'eventId': value['eventId'],
|
|
112
128
|
'slug': value['slug'],
|
|
113
129
|
'relation': value['relation'],
|
package/generated/src/models/{FetchMatches200Response.ts → FetchMarketMatches200Response.ts}
RENAMED
|
@@ -31,41 +31,41 @@ import {
|
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
33
33
|
* @export
|
|
34
|
-
* @interface
|
|
34
|
+
* @interface FetchMarketMatches200Response
|
|
35
35
|
*/
|
|
36
|
-
export interface
|
|
36
|
+
export interface FetchMarketMatches200Response {
|
|
37
37
|
/**
|
|
38
38
|
*
|
|
39
39
|
* @type {boolean}
|
|
40
|
-
* @memberof
|
|
40
|
+
* @memberof FetchMarketMatches200Response
|
|
41
41
|
*/
|
|
42
42
|
success?: boolean;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
45
|
* @type {ErrorDetail}
|
|
46
|
-
* @memberof
|
|
46
|
+
* @memberof FetchMarketMatches200Response
|
|
47
47
|
*/
|
|
48
48
|
error?: ErrorDetail;
|
|
49
49
|
/**
|
|
50
50
|
*
|
|
51
51
|
* @type {Array<MatchResult>}
|
|
52
|
-
* @memberof
|
|
52
|
+
* @memberof FetchMarketMatches200Response
|
|
53
53
|
*/
|
|
54
54
|
data?: Array<MatchResult>;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
|
-
* Check if a given object implements the
|
|
58
|
+
* Check if a given object implements the FetchMarketMatches200Response interface.
|
|
59
59
|
*/
|
|
60
|
-
export function
|
|
60
|
+
export function instanceOfFetchMarketMatches200Response(value: object): value is FetchMarketMatches200Response {
|
|
61
61
|
return true;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export function
|
|
65
|
-
return
|
|
64
|
+
export function FetchMarketMatches200ResponseFromJSON(json: any): FetchMarketMatches200Response {
|
|
65
|
+
return FetchMarketMatches200ResponseFromJSONTyped(json, false);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
export function
|
|
68
|
+
export function FetchMarketMatches200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FetchMarketMatches200Response {
|
|
69
69
|
if (json == null) {
|
|
70
70
|
return json;
|
|
71
71
|
}
|
|
@@ -77,11 +77,11 @@ export function FetchMatches200ResponseFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
export function
|
|
81
|
-
return
|
|
80
|
+
export function FetchMarketMatches200ResponseToJSON(json: any): FetchMarketMatches200Response {
|
|
81
|
+
return FetchMarketMatches200ResponseToJSONTyped(json, false);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
export function
|
|
84
|
+
export function FetchMarketMatches200ResponseToJSONTyped(value?: FetchMarketMatches200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
85
85
|
if (value == null) {
|
|
86
86
|
return value;
|
|
87
87
|
}
|
|
@@ -13,52 +13,66 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
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
|
+
|
|
16
24
|
/**
|
|
17
25
|
*
|
|
18
26
|
* @export
|
|
19
|
-
* @interface
|
|
27
|
+
* @interface FetchMarketMatchesParams
|
|
20
28
|
*/
|
|
21
|
-
export interface
|
|
29
|
+
export interface FetchMarketMatchesParams {
|
|
30
|
+
/**
|
|
31
|
+
* Pass a UnifiedMarket directly instead of marketId/slug/url.
|
|
32
|
+
* @type {UnifiedMarket}
|
|
33
|
+
* @memberof FetchMarketMatchesParams
|
|
34
|
+
*/
|
|
35
|
+
market?: UnifiedMarket;
|
|
22
36
|
/**
|
|
23
37
|
*
|
|
24
38
|
* @type {string}
|
|
25
|
-
* @memberof
|
|
39
|
+
* @memberof FetchMarketMatchesParams
|
|
26
40
|
*/
|
|
27
41
|
marketId?: string;
|
|
28
42
|
/**
|
|
29
43
|
*
|
|
30
44
|
* @type {string}
|
|
31
|
-
* @memberof
|
|
45
|
+
* @memberof FetchMarketMatchesParams
|
|
32
46
|
*/
|
|
33
47
|
slug?: string;
|
|
34
48
|
/**
|
|
35
49
|
*
|
|
36
50
|
* @type {string}
|
|
37
|
-
* @memberof
|
|
51
|
+
* @memberof FetchMarketMatchesParams
|
|
38
52
|
*/
|
|
39
53
|
url?: string;
|
|
40
54
|
/**
|
|
41
55
|
*
|
|
42
56
|
* @type {string}
|
|
43
|
-
* @memberof
|
|
57
|
+
* @memberof FetchMarketMatchesParams
|
|
44
58
|
*/
|
|
45
|
-
relation?:
|
|
59
|
+
relation?: FetchMarketMatchesParamsRelationEnum;
|
|
46
60
|
/**
|
|
47
61
|
*
|
|
48
62
|
* @type {number}
|
|
49
|
-
* @memberof
|
|
63
|
+
* @memberof FetchMarketMatchesParams
|
|
50
64
|
*/
|
|
51
65
|
minConfidence?: number;
|
|
52
66
|
/**
|
|
53
67
|
*
|
|
54
68
|
* @type {number}
|
|
55
|
-
* @memberof
|
|
69
|
+
* @memberof FetchMarketMatchesParams
|
|
56
70
|
*/
|
|
57
71
|
limit?: number;
|
|
58
72
|
/**
|
|
59
73
|
*
|
|
60
74
|
* @type {boolean}
|
|
61
|
-
* @memberof
|
|
75
|
+
* @memberof FetchMarketMatchesParams
|
|
62
76
|
*/
|
|
63
77
|
includePrices?: boolean;
|
|
64
78
|
}
|
|
@@ -67,33 +81,34 @@ export interface FetchMatchesParams {
|
|
|
67
81
|
/**
|
|
68
82
|
* @export
|
|
69
83
|
*/
|
|
70
|
-
export const
|
|
84
|
+
export const FetchMarketMatchesParamsRelationEnum = {
|
|
71
85
|
Identity: 'identity',
|
|
72
86
|
Subset: 'subset',
|
|
73
87
|
Superset: 'superset',
|
|
74
88
|
Overlap: 'overlap',
|
|
75
89
|
Disjoint: 'disjoint'
|
|
76
90
|
} as const;
|
|
77
|
-
export type
|
|
91
|
+
export type FetchMarketMatchesParamsRelationEnum = typeof FetchMarketMatchesParamsRelationEnum[keyof typeof FetchMarketMatchesParamsRelationEnum];
|
|
78
92
|
|
|
79
93
|
|
|
80
94
|
/**
|
|
81
|
-
* Check if a given object implements the
|
|
95
|
+
* Check if a given object implements the FetchMarketMatchesParams interface.
|
|
82
96
|
*/
|
|
83
|
-
export function
|
|
97
|
+
export function instanceOfFetchMarketMatchesParams(value: object): value is FetchMarketMatchesParams {
|
|
84
98
|
return true;
|
|
85
99
|
}
|
|
86
100
|
|
|
87
|
-
export function
|
|
88
|
-
return
|
|
101
|
+
export function FetchMarketMatchesParamsFromJSON(json: any): FetchMarketMatchesParams {
|
|
102
|
+
return FetchMarketMatchesParamsFromJSONTyped(json, false);
|
|
89
103
|
}
|
|
90
104
|
|
|
91
|
-
export function
|
|
105
|
+
export function FetchMarketMatchesParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): FetchMarketMatchesParams {
|
|
92
106
|
if (json == null) {
|
|
93
107
|
return json;
|
|
94
108
|
}
|
|
95
109
|
return {
|
|
96
110
|
|
|
111
|
+
'market': json['market'] == null ? undefined : UnifiedMarketFromJSON(json['market']),
|
|
97
112
|
'marketId': json['marketId'] == null ? undefined : json['marketId'],
|
|
98
113
|
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
99
114
|
'url': json['url'] == null ? undefined : json['url'],
|
|
@@ -104,17 +119,18 @@ export function FetchMatchesParamsFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
104
119
|
};
|
|
105
120
|
}
|
|
106
121
|
|
|
107
|
-
export function
|
|
108
|
-
return
|
|
122
|
+
export function FetchMarketMatchesParamsToJSON(json: any): FetchMarketMatchesParams {
|
|
123
|
+
return FetchMarketMatchesParamsToJSONTyped(json, false);
|
|
109
124
|
}
|
|
110
125
|
|
|
111
|
-
export function
|
|
126
|
+
export function FetchMarketMatchesParamsToJSONTyped(value?: FetchMarketMatchesParams | null, ignoreDiscriminator: boolean = false): any {
|
|
112
127
|
if (value == null) {
|
|
113
128
|
return value;
|
|
114
129
|
}
|
|
115
130
|
|
|
116
131
|
return {
|
|
117
132
|
|
|
133
|
+
'market': UnifiedMarketToJSON(value['market']),
|
|
118
134
|
'marketId': value['marketId'],
|
|
119
135
|
'slug': value['slug'],
|
|
120
136
|
'url': value['url'],
|
|
@@ -93,6 +93,12 @@ export interface UnifiedEvent {
|
|
|
93
93
|
* @memberof UnifiedEvent
|
|
94
94
|
*/
|
|
95
95
|
tags?: Array<string>;
|
|
96
|
+
/**
|
|
97
|
+
* The exchange/venue this event originates from (e.g. 'polymarket', 'kalshi'). Populated by the Router.
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof UnifiedEvent
|
|
100
|
+
*/
|
|
101
|
+
sourceExchange?: string;
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
/**
|
|
@@ -130,6 +136,7 @@ export function UnifiedEventFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
130
136
|
'image': json['image'] == null ? undefined : json['image'],
|
|
131
137
|
'category': json['category'] == null ? undefined : json['category'],
|
|
132
138
|
'tags': json['tags'] == null ? undefined : json['tags'],
|
|
139
|
+
'sourceExchange': json['sourceExchange'] == null ? undefined : json['sourceExchange'],
|
|
133
140
|
};
|
|
134
141
|
}
|
|
135
142
|
|
|
@@ -155,6 +162,7 @@ export function UnifiedEventToJSONTyped(value?: UnifiedEvent | null, ignoreDiscr
|
|
|
155
162
|
'image': value['image'],
|
|
156
163
|
'category': value['category'],
|
|
157
164
|
'tags': value['tags'],
|
|
165
|
+
'sourceExchange': value['sourceExchange'],
|
|
158
166
|
};
|
|
159
167
|
}
|
|
160
168
|
|
|
@@ -135,6 +135,12 @@ export interface UnifiedMarket {
|
|
|
135
135
|
* @memberof UnifiedMarket
|
|
136
136
|
*/
|
|
137
137
|
contractAddress?: string;
|
|
138
|
+
/**
|
|
139
|
+
* The exchange/venue this market originates from (e.g. 'polymarket', 'kalshi'). Populated by the Router.
|
|
140
|
+
* @type {string}
|
|
141
|
+
* @memberof UnifiedMarket
|
|
142
|
+
*/
|
|
143
|
+
sourceExchange?: string;
|
|
138
144
|
/**
|
|
139
145
|
* Convenience accessor for the YES outcome on a binary market.
|
|
140
146
|
* @type {MarketOutcome}
|
|
@@ -204,6 +210,7 @@ export function UnifiedMarketFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
204
210
|
'tickSize': json['tickSize'] == null ? undefined : json['tickSize'],
|
|
205
211
|
'status': json['status'] == null ? undefined : json['status'],
|
|
206
212
|
'contractAddress': json['contractAddress'] == null ? undefined : json['contractAddress'],
|
|
213
|
+
'sourceExchange': json['sourceExchange'] == null ? undefined : json['sourceExchange'],
|
|
207
214
|
'yes': json['yes'] == null ? undefined : MarketOutcomeFromJSON(json['yes']),
|
|
208
215
|
'no': json['no'] == null ? undefined : MarketOutcomeFromJSON(json['no']),
|
|
209
216
|
'up': json['up'] == null ? undefined : MarketOutcomeFromJSON(json['up']),
|
|
@@ -240,6 +247,7 @@ export function UnifiedMarketToJSONTyped(value?: UnifiedMarket | null, ignoreDis
|
|
|
240
247
|
'tickSize': value['tickSize'],
|
|
241
248
|
'status': value['status'],
|
|
242
249
|
'contractAddress': value['contractAddress'],
|
|
250
|
+
'sourceExchange': value['sourceExchange'],
|
|
243
251
|
'yes': MarketOutcomeToJSON(value['yes']),
|
|
244
252
|
'no': MarketOutcomeToJSON(value['no']),
|
|
245
253
|
'up': MarketOutcomeToJSON(value['up']),
|
|
@@ -32,10 +32,10 @@ export * from './FetchEventMatches200Response';
|
|
|
32
32
|
export * from './FetchEventMatchesParams';
|
|
33
33
|
export * from './FetchEvents200Response';
|
|
34
34
|
export * from './FetchMarket200Response';
|
|
35
|
+
export * from './FetchMarketMatches200Response';
|
|
36
|
+
export * from './FetchMarketMatchesParams';
|
|
35
37
|
export * from './FetchMarkets200Response';
|
|
36
38
|
export * from './FetchMarketsPaginated200Response';
|
|
37
|
-
export * from './FetchMatches200Response';
|
|
38
|
-
export * from './FetchMatchesParams';
|
|
39
39
|
export * from './FetchMyTrades200Response';
|
|
40
40
|
export * from './FetchOHLCV200Response';
|
|
41
41
|
export * from './FetchOpenOrders200Response';
|
package/index.ts
CHANGED
|
@@ -20,11 +20,13 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
import { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS } from "./pmxt/client.js";
|
|
23
|
+
import { Router } from "./pmxt/router.js";
|
|
23
24
|
import { ServerManager } from "./pmxt/server-manager.js";
|
|
24
25
|
import * as models from "./pmxt/models.js";
|
|
25
26
|
import * as errors from "./pmxt/errors.js";
|
|
26
27
|
|
|
27
28
|
export { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS, PolymarketOptions } from "./pmxt/client.js";
|
|
29
|
+
export { Router } from "./pmxt/router.js";
|
|
28
30
|
export { ServerManager } from "./pmxt/server-manager.js";
|
|
29
31
|
export { MarketList } from "./pmxt/models.js";
|
|
30
32
|
export type * from "./pmxt/models.js";
|
|
@@ -77,6 +79,7 @@ const pmxt = {
|
|
|
77
79
|
Metaculus,
|
|
78
80
|
Smarkets,
|
|
79
81
|
PolymarketUS,
|
|
82
|
+
Router,
|
|
80
83
|
ServerManager,
|
|
81
84
|
server,
|
|
82
85
|
stopServer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmxtjs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.34.0",
|
|
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.
|
|
46
|
+
"pmxt-core": "2.34.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/jest": "^30.0.0",
|
package/pmxt/client.ts
CHANGED
|
@@ -132,6 +132,7 @@ function convertMarket(raw: any): UnifiedMarket {
|
|
|
132
132
|
tickSize: raw.tickSize,
|
|
133
133
|
status: raw.status,
|
|
134
134
|
contractAddress: raw.contractAddress,
|
|
135
|
+
sourceExchange: raw.sourceExchange,
|
|
135
136
|
eventId: raw.eventId,
|
|
136
137
|
yes: convertOutcome(raw.yes),
|
|
137
138
|
no: convertOutcome(raw.no),
|
|
@@ -247,6 +248,7 @@ function convertEvent(raw: any): UnifiedEvent {
|
|
|
247
248
|
image: raw.image,
|
|
248
249
|
category: raw.category,
|
|
249
250
|
tags: raw.tags,
|
|
251
|
+
sourceExchange: raw.sourceExchange,
|
|
250
252
|
};
|
|
251
253
|
|
|
252
254
|
return event;
|
package/pmxt/models.ts
CHANGED
|
@@ -86,6 +86,9 @@ export interface UnifiedMarket {
|
|
|
86
86
|
/** On-chain contract / condition identifier where applicable (Polymarket conditionId, etc.). */
|
|
87
87
|
contractAddress?: string;
|
|
88
88
|
|
|
89
|
+
/** The exchange/venue this market originates from (e.g. 'polymarket', 'kalshi'). Populated by the Router. */
|
|
90
|
+
sourceExchange?: string;
|
|
91
|
+
|
|
89
92
|
/** ID of the parent event this market belongs to */
|
|
90
93
|
eventId?: string;
|
|
91
94
|
|
|
@@ -545,6 +548,9 @@ export interface UnifiedEvent {
|
|
|
545
548
|
|
|
546
549
|
/** Event tags */
|
|
547
550
|
tags?: string[];
|
|
551
|
+
|
|
552
|
+
/** The exchange/venue this event originates from (e.g. 'polymarket', 'kalshi'). Populated by the Router. */
|
|
553
|
+
sourceExchange?: string;
|
|
548
554
|
}
|
|
549
555
|
|
|
550
556
|
// ----------------------------------------------------------------------------
|
|
@@ -664,3 +670,94 @@ export interface SubscribedAddressSnapshot {
|
|
|
664
670
|
/** Unix timestamp (ms) of this snapshot */
|
|
665
671
|
timestamp: number;
|
|
666
672
|
}
|
|
673
|
+
|
|
674
|
+
// ----------------------------------------------------------------------------
|
|
675
|
+
// Router Types
|
|
676
|
+
// ----------------------------------------------------------------------------
|
|
677
|
+
|
|
678
|
+
/** Set-theoretic relation between two markets' resolution conditions. */
|
|
679
|
+
export type MatchRelation = 'identity' | 'subset' | 'superset' | 'overlap' | 'disjoint';
|
|
680
|
+
|
|
681
|
+
/** A cross-venue market match with relation classification. */
|
|
682
|
+
export interface MatchResult {
|
|
683
|
+
/** The matched market on another venue. */
|
|
684
|
+
market: UnifiedMarket;
|
|
685
|
+
|
|
686
|
+
/** Set-theoretic relation between the source and matched market. */
|
|
687
|
+
relation: MatchRelation;
|
|
688
|
+
|
|
689
|
+
/** Confidence score (0.0 to 1.0). */
|
|
690
|
+
confidence: number;
|
|
691
|
+
|
|
692
|
+
/** Human-readable explanation of the match. */
|
|
693
|
+
reasoning?: string;
|
|
694
|
+
|
|
695
|
+
/** Best bid price on the matched venue (when includePrices=true). */
|
|
696
|
+
bestBid?: number;
|
|
697
|
+
|
|
698
|
+
/** Best ask price on the matched venue (when includePrices=true). */
|
|
699
|
+
bestAsk?: number;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
/** A cross-venue event match with constituent market matches. */
|
|
703
|
+
export interface EventMatchResult {
|
|
704
|
+
/** The matched event on another venue. */
|
|
705
|
+
event: UnifiedEvent;
|
|
706
|
+
|
|
707
|
+
/** Cross-venue market matches within this event. */
|
|
708
|
+
marketMatches: MatchResult[];
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/** Side-by-side price comparison for a matched market. */
|
|
712
|
+
export interface PriceComparison {
|
|
713
|
+
/** The matched market. */
|
|
714
|
+
market: UnifiedMarket;
|
|
715
|
+
|
|
716
|
+
/** Relation type (typically 'identity' for price comparisons). */
|
|
717
|
+
relation: MatchRelation;
|
|
718
|
+
|
|
719
|
+
/** Confidence score (0.0 to 1.0). */
|
|
720
|
+
confidence: number;
|
|
721
|
+
|
|
722
|
+
/** Human-readable explanation. */
|
|
723
|
+
reasoning?: string;
|
|
724
|
+
|
|
725
|
+
/** Best bid price on this venue. */
|
|
726
|
+
bestBid?: number;
|
|
727
|
+
|
|
728
|
+
/** Best ask price on this venue. */
|
|
729
|
+
bestAsk?: number;
|
|
730
|
+
|
|
731
|
+
/** The venue name (e.g. 'kalshi', 'polymarket'). */
|
|
732
|
+
venue: string;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
/** A cross-venue arbitrage opportunity. */
|
|
736
|
+
export interface ArbitrageOpportunity {
|
|
737
|
+
/** Market on the buy side. */
|
|
738
|
+
marketA: UnifiedMarket;
|
|
739
|
+
|
|
740
|
+
/** Market on the sell side. */
|
|
741
|
+
marketB: UnifiedMarket;
|
|
742
|
+
|
|
743
|
+
/** Price spread (sellPrice - buyPrice). */
|
|
744
|
+
spread: number;
|
|
745
|
+
|
|
746
|
+
/** Venue to buy on. */
|
|
747
|
+
buyVenue: string;
|
|
748
|
+
|
|
749
|
+
/** Venue to sell on. */
|
|
750
|
+
sellVenue: string;
|
|
751
|
+
|
|
752
|
+
/** Price to buy at. */
|
|
753
|
+
buyPrice: number;
|
|
754
|
+
|
|
755
|
+
/** Price to sell at. */
|
|
756
|
+
sellPrice: number;
|
|
757
|
+
|
|
758
|
+
/** The set-theoretic relation between the two markets (e.g. identity, subset). */
|
|
759
|
+
relation?: MatchRelation;
|
|
760
|
+
|
|
761
|
+
/** Match confidence score (0.0 to 1.0). */
|
|
762
|
+
confidence?: number;
|
|
763
|
+
}
|