pmxt-core 2.27.6 → 2.27.7

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.
@@ -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-04-09T15:36:23.092Z
3
+ * Generated at: 2026-04-10T08:47:55.763Z
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-04-09T15:36:23.092Z
6
+ * Generated at: 2026-04-10T08:47:55.763Z
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-04-09T15:36:23.112Z
3
+ * Generated at: 2026-04-10T08:47:55.785Z
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-04-09T15:36:23.112Z
6
+ * Generated at: 2026-04-10T08:47:55.785Z
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-04-09T15:36:23.107Z
3
+ * Generated at: 2026-04-10T08:47:55.780Z
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-04-09T15:36:23.107Z
6
+ * Generated at: 2026-04-10T08:47:55.780Z
7
7
  * Do not edit manually -- run "npm run fetch:openapi" to regenerate.
8
8
  */
9
9
  exports.polymarketGammaSpec = {
@@ -59,18 +59,6 @@ export declare class PolymarketExchange extends PredictionMarketExchange {
59
59
  * Call this when you start watching a market.
60
60
  *
61
61
  * @param outcomeId - The CLOB Token ID for the outcome (use `outcome.outcomeId`)
62
- *
63
- * @example-ts Pre-warm before placing orders
64
- * const markets = await exchange.fetchMarkets({ query: 'Trump' });
65
- * const outcomeId = markets[0].outcomes[0].outcomeId;
66
- * await exchange.preWarmMarket(outcomeId);
67
- * // Subsequent createOrder calls are faster
68
- *
69
- * @example-python Pre-warm before placing orders
70
- * markets = exchange.fetch_markets(query='Trump')
71
- * outcome_id = markets[0].outcomes[0].outcome_id
72
- * exchange.pre_warm_market(outcome_id)
73
- * # Subsequent create_order calls are faster
74
62
  */
75
63
  preWarmMarket(outcomeId: string): Promise<void>;
76
64
  buildOrder(params: CreateOrderParams): Promise<BuiltOrder>;
@@ -160,18 +160,6 @@ class PolymarketExchange extends BaseExchange_1.PredictionMarketExchange {
160
160
  * Call this when you start watching a market.
161
161
  *
162
162
  * @param outcomeId - The CLOB Token ID for the outcome (use `outcome.outcomeId`)
163
- *
164
- * @example-ts Pre-warm before placing orders
165
- * const markets = await exchange.fetchMarkets({ query: 'Trump' });
166
- * const outcomeId = markets[0].outcomes[0].outcomeId;
167
- * await exchange.preWarmMarket(outcomeId);
168
- * // Subsequent createOrder calls are faster
169
- *
170
- * @example-python Pre-warm before placing orders
171
- * markets = exchange.fetch_markets(query='Trump')
172
- * outcome_id = markets[0].outcomes[0].outcome_id
173
- * exchange.pre_warm_market(outcome_id)
174
- * # Subsequent create_order calls are faster
175
163
  */
176
164
  async preWarmMarket(outcomeId) {
177
165
  const auth = this.ensureAuth();
@@ -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-04-09T15:36:23.137Z
3
+ * Generated at: 2026-04-10T08:47:55.817Z
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-04-09T15:36:23.137Z
6
+ * Generated at: 2026-04-10T08:47:55.817Z
7
7
  * Do not edit manually -- run "npm run fetch:openapi" to regenerate.
8
8
  */
9
9
  exports.probableApiSpec = {
@@ -40,19 +40,6 @@ export declare class ProbableExchange extends PredictionMarketExchange {
40
40
  *
41
41
  * @param id - The numeric event ID
42
42
  * @returns The UnifiedEvent, or null if not found
43
- *
44
- * @example-ts Get event by ID
45
- * const event = await exchange.getEventById('42');
46
- * if (event) {
47
- * console.log(event.title);
48
- * console.log(event.markets.length, 'markets');
49
- * }
50
- *
51
- * @example-python Get event by ID
52
- * event = exchange.get_event_by_id('42')
53
- * if event:
54
- * print(event.title)
55
- * print(len(event.markets), 'markets')
56
43
  */
57
44
  getEventById(id: string): Promise<UnifiedEvent | null>;
58
45
  /**
@@ -60,17 +47,6 @@ export declare class ProbableExchange extends PredictionMarketExchange {
60
47
  *
61
48
  * @param slug - The event's URL slug (e.g. `"trump-2024-election"`)
62
49
  * @returns The UnifiedEvent, or null if not found
63
- *
64
- * @example-ts Get event by slug
65
- * const event = await exchange.getEventBySlug('trump-2024-election');
66
- * if (event) {
67
- * console.log(event.title);
68
- * }
69
- *
70
- * @example-python Get event by slug
71
- * event = exchange.get_event_by_slug('trump-2024-election')
72
- * if event:
73
- * print(event.title)
74
50
  */
75
51
  getEventBySlug(slug: string): Promise<UnifiedEvent | null>;
76
52
  fetchOrderBook(id: string): Promise<OrderBook>;
@@ -110,19 +110,6 @@ class ProbableExchange extends BaseExchange_1.PredictionMarketExchange {
110
110
  *
111
111
  * @param id - The numeric event ID
112
112
  * @returns The UnifiedEvent, or null if not found
113
- *
114
- * @example-ts Get event by ID
115
- * const event = await exchange.getEventById('42');
116
- * if (event) {
117
- * console.log(event.title);
118
- * console.log(event.markets.length, 'markets');
119
- * }
120
- *
121
- * @example-python Get event by ID
122
- * event = exchange.get_event_by_id('42')
123
- * if event:
124
- * print(event.title)
125
- * print(len(event.markets), 'markets')
126
113
  */
127
114
  async getEventById(id) {
128
115
  const raw = await this.fetcher.fetchRawEventById(id);
@@ -139,17 +126,6 @@ class ProbableExchange extends BaseExchange_1.PredictionMarketExchange {
139
126
  *
140
127
  * @param slug - The event's URL slug (e.g. `"trump-2024-election"`)
141
128
  * @returns The UnifiedEvent, or null if not found
142
- *
143
- * @example-ts Get event by slug
144
- * const event = await exchange.getEventBySlug('trump-2024-election');
145
- * if (event) {
146
- * console.log(event.title);
147
- * }
148
- *
149
- * @example-python Get event by slug
150
- * event = exchange.get_event_by_slug('trump-2024-election')
151
- * if event:
152
- * print(event.title)
153
129
  */
154
130
  async getEventBySlug(slug) {
155
131
  const raw = await this.fetcher.fetchRawEventBySlug(slug);
@@ -2296,3 +2296,198 @@ components:
2296
2296
  funderAddress:
2297
2297
  type: string
2298
2298
  description: The address funding the trades (defaults to signer address)
2299
+ x-sdk-constructors:
2300
+ polymarket:
2301
+ className: Polymarket
2302
+ params:
2303
+ - name: pmxt_api_key
2304
+ tsName: pmxtApiKey
2305
+ type: string
2306
+ description: PMXT API key for hosted access
2307
+ - name: api_key
2308
+ tsName: apiKey
2309
+ type: string
2310
+ description: API key for authentication
2311
+ - name: api_secret
2312
+ tsName: apiSecret
2313
+ type: string
2314
+ description: API secret for authentication
2315
+ - name: passphrase
2316
+ tsName: passphrase
2317
+ type: string
2318
+ description: Passphrase for authentication
2319
+ - name: private_key
2320
+ tsName: privateKey
2321
+ type: string
2322
+ description: Private key for authentication
2323
+ - name: proxy_address
2324
+ tsName: proxyAddress
2325
+ type: string
2326
+ description: Proxy/smart wallet address
2327
+ - name: signature_type
2328
+ tsName: signatureType
2329
+ type: string
2330
+ description: Signature type
2331
+ default: gnosis-safe
2332
+ limitless:
2333
+ className: Limitless
2334
+ params:
2335
+ - name: pmxt_api_key
2336
+ tsName: pmxtApiKey
2337
+ type: string
2338
+ description: PMXT API key for hosted access
2339
+ - name: api_key
2340
+ tsName: apiKey
2341
+ type: string
2342
+ description: API key for authentication
2343
+ - name: api_secret
2344
+ tsName: apiSecret
2345
+ type: string
2346
+ description: API secret for authentication
2347
+ - name: passphrase
2348
+ tsName: passphrase
2349
+ type: string
2350
+ description: Passphrase for authentication
2351
+ - name: private_key
2352
+ tsName: privateKey
2353
+ type: string
2354
+ description: Private key for authentication
2355
+ kalshi:
2356
+ className: Kalshi
2357
+ params:
2358
+ - name: pmxt_api_key
2359
+ tsName: pmxtApiKey
2360
+ type: string
2361
+ description: PMXT API key for hosted access
2362
+ - name: api_key
2363
+ tsName: apiKey
2364
+ type: string
2365
+ description: API key for authentication
2366
+ - name: private_key
2367
+ tsName: privateKey
2368
+ type: string
2369
+ description: Private key for authentication
2370
+ kalshi-demo:
2371
+ className: KalshiDemo
2372
+ params:
2373
+ - name: pmxt_api_key
2374
+ tsName: pmxtApiKey
2375
+ type: string
2376
+ description: PMXT API key for hosted access
2377
+ - name: api_key
2378
+ tsName: apiKey
2379
+ type: string
2380
+ description: API key for authentication
2381
+ - name: private_key
2382
+ tsName: privateKey
2383
+ type: string
2384
+ description: Private key for authentication
2385
+ probable:
2386
+ className: Probable
2387
+ params:
2388
+ - name: pmxt_api_key
2389
+ tsName: pmxtApiKey
2390
+ type: string
2391
+ description: PMXT API key for hosted access
2392
+ - name: api_key
2393
+ tsName: apiKey
2394
+ type: string
2395
+ description: API key for authentication
2396
+ - name: api_secret
2397
+ tsName: apiSecret
2398
+ type: string
2399
+ description: API secret for authentication
2400
+ - name: passphrase
2401
+ tsName: passphrase
2402
+ type: string
2403
+ description: Passphrase for authentication
2404
+ - name: private_key
2405
+ tsName: privateKey
2406
+ type: string
2407
+ description: Private key for authentication
2408
+ baozi:
2409
+ className: Baozi
2410
+ params:
2411
+ - name: pmxt_api_key
2412
+ tsName: pmxtApiKey
2413
+ type: string
2414
+ description: PMXT API key for hosted access
2415
+ - name: private_key
2416
+ tsName: privateKey
2417
+ type: string
2418
+ description: Private key for authentication
2419
+ myriad:
2420
+ className: Myriad
2421
+ params:
2422
+ - name: pmxt_api_key
2423
+ tsName: pmxtApiKey
2424
+ type: string
2425
+ description: PMXT API key for hosted access
2426
+ - name: api_key
2427
+ tsName: apiKey
2428
+ type: string
2429
+ description: API key for authentication
2430
+ - name: wallet_address
2431
+ tsName: walletAddress
2432
+ type: string
2433
+ description: Wallet address (required for positions and balance)
2434
+ opinion:
2435
+ className: Opinion
2436
+ params:
2437
+ - name: pmxt_api_key
2438
+ tsName: pmxtApiKey
2439
+ type: string
2440
+ description: PMXT API key for hosted access
2441
+ - name: api_key
2442
+ tsName: apiKey
2443
+ type: string
2444
+ description: API key for authentication
2445
+ - name: private_key
2446
+ tsName: privateKey
2447
+ type: string
2448
+ description: Private key for authentication
2449
+ - name: proxy_address
2450
+ tsName: proxyAddress
2451
+ type: string
2452
+ description: Proxy/smart wallet address
2453
+ metaculus:
2454
+ className: Metaculus
2455
+ params:
2456
+ - name: pmxt_api_key
2457
+ tsName: pmxtApiKey
2458
+ type: string
2459
+ description: PMXT API key for hosted access
2460
+ - name: api_token
2461
+ tsName: apiToken
2462
+ type: string
2463
+ description: API token for authentication
2464
+ smarkets:
2465
+ className: Smarkets
2466
+ params:
2467
+ - name: pmxt_api_key
2468
+ tsName: pmxtApiKey
2469
+ type: string
2470
+ description: PMXT API key for hosted access
2471
+ - name: api_key
2472
+ tsName: apiKey
2473
+ type: string
2474
+ description: API key for authentication
2475
+ - name: private_key
2476
+ tsName: privateKey
2477
+ type: string
2478
+ description: Private key for authentication
2479
+ polymarket_us:
2480
+ className: PolymarketUs
2481
+ params:
2482
+ - name: pmxt_api_key
2483
+ tsName: pmxtApiKey
2484
+ type: string
2485
+ description: PMXT API key for hosted access
2486
+ - name: api_key
2487
+ tsName: apiKey
2488
+ type: string
2489
+ description: API key for authentication
2490
+ - name: private_key
2491
+ tsName: privateKey
2492
+ type: string
2493
+ description: Private key for authentication
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmxt-core",
3
- "version": "2.27.6",
3
+ "version": "2.27.7",
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.27.6,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.27.6,supportsES6=true,typescriptThreePlus=true && node ../sdks/typescript/scripts/fix-generated.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.27.7,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.27.7,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",