pmxt-core 2.50.13 → 2.50.14
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/BaseExchange.d.ts +8 -0
- package/dist/exchanges/kalshi/api.d.ts +1 -1
- package/dist/exchanges/kalshi/api.js +1 -1
- package/dist/exchanges/limitless/api.d.ts +1 -1
- package/dist/exchanges/limitless/api.js +1 -1
- package/dist/exchanges/myriad/api.d.ts +1 -1
- package/dist/exchanges/myriad/api.js +1 -1
- package/dist/exchanges/opinion/api.d.ts +1 -1
- package/dist/exchanges/opinion/api.js +1 -1
- package/dist/exchanges/polymarket/api-clob.d.ts +1 -1
- package/dist/exchanges/polymarket/api-clob.js +1 -1
- package/dist/exchanges/polymarket/api-data.d.ts +1 -1
- package/dist/exchanges/polymarket/api-data.js +1 -1
- package/dist/exchanges/polymarket/api-gamma.d.ts +1 -1
- package/dist/exchanges/polymarket/api-gamma.js +1 -1
- package/dist/exchanges/probable/api.d.ts +1 -1
- package/dist/exchanges/probable/api.js +1 -1
- package/dist/router/Router.js +2 -0
- package/dist/server/openapi.yaml +60 -0
- package/package.json +3 -3
package/dist/BaseExchange.d.ts
CHANGED
|
@@ -50,6 +50,10 @@ export interface MarketFilterParams {
|
|
|
50
50
|
eventId?: string;
|
|
51
51
|
page?: number;
|
|
52
52
|
similarityThreshold?: number;
|
|
53
|
+
/** Filter by source venue (e.g. 'polymarket', 'kalshi', 'myriad'). `exchange` is an alias. */
|
|
54
|
+
sourceExchange?: string;
|
|
55
|
+
/** Alias for `sourceExchange`. */
|
|
56
|
+
exchange?: string;
|
|
53
57
|
}
|
|
54
58
|
export interface MarketFetchParams extends MarketFilterParams {
|
|
55
59
|
/** Optional client-side filter applied after fetching */
|
|
@@ -82,6 +86,10 @@ export interface EventFetchParams {
|
|
|
82
86
|
category?: string;
|
|
83
87
|
/** Filter by tags. Returns events matching ANY of the provided tags. Tags are more specific than categories -- for example a "Politics" event might carry tags ["Politics", "Geopolitics", "Middle East", "Iran"]. Common tags include "Crypto", "Elections", "Fed Rates", "FIFA World Cup", "Trump". */
|
|
84
88
|
tags?: string[];
|
|
89
|
+
/** Filter by source venue (e.g. 'polymarket', 'kalshi', 'myriad'). `exchange` is an alias. */
|
|
90
|
+
sourceExchange?: string;
|
|
91
|
+
/** Alias for `sourceExchange`. */
|
|
92
|
+
exchange?: string;
|
|
85
93
|
}
|
|
86
94
|
/**
|
|
87
95
|
* Parameters for `fetchSeries`. Venues that don't expose a series concept
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/kalshi/Kalshi.yaml
|
|
3
|
-
* Generated at: 2026-06-18T13:
|
|
3
|
+
* Generated at: 2026-06-18T13:49:56.415Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const kalshiApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.kalshiApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/kalshi/Kalshi.yaml
|
|
6
|
-
* Generated at: 2026-06-18T13:
|
|
6
|
+
* Generated at: 2026-06-18T13:49:56.415Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.kalshiApiSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/limitless/Limitless.yaml
|
|
3
|
-
* Generated at: 2026-06-18T13:
|
|
3
|
+
* Generated at: 2026-06-18T13:49:56.457Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const limitlessApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.limitlessApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/limitless/Limitless.yaml
|
|
6
|
-
* Generated at: 2026-06-18T13:
|
|
6
|
+
* Generated at: 2026-06-18T13:49:56.457Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.limitlessApiSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/myriad/myriad.yaml
|
|
3
|
-
* Generated at: 2026-06-18T13:
|
|
3
|
+
* Generated at: 2026-06-18T13:49:56.469Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const myriadApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.myriadApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/myriad/myriad.yaml
|
|
6
|
-
* Generated at: 2026-06-18T13:
|
|
6
|
+
* Generated at: 2026-06-18T13:49:56.469Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.myriadApiSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/opinion/opinion-openapi.yaml
|
|
3
|
-
* Generated at: 2026-06-18T13:
|
|
3
|
+
* Generated at: 2026-06-18T13:49:56.475Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const opinionApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.opinionApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/opinion/opinion-openapi.yaml
|
|
6
|
-
* Generated at: 2026-06-18T13:
|
|
6
|
+
* Generated at: 2026-06-18T13:49:56.475Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.opinionApiSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/PolymarketClobAPI.yaml
|
|
3
|
-
* Generated at: 2026-06-18T13:
|
|
3
|
+
* Generated at: 2026-06-18T13:49:56.422Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const polymarketClobSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.polymarketClobSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/PolymarketClobAPI.yaml
|
|
6
|
-
* Generated at: 2026-06-18T13:
|
|
6
|
+
* Generated at: 2026-06-18T13:49:56.422Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.polymarketClobSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/Polymarket_Data_API.yaml
|
|
3
|
-
* Generated at: 2026-06-18T13:
|
|
3
|
+
* Generated at: 2026-06-18T13:49:56.435Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const polymarketDataSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.polymarketDataSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/Polymarket_Data_API.yaml
|
|
6
|
-
* Generated at: 2026-06-18T13:
|
|
6
|
+
* Generated at: 2026-06-18T13:49:56.435Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.polymarketDataSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/PolymarketGammaAPI.yaml
|
|
3
|
-
* Generated at: 2026-06-18T13:
|
|
3
|
+
* Generated at: 2026-06-18T13:49:56.433Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const polymarketGammaSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.polymarketGammaSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/PolymarketGammaAPI.yaml
|
|
6
|
-
* Generated at: 2026-06-18T13:
|
|
6
|
+
* Generated at: 2026-06-18T13:49:56.433Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.polymarketGammaSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/probable/probable.yaml
|
|
3
|
-
* Generated at: 2026-06-18T13:
|
|
3
|
+
* Generated at: 2026-06-18T13:49:56.462Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const probableApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.probableApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/probable/probable.yaml
|
|
6
|
-
* Generated at: 2026-06-18T13:
|
|
6
|
+
* Generated at: 2026-06-18T13:49:56.462Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.probableApiSpec = {
|
package/dist/router/Router.js
CHANGED
|
@@ -121,6 +121,7 @@ class Router extends BaseExchange_1.PredictionMarketExchange {
|
|
|
121
121
|
limit: params?.limit,
|
|
122
122
|
offset: params?.offset,
|
|
123
123
|
closed: params?.status === 'closed' || params?.status === 'inactive',
|
|
124
|
+
sourceExchange: params?.sourceExchange ?? params?.exchange,
|
|
124
125
|
});
|
|
125
126
|
if (!Array.isArray(response)) {
|
|
126
127
|
throw new Error(`fetchMarketsImpl: expected array from searchMarkets but received ${typeof response}`);
|
|
@@ -145,6 +146,7 @@ class Router extends BaseExchange_1.PredictionMarketExchange {
|
|
|
145
146
|
category: params?.category,
|
|
146
147
|
limit: params?.limit,
|
|
147
148
|
offset: params?.offset,
|
|
149
|
+
sourceExchange: params?.sourceExchange ?? params?.exchange,
|
|
148
150
|
});
|
|
149
151
|
if (!Array.isArray(response)) {
|
|
150
152
|
throw new Error(`fetchEventsImpl: expected array from searchEvents but received ${typeof response}`);
|
package/dist/server/openapi.yaml
CHANGED
|
@@ -158,6 +158,18 @@ paths:
|
|
|
158
158
|
schema:
|
|
159
159
|
type: number
|
|
160
160
|
description: For semantic search (used by Limitless)
|
|
161
|
+
- in: query
|
|
162
|
+
name: sourceExchange
|
|
163
|
+
required: false
|
|
164
|
+
schema:
|
|
165
|
+
type: string
|
|
166
|
+
description: 'Filter by source venue (e.g. ''polymarket'', ''kalshi'', ''myriad''). `exchange` is an alias.'
|
|
167
|
+
- in: query
|
|
168
|
+
name: exchange
|
|
169
|
+
required: false
|
|
170
|
+
schema:
|
|
171
|
+
type: string
|
|
172
|
+
description: Alias for `sourceExchange`.
|
|
161
173
|
responses:
|
|
162
174
|
'200':
|
|
163
175
|
description: Fetch Markets response
|
|
@@ -361,6 +373,18 @@ paths:
|
|
|
361
373
|
Filter by tags. Returns events matching ANY of the provided tags. Tags are more specific than categories --
|
|
362
374
|
for example a "Politics" event might carry tags ["Politics", "Geopolitics", "Middle East", "Iran"]. Common
|
|
363
375
|
tags include "Crypto", "Elections", "Fed Rates", "FIFA World Cup", "Trump".
|
|
376
|
+
- in: query
|
|
377
|
+
name: sourceExchange
|
|
378
|
+
required: false
|
|
379
|
+
schema:
|
|
380
|
+
type: string
|
|
381
|
+
description: 'Filter by source venue (e.g. ''polymarket'', ''kalshi'', ''myriad''). `exchange` is an alias.'
|
|
382
|
+
- in: query
|
|
383
|
+
name: exchange
|
|
384
|
+
required: false
|
|
385
|
+
schema:
|
|
386
|
+
type: string
|
|
387
|
+
description: Alias for `sourceExchange`.
|
|
364
388
|
responses:
|
|
365
389
|
'200':
|
|
366
390
|
description: Fetch Events response
|
|
@@ -494,6 +518,18 @@ paths:
|
|
|
494
518
|
schema:
|
|
495
519
|
type: number
|
|
496
520
|
description: For semantic search (used by Limitless)
|
|
521
|
+
- in: query
|
|
522
|
+
name: sourceExchange
|
|
523
|
+
required: false
|
|
524
|
+
schema:
|
|
525
|
+
type: string
|
|
526
|
+
description: 'Filter by source venue (e.g. ''polymarket'', ''kalshi'', ''myriad''). `exchange` is an alias.'
|
|
527
|
+
- in: query
|
|
528
|
+
name: exchange
|
|
529
|
+
required: false
|
|
530
|
+
schema:
|
|
531
|
+
type: string
|
|
532
|
+
description: Alias for `sourceExchange`.
|
|
497
533
|
responses:
|
|
498
534
|
'200':
|
|
499
535
|
description: Fetch Market response
|
|
@@ -617,6 +653,18 @@ paths:
|
|
|
617
653
|
Filter by tags. Returns events matching ANY of the provided tags. Tags are more specific than categories --
|
|
618
654
|
for example a "Politics" event might carry tags ["Politics", "Geopolitics", "Middle East", "Iran"]. Common
|
|
619
655
|
tags include "Crypto", "Elections", "Fed Rates", "FIFA World Cup", "Trump".
|
|
656
|
+
- in: query
|
|
657
|
+
name: sourceExchange
|
|
658
|
+
required: false
|
|
659
|
+
schema:
|
|
660
|
+
type: string
|
|
661
|
+
description: 'Filter by source venue (e.g. ''polymarket'', ''kalshi'', ''myriad''). `exchange` is an alias.'
|
|
662
|
+
- in: query
|
|
663
|
+
name: exchange
|
|
664
|
+
required: false
|
|
665
|
+
schema:
|
|
666
|
+
type: string
|
|
667
|
+
description: Alias for `sourceExchange`.
|
|
620
668
|
responses:
|
|
621
669
|
'200':
|
|
622
670
|
description: Fetch Event response
|
|
@@ -3401,6 +3449,12 @@ components:
|
|
|
3401
3449
|
similarityThreshold:
|
|
3402
3450
|
type: number
|
|
3403
3451
|
description: For semantic search (used by Limitless)
|
|
3452
|
+
sourceExchange:
|
|
3453
|
+
type: string
|
|
3454
|
+
description: 'Filter by source venue (e.g. ''polymarket'', ''kalshi'', ''myriad''). `exchange` is an alias.'
|
|
3455
|
+
exchange:
|
|
3456
|
+
type: string
|
|
3457
|
+
description: Alias for `sourceExchange`.
|
|
3404
3458
|
EventFetchParams:
|
|
3405
3459
|
type: object
|
|
3406
3460
|
properties:
|
|
@@ -3467,6 +3521,12 @@ components:
|
|
|
3467
3521
|
Filter by tags. Returns events matching ANY of the provided tags. Tags are more specific than categories --
|
|
3468
3522
|
for example a "Politics" event might carry tags ["Politics", "Geopolitics", "Middle East", "Iran"]. Common
|
|
3469
3523
|
tags include "Crypto", "Elections", "Fed Rates", "FIFA World Cup", "Trump".
|
|
3524
|
+
sourceExchange:
|
|
3525
|
+
type: string
|
|
3526
|
+
description: 'Filter by source venue (e.g. ''polymarket'', ''kalshi'', ''myriad''). `exchange` is an alias.'
|
|
3527
|
+
exchange:
|
|
3528
|
+
type: string
|
|
3529
|
+
description: Alias for `sourceExchange`.
|
|
3470
3530
|
HistoryFilterParams:
|
|
3471
3531
|
type: object
|
|
3472
3532
|
description: Deprecated - use OHLCVParams or TradesParams instead. Resolution is optional for backward compatibility.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmxt-core",
|
|
3
|
-
"version": "2.50.
|
|
3
|
+
"version": "2.50.14",
|
|
4
4
|
"description": "pmxt is a unified prediction market data API. The ccxt for prediction markets.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"test": "jest -c jest.config.js",
|
|
30
30
|
"server": "tsx watch src/server/index.ts",
|
|
31
31
|
"server:prod": "node dist/server/index.js",
|
|
32
|
-
"generate:sdk:python": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g python -o ../sdks/python/generated --package-name pmxt_internal --additional-properties=projectName=pmxt-internal,packageVersion=2.50.
|
|
33
|
-
"generate:sdk:typescript": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g typescript-fetch -o ../sdks/typescript/generated --additional-properties=npmName=pmxtjs,npmVersion=2.50.
|
|
32
|
+
"generate:sdk:python": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g python -o ../sdks/python/generated --package-name pmxt_internal --additional-properties=projectName=pmxt-internal,packageVersion=2.50.14,library=urllib3",
|
|
33
|
+
"generate:sdk:typescript": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g typescript-fetch -o ../sdks/typescript/generated --additional-properties=npmName=pmxtjs,npmVersion=2.50.14,supportsES6=true,typescriptThreePlus=true && node ../sdks/typescript/scripts/fix-generated.js",
|
|
34
34
|
"fetch:openapi": "node scripts/fetch-openapi-specs.js",
|
|
35
35
|
"extract:jsdoc": "node ../scripts/extract-jsdoc.js",
|
|
36
36
|
"generate:docs": "npm run extract:jsdoc && node ../scripts/generate-api-docs.js",
|