pmxt-core 2.27.10 → 2.28.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.
Files changed (43) hide show
  1. package/dist/BaseExchange.d.ts +8 -0
  2. package/dist/BaseExchange.js +9 -0
  3. package/dist/exchanges/baozi/index.d.ts +1 -0
  4. package/dist/exchanges/baozi/index.js +1 -0
  5. package/dist/exchanges/kalshi/api.d.ts +1 -1
  6. package/dist/exchanges/kalshi/api.js +1 -1
  7. package/dist/exchanges/kalshi/index.d.ts +1 -0
  8. package/dist/exchanges/kalshi/index.js +1 -0
  9. package/dist/exchanges/limitless/api.d.ts +1 -1
  10. package/dist/exchanges/limitless/api.js +1 -1
  11. package/dist/exchanges/limitless/index.d.ts +1 -0
  12. package/dist/exchanges/limitless/index.js +1 -0
  13. package/dist/exchanges/metaculus/index.d.ts +1 -0
  14. package/dist/exchanges/metaculus/index.js +1 -0
  15. package/dist/exchanges/myriad/api.d.ts +1 -1
  16. package/dist/exchanges/myriad/api.js +1 -1
  17. package/dist/exchanges/myriad/index.d.ts +1 -0
  18. package/dist/exchanges/myriad/index.js +1 -0
  19. package/dist/exchanges/opinion/api.d.ts +1 -1
  20. package/dist/exchanges/opinion/api.js +1 -1
  21. package/dist/exchanges/opinion/index.d.ts +1 -0
  22. package/dist/exchanges/opinion/index.js +1 -0
  23. package/dist/exchanges/polymarket/api-clob.d.ts +1 -1
  24. package/dist/exchanges/polymarket/api-clob.js +1 -1
  25. package/dist/exchanges/polymarket/api-data.d.ts +1 -1
  26. package/dist/exchanges/polymarket/api-data.js +1 -1
  27. package/dist/exchanges/polymarket/api-gamma.d.ts +1 -1
  28. package/dist/exchanges/polymarket/api-gamma.js +1 -1
  29. package/dist/exchanges/polymarket/index.d.ts +2 -0
  30. package/dist/exchanges/polymarket/index.js +4 -0
  31. package/dist/exchanges/polymarket/websocket.d.ts +1 -0
  32. package/dist/exchanges/polymarket/websocket.js +15 -0
  33. package/dist/exchanges/polymarket_us/index.d.ts +1 -0
  34. package/dist/exchanges/polymarket_us/index.js +1 -0
  35. package/dist/exchanges/probable/api.d.ts +1 -1
  36. package/dist/exchanges/probable/api.js +1 -1
  37. package/dist/exchanges/probable/index.d.ts +1 -0
  38. package/dist/exchanges/probable/index.js +1 -0
  39. package/dist/exchanges/smarkets/index.d.ts +1 -0
  40. package/dist/exchanges/smarkets/index.js +1 -0
  41. package/dist/server/method-verbs.json +10 -0
  42. package/dist/server/openapi.yaml +31 -0
  43. package/package.json +3 -3
@@ -201,6 +201,8 @@ export interface ExchangeHas {
201
201
  unwatchAddress: ExchangeCapability;
202
202
  /** Whether this exchange supports streaming order book updates. */
203
203
  watchOrderBook: ExchangeCapability;
204
+ /** Whether this exchange supports unsubscribing from an order book stream. */
205
+ unwatchOrderBook: ExchangeCapability;
204
206
  /** Whether this exchange supports streaming trade updates. */
205
207
  watchTrades: ExchangeCapability;
206
208
  /** Whether this exchange supports fetching the authenticated user's trade history. */
@@ -492,6 +494,12 @@ export declare abstract class PredictionMarketExchange {
492
494
  * @returns Promise that resolves with the current orderbook state
493
495
  */
494
496
  watchOrderBook(id: string, limit?: number): Promise<OrderBook>;
497
+ /**
498
+ * Unsubscribe from a previously watched order book stream.
499
+ *
500
+ * @param id - The Outcome ID to stop watching
501
+ */
502
+ unwatchOrderBook(id: string): Promise<void>;
495
503
  /**
496
504
  * Watch trade executions in real-time via WebSocket.
497
505
  * Returns a promise that resolves with the next trade(s). Call repeatedly in a loop to stream updates (CCXT Pro pattern).
@@ -34,6 +34,7 @@ class PredictionMarketExchange {
34
34
  watchAddress: false,
35
35
  unwatchAddress: false,
36
36
  watchOrderBook: false,
37
+ unwatchOrderBook: false,
37
38
  watchTrades: false,
38
39
  fetchMyTrades: false,
39
40
  fetchClosedOrders: false,
@@ -668,6 +669,14 @@ class PredictionMarketExchange {
668
669
  async watchOrderBook(id, limit) {
669
670
  throw new Error(`watchOrderBook() is not supported by ${this.name}`);
670
671
  }
672
+ /**
673
+ * Unsubscribe from a previously watched order book stream.
674
+ *
675
+ * @param id - The Outcome ID to stop watching
676
+ */
677
+ async unwatchOrderBook(id) {
678
+ throw new Error(`unwatchOrderBook() is not supported by ${this.name}`);
679
+ }
671
680
  // ----------------------------------------------------------------------------
672
681
  // WebSocket Streaming Methods
673
682
  // ----------------------------------------------------------------------------
@@ -20,6 +20,7 @@ export declare class BaoziExchange extends PredictionMarketExchange {
20
20
  watchAddress: false;
21
21
  unwatchAddress: false;
22
22
  watchOrderBook: true;
23
+ unwatchOrderBook: false;
23
24
  watchTrades: false;
24
25
  fetchMyTrades: false;
25
26
  fetchClosedOrders: false;
@@ -26,6 +26,7 @@ class BaoziExchange extends BaseExchange_1.PredictionMarketExchange {
26
26
  watchAddress: false,
27
27
  unwatchAddress: false,
28
28
  watchOrderBook: true,
29
+ unwatchOrderBook: false,
29
30
  watchTrades: false,
30
31
  fetchMyTrades: false,
31
32
  fetchClosedOrders: false,
@@ -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-04-11T09:39:36.747Z
3
+ * Generated at: 2026-04-11T09:59:33.711Z
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-04-11T09:39:36.747Z
6
+ * Generated at: 2026-04-11T09:59:33.711Z
7
7
  * Do not edit manually -- run "npm run fetch:openapi" to regenerate.
8
8
  */
9
9
  exports.kalshiApiSpec = {
@@ -26,6 +26,7 @@ export declare class KalshiExchange extends PredictionMarketExchange {
26
26
  watchAddress: false;
27
27
  unwatchAddress: false;
28
28
  watchOrderBook: true;
29
+ unwatchOrderBook: false;
29
30
  watchTrades: true;
30
31
  fetchMyTrades: true;
31
32
  fetchClosedOrders: true;
@@ -28,6 +28,7 @@ class KalshiExchange extends BaseExchange_1.PredictionMarketExchange {
28
28
  watchAddress: false,
29
29
  unwatchAddress: false,
30
30
  watchOrderBook: true,
31
+ unwatchOrderBook: false,
31
32
  watchTrades: true,
32
33
  fetchMyTrades: true,
33
34
  fetchClosedOrders: true,
@@ -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-04-11T09:39:36.781Z
3
+ * Generated at: 2026-04-11T09:59:33.748Z
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-04-11T09:39:36.781Z
6
+ * Generated at: 2026-04-11T09:59:33.748Z
7
7
  * Do not edit manually -- run "npm run fetch:openapi" to regenerate.
8
8
  */
9
9
  exports.limitlessApiSpec = {
@@ -26,6 +26,7 @@ export declare class LimitlessExchange extends PredictionMarketExchange {
26
26
  watchAddress: true;
27
27
  unwatchAddress: true;
28
28
  watchOrderBook: true;
29
+ unwatchOrderBook: false;
29
30
  watchTrades: true;
30
31
  fetchMyTrades: true;
31
32
  fetchClosedOrders: true;
@@ -32,6 +32,7 @@ class LimitlessExchange extends BaseExchange_1.PredictionMarketExchange {
32
32
  watchAddress: true,
33
33
  unwatchAddress: true,
34
34
  watchOrderBook: true,
35
+ unwatchOrderBook: false,
35
36
  watchTrades: true,
36
37
  fetchMyTrades: true,
37
38
  fetchClosedOrders: true,
@@ -52,6 +52,7 @@ export declare class MetaculusExchange extends PredictionMarketExchange {
52
52
  watchAddress: false;
53
53
  unwatchAddress: false;
54
54
  watchOrderBook: false;
55
+ unwatchOrderBook: false;
55
56
  watchTrades: false;
56
57
  fetchMyTrades: false;
57
58
  fetchClosedOrders: false;
@@ -64,6 +64,7 @@ class MetaculusExchange extends BaseExchange_1.PredictionMarketExchange {
64
64
  watchAddress: false,
65
65
  unwatchAddress: false,
66
66
  watchOrderBook: false,
67
+ unwatchOrderBook: false,
67
68
  watchTrades: false,
68
69
  fetchMyTrades: false,
69
70
  fetchClosedOrders: false,
@@ -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-04-11T09:39:36.791Z
3
+ * Generated at: 2026-04-11T09:59:33.759Z
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-04-11T09:39:36.791Z
6
+ * Generated at: 2026-04-11T09:59:33.759Z
7
7
  * Do not edit manually -- run "npm run fetch:openapi" to regenerate.
8
8
  */
9
9
  exports.myriadApiSpec = {
@@ -16,6 +16,7 @@ export declare class MyriadExchange extends PredictionMarketExchange {
16
16
  watchAddress: false;
17
17
  unwatchAddress: false;
18
18
  watchOrderBook: "emulated";
19
+ unwatchOrderBook: false;
19
20
  watchTrades: "emulated";
20
21
  fetchMyTrades: true;
21
22
  fetchClosedOrders: false;
@@ -27,6 +27,7 @@ class MyriadExchange extends BaseExchange_1.PredictionMarketExchange {
27
27
  watchAddress: false,
28
28
  unwatchAddress: false,
29
29
  watchOrderBook: 'emulated',
30
+ unwatchOrderBook: false,
30
31
  watchTrades: 'emulated',
31
32
  fetchMyTrades: true,
32
33
  fetchClosedOrders: false,
@@ -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-04-11T09:39:36.796Z
3
+ * Generated at: 2026-04-11T09:59:33.763Z
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-04-11T09:39:36.796Z
6
+ * Generated at: 2026-04-11T09:59:33.763Z
7
7
  * Do not edit manually -- run "npm run fetch:openapi" to regenerate.
8
8
  */
9
9
  exports.opinionApiSpec = {
@@ -23,6 +23,7 @@ export declare class OpinionExchange extends PredictionMarketExchange {
23
23
  watchAddress: false;
24
24
  unwatchAddress: false;
25
25
  watchOrderBook: true;
26
+ unwatchOrderBook: false;
26
27
  watchTrades: true;
27
28
  fetchMyTrades: true;
28
29
  fetchClosedOrders: true;
@@ -67,6 +67,7 @@ class OpinionExchange extends BaseExchange_1.PredictionMarketExchange {
67
67
  watchAddress: false,
68
68
  unwatchAddress: false,
69
69
  watchOrderBook: true,
70
+ unwatchOrderBook: false,
70
71
  watchTrades: true,
71
72
  fetchMyTrades: true,
72
73
  fetchClosedOrders: true,
@@ -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-11T09:39:36.751Z
3
+ * Generated at: 2026-04-11T09:59:33.718Z
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-11T09:39:36.751Z
6
+ * Generated at: 2026-04-11T09:59:33.718Z
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-11T09:39:36.765Z
3
+ * Generated at: 2026-04-11T09:59:33.732Z
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-11T09:39:36.765Z
6
+ * Generated at: 2026-04-11T09:59:33.732Z
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-11T09:39:36.762Z
3
+ * Generated at: 2026-04-11T09:59:33.729Z
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-11T09:39:36.762Z
6
+ * Generated at: 2026-04-11T09:59:33.729Z
7
7
  * Do not edit manually -- run "npm run fetch:openapi" to regenerate.
8
8
  */
9
9
  exports.polymarketGammaSpec = {
@@ -26,6 +26,7 @@ export declare class PolymarketExchange extends PredictionMarketExchange {
26
26
  watchAddress: true;
27
27
  unwatchAddress: true;
28
28
  watchOrderBook: true;
29
+ unwatchOrderBook: true;
29
30
  watchTrades: true;
30
31
  fetchMyTrades: true;
31
32
  fetchClosedOrders: false;
@@ -72,6 +73,7 @@ export declare class PolymarketExchange extends PredictionMarketExchange {
72
73
  fetchPositions(address?: string): Promise<Position[]>;
73
74
  fetchBalance(address?: string): Promise<Balance[]>;
74
75
  watchOrderBook(id: string, limit?: number): Promise<OrderBook>;
76
+ unwatchOrderBook(id: string): Promise<void>;
75
77
  watchTrades(id: string, address?: string, since?: number, limit?: number): Promise<Trade[]>;
76
78
  watchAddress(address: string, types?: SubscriptionOption[]): Promise<SubscribedAddressSnapshot>;
77
79
  unwatchAddress(address: string): Promise<void>;
@@ -34,6 +34,7 @@ class PolymarketExchange extends BaseExchange_1.PredictionMarketExchange {
34
34
  watchAddress: true,
35
35
  unwatchAddress: true,
36
36
  watchOrderBook: true,
37
+ unwatchOrderBook: true,
37
38
  watchTrades: true,
38
39
  fetchMyTrades: true,
39
40
  fetchClosedOrders: false,
@@ -438,6 +439,9 @@ class PolymarketExchange extends BaseExchange_1.PredictionMarketExchange {
438
439
  async watchOrderBook(id, limit) {
439
440
  return this.ensureWs().watchOrderBook(id);
440
441
  }
442
+ async unwatchOrderBook(id) {
443
+ return this.ensureWs().unwatchOrderBook(id);
444
+ }
441
445
  async watchTrades(id, address, since, limit) {
442
446
  return this.ensureWs().watchTrades(id, address);
443
447
  }
@@ -30,6 +30,7 @@ export declare class PolymarketWebSocket {
30
30
  private initializationPromise?;
31
31
  constructor(callApi: (operationId: string, params?: Record<string, any>) => Promise<any>, config?: PolymarketWebSocketConfig);
32
32
  watchOrderBook(id: string): Promise<OrderBook>;
33
+ unwatchOrderBook(id: string): Promise<void>;
33
34
  watchTrades(id: string, address?: string): Promise<Trade[]>;
34
35
  watchAddress(address: string, types: SubscriptionOption[]): Promise<SubscribedAddressSnapshot>;
35
36
  unwatchAddress(address: string): Promise<void>;
@@ -82,6 +82,21 @@ class PolymarketWebSocket {
82
82
  this.orderBookResolvers.get(id).push({ resolve, reject });
83
83
  });
84
84
  }
85
+ async unwatchOrderBook(id) {
86
+ if (!this.manager) {
87
+ return;
88
+ }
89
+ await this.manager.removeSubscriptions([id]);
90
+ // Clear any pending resolvers for this asset
91
+ const resolvers = this.orderBookResolvers.get(id);
92
+ if (resolvers) {
93
+ this.orderBookResolvers = new Map([...this.orderBookResolvers].filter(([key]) => key !== id));
94
+ }
95
+ // Remove the cached orderbook for this asset
96
+ if (this.orderBooks.has(id)) {
97
+ this.orderBooks = new Map([...this.orderBooks].filter(([key]) => key !== id));
98
+ }
99
+ }
85
100
  async watchTrades(id, address) {
86
101
  if (address) {
87
102
  return this.watcher.watch(address, ['trades'], id);
@@ -35,6 +35,7 @@ export declare class PolymarketUSExchange extends PredictionMarketExchange {
35
35
  watchAddress: false;
36
36
  unwatchAddress: false;
37
37
  watchOrderBook: true;
38
+ unwatchOrderBook: false;
38
39
  watchTrades: true;
39
40
  fetchMyTrades: true;
40
41
  fetchClosedOrders: false;
@@ -59,6 +59,7 @@ class PolymarketUSExchange extends BaseExchange_1.PredictionMarketExchange {
59
59
  watchAddress: false,
60
60
  unwatchAddress: false,
61
61
  watchOrderBook: true,
62
+ unwatchOrderBook: false,
62
63
  watchTrades: true,
63
64
  fetchMyTrades: true,
64
65
  fetchClosedOrders: false,
@@ -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-11T09:39:36.786Z
3
+ * Generated at: 2026-04-11T09:59:33.754Z
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-11T09:39:36.786Z
6
+ * Generated at: 2026-04-11T09:59:33.754Z
7
7
  * Do not edit manually -- run "npm run fetch:openapi" to regenerate.
8
8
  */
9
9
  exports.probableApiSpec = {
@@ -17,6 +17,7 @@ export declare class ProbableExchange extends PredictionMarketExchange {
17
17
  watchAddress: false;
18
18
  unwatchAddress: false;
19
19
  watchOrderBook: true;
20
+ unwatchOrderBook: false;
20
21
  watchTrades: false;
21
22
  fetchMyTrades: true;
22
23
  fetchClosedOrders: false;
@@ -29,6 +29,7 @@ class ProbableExchange extends BaseExchange_1.PredictionMarketExchange {
29
29
  watchAddress: false,
30
30
  unwatchAddress: false,
31
31
  watchOrderBook: true,
32
+ unwatchOrderBook: false,
32
33
  watchTrades: false,
33
34
  fetchMyTrades: true,
34
35
  fetchClosedOrders: false,
@@ -16,6 +16,7 @@ export declare class SmarketsExchange extends PredictionMarketExchange {
16
16
  watchAddress: false;
17
17
  unwatchAddress: false;
18
18
  watchOrderBook: false;
19
+ unwatchOrderBook: false;
19
20
  watchTrades: false;
20
21
  fetchMyTrades: true;
21
22
  fetchClosedOrders: true;
@@ -27,6 +27,7 @@ class SmarketsExchange extends BaseExchange_1.PredictionMarketExchange {
27
27
  watchAddress: false,
28
28
  unwatchAddress: false,
29
29
  watchOrderBook: false,
30
+ unwatchOrderBook: false,
30
31
  watchTrades: false,
31
32
  fetchMyTrades: true,
32
33
  fetchClosedOrders: true,
@@ -294,6 +294,16 @@
294
294
  }
295
295
  ]
296
296
  },
297
+ "unwatchOrderBook": {
298
+ "verb": "post",
299
+ "args": [
300
+ {
301
+ "name": "id",
302
+ "kind": "string",
303
+ "optional": false
304
+ }
305
+ ]
306
+ },
297
307
  "watchTrades": {
298
308
  "verb": "post",
299
309
  "args": [
@@ -1360,6 +1360,37 @@ paths:
1360
1360
  description: >-
1361
1361
  Watch order book updates in real-time via WebSocket. Returns a promise that resolves with the next order book
1362
1362
  update. Call repeatedly in a loop to stream updates (CCXT Pro pattern).
1363
+ '/api/{exchange}/unwatchOrderBook':
1364
+ post:
1365
+ summary: Unwatch Order Book
1366
+ operationId: unwatchOrderBook
1367
+ parameters:
1368
+ - $ref: '#/components/parameters/ExchangeParam'
1369
+ requestBody:
1370
+ content:
1371
+ application/json:
1372
+ schema:
1373
+ title: UnwatchOrderBookRequest
1374
+ type: object
1375
+ properties:
1376
+ args:
1377
+ type: array
1378
+ maxItems: 1
1379
+ items:
1380
+ type: string
1381
+ minItems: 1
1382
+ credentials:
1383
+ $ref: '#/components/schemas/ExchangeCredentials'
1384
+ required:
1385
+ - args
1386
+ responses:
1387
+ '200':
1388
+ description: Unwatch Order Book response
1389
+ content:
1390
+ application/json:
1391
+ schema:
1392
+ $ref: '#/components/schemas/BaseResponse'
1393
+ description: Unsubscribe from a previously watched order book stream.
1363
1394
  '/api/{exchange}/watchTrades':
1364
1395
  post:
1365
1396
  summary: Watch Trades
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmxt-core",
3
- "version": "2.27.10",
3
+ "version": "2.28.0",
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.10,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.10,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.28.0,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.28.0,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",