pmxtjs 2.51.1 → 2.51.3

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 (144) hide show
  1. package/README.md +14 -5
  2. package/dist/esm/generated/src/apis/DefaultApi.d.ts +6 -0
  3. package/dist/esm/generated/src/apis/DefaultApi.js +6 -0
  4. package/dist/esm/generated/src/models/CreateOrderParams.d.ts +20 -0
  5. package/dist/esm/generated/src/models/CreateOrderParams.js +11 -0
  6. package/dist/esm/index.d.ts +3 -2
  7. package/dist/esm/index.js +3 -2
  8. package/dist/esm/pmxt/client.d.ts +61 -12
  9. package/dist/esm/pmxt/client.js +126 -21
  10. package/dist/esm/pmxt/escrow.js +109 -10
  11. package/dist/esm/pmxt/hosted-typed-data.d.ts +1 -1
  12. package/dist/esm/pmxt/hosted-typed-data.js +14 -0
  13. package/dist/esm/pmxt/models.d.ts +17 -0
  14. package/dist/esm/pmxt/server-manager.js +5 -3
  15. package/dist/generated/src/apis/DefaultApi.d.ts +6 -0
  16. package/dist/generated/src/apis/DefaultApi.js +6 -0
  17. package/dist/generated/src/models/CreateOrderParams.d.ts +20 -0
  18. package/dist/generated/src/models/CreateOrderParams.js +12 -1
  19. package/dist/index.d.ts +3 -2
  20. package/dist/index.js +3 -1
  21. package/dist/pmxt/client.d.ts +61 -12
  22. package/dist/pmxt/client.js +126 -20
  23. package/dist/pmxt/escrow.js +109 -10
  24. package/dist/pmxt/hosted-typed-data.d.ts +1 -1
  25. package/dist/pmxt/hosted-typed-data.js +14 -0
  26. package/dist/pmxt/models.d.ts +17 -0
  27. package/dist/pmxt/server-manager.js +5 -3
  28. package/generated/docs/ArbitrageOpportunity.md +0 -29
  29. package/generated/docs/Balance.md +0 -25
  30. package/generated/docs/BaseRequest.md +0 -21
  31. package/generated/docs/BaseResponse.md +0 -22
  32. package/generated/docs/BuildOrder200Response.md +0 -23
  33. package/generated/docs/BuildOrderRequest.md +0 -22
  34. package/generated/docs/BuiltOrder.md +0 -26
  35. package/generated/docs/BuiltOrderTx.md +0 -24
  36. package/generated/docs/CancelOrderRequest.md +0 -22
  37. package/generated/docs/CloseRequest.md +0 -22
  38. package/generated/docs/CompareMarketPrices200Response.md +0 -23
  39. package/generated/docs/CompareMarketPricesRequest.md +0 -22
  40. package/generated/docs/CreateOrder200Response.md +0 -23
  41. package/generated/docs/CreateOrderParams.md +2 -30
  42. package/generated/docs/CreateOrderRequest.md +0 -22
  43. package/generated/docs/DataFeedsApi.md +0 -329
  44. package/generated/docs/DefaultApi.md +3 -1438
  45. package/generated/docs/ErrorDetail.md +0 -25
  46. package/generated/docs/ErrorResponse.md +0 -22
  47. package/generated/docs/EventFetchParams.md +0 -35
  48. package/generated/docs/EventFilterCriteria.md +0 -26
  49. package/generated/docs/EventFilterCriteriaTotalVolume.md +0 -22
  50. package/generated/docs/EventMatchResult.md +0 -22
  51. package/generated/docs/ExchangeCredentials.md +0 -29
  52. package/generated/docs/ExchangeCredentialsSignatureType.md +0 -20
  53. package/generated/docs/ExchangeOptions.md +0 -27
  54. package/generated/docs/ExecutionPriceResult.md +0 -23
  55. package/generated/docs/FeedFetchHistoricalPrices200Response.md +0 -22
  56. package/generated/docs/FeedFetchOHLCV200Response.md +0 -22
  57. package/generated/docs/FeedFetchOracleHistory200Response.md +0 -22
  58. package/generated/docs/FeedFetchOracleRound200Response.md +0 -22
  59. package/generated/docs/FeedFetchOrderBook200Response.md +0 -22
  60. package/generated/docs/FeedFetchOrderBook200ResponseData.md +0 -25
  61. package/generated/docs/FeedFetchTicker200Response.md +0 -22
  62. package/generated/docs/FeedFetchTickers200Response.md +0 -22
  63. package/generated/docs/FeedList200Response.md +0 -22
  64. package/generated/docs/FeedLoadMarkets200Response.md +0 -22
  65. package/generated/docs/FeedMarket.md +0 -27
  66. package/generated/docs/FeedOracleRound.md +0 -28
  67. package/generated/docs/FeedTicker.md +0 -42
  68. package/generated/docs/FetchArbitrage200Response.md +0 -23
  69. package/generated/docs/FetchArbitrageParams.md +0 -24
  70. package/generated/docs/FetchBalance200Response.md +0 -23
  71. package/generated/docs/FetchEvent200Response.md +0 -23
  72. package/generated/docs/FetchEventMatches200Response.md +0 -23
  73. package/generated/docs/FetchEventMatchesParams.md +0 -29
  74. package/generated/docs/FetchEvents200Response.md +0 -23
  75. package/generated/docs/FetchEventsPaginated200Response.md +0 -23
  76. package/generated/docs/FetchMarket200Response.md +0 -23
  77. package/generated/docs/FetchMarketMatches200Response.md +0 -23
  78. package/generated/docs/FetchMarketMatchesParams.md +0 -32
  79. package/generated/docs/FetchMarkets200Response.md +0 -23
  80. package/generated/docs/FetchMarketsPaginated200Response.md +0 -23
  81. package/generated/docs/FetchMatchedMarkets200Response.md +0 -23
  82. package/generated/docs/FetchMatchedMarketsParams.md +0 -24
  83. package/generated/docs/FetchMyTrades200Response.md +0 -23
  84. package/generated/docs/FetchOHLCV200Response.md +0 -23
  85. package/generated/docs/FetchOpenOrders200Response.md +0 -23
  86. package/generated/docs/FetchOrderBook200Response.md +0 -23
  87. package/generated/docs/FetchOrderBookParams.md +0 -24
  88. package/generated/docs/FetchOrderBooks200Response.md +0 -23
  89. package/generated/docs/FetchOrderBooksRequest.md +0 -22
  90. package/generated/docs/FetchPositions200Response.md +0 -23
  91. package/generated/docs/FetchSeries200Response.md +0 -23
  92. package/generated/docs/FetchTrades200Response.md +0 -23
  93. package/generated/docs/FilterEventsRequest.md +0 -22
  94. package/generated/docs/FilterEventsRequestArgsInner.md +0 -26
  95. package/generated/docs/FilterMarketsRequest.md +0 -22
  96. package/generated/docs/FilterMarketsRequestArgsInner.md +0 -31
  97. package/generated/docs/GetExecutionPrice200Response.md +0 -23
  98. package/generated/docs/GetExecutionPriceDetailed200Response.md +0 -23
  99. package/generated/docs/GetExecutionPriceDetailedRequest.md +0 -22
  100. package/generated/docs/GetExecutionPriceRequest.md +0 -22
  101. package/generated/docs/GetExecutionPriceRequestArgsInner.md +0 -27
  102. package/generated/docs/HealthCheck200Response.md +0 -22
  103. package/generated/docs/HistoryFilterParams.md +0 -24
  104. package/generated/docs/LoadMarkets200Response.md +0 -23
  105. package/generated/docs/LoadMarketsRequest.md +0 -22
  106. package/generated/docs/MarketFilterCriteria.md +0 -31
  107. package/generated/docs/MarketFilterCriteriaLiquidity.md +0 -22
  108. package/generated/docs/MarketFilterCriteriaOpenInterest.md +0 -22
  109. package/generated/docs/MarketFilterCriteriaPrice.md +0 -23
  110. package/generated/docs/MarketFilterCriteriaResolutionDate.md +0 -22
  111. package/generated/docs/MarketFilterCriteriaVolume.md +0 -22
  112. package/generated/docs/MarketFilterCriteriaVolume24h.md +0 -22
  113. package/generated/docs/MarketFilterParams.md +0 -34
  114. package/generated/docs/MarketOutcome.md +0 -26
  115. package/generated/docs/MatchResult.md +0 -27
  116. package/generated/docs/MatchedMarketPair.md +0 -30
  117. package/generated/docs/MyTradesParams.md +0 -26
  118. package/generated/docs/OHLCVParams.md +0 -24
  119. package/generated/docs/Order.md +0 -37
  120. package/generated/docs/OrderBook.md +0 -27
  121. package/generated/docs/OrderHistoryParams.md +0 -25
  122. package/generated/docs/OrderLevel.md +0 -23
  123. package/generated/docs/PaginatedEventsResult.md +0 -23
  124. package/generated/docs/PaginatedMarketsResult.md +0 -23
  125. package/generated/docs/Position.md +0 -32
  126. package/generated/docs/PriceCandle.md +0 -26
  127. package/generated/docs/PriceComparison.md +0 -27
  128. package/generated/docs/SubmitOrderRequest.md +0 -22
  129. package/generated/docs/Trade.md +0 -26
  130. package/generated/docs/TradesParams.md +0 -23
  131. package/generated/docs/UnifiedEvent.md +0 -33
  132. package/generated/docs/UnifiedMarket.md +0 -44
  133. package/generated/docs/UnifiedSeries.md +0 -31
  134. package/generated/docs/UserTrade.md +0 -32
  135. package/generated/package.json +1 -1
  136. package/generated/src/apis/DefaultApi.ts +6 -0
  137. package/generated/src/models/CreateOrderParams.ts +25 -0
  138. package/index.ts +3 -2
  139. package/package.json +2 -2
  140. package/pmxt/client.ts +153 -28
  141. package/pmxt/escrow.ts +131 -11
  142. package/pmxt/hosted-typed-data.ts +17 -1
  143. package/pmxt/models.ts +20 -0
  144. package/pmxt/server-manager.ts +5 -3
@@ -52,38 +52,6 @@ Build Order
52
52
 
53
53
  Build an order payload without submitting it to the exchange. Returns the exchange-native signed order or request body for inspection, forwarding through a middleware layer, or deferred submission via submitOrder().
54
54
 
55
- ### Example
56
-
57
- ```ts
58
- import {
59
- Configuration,
60
- DefaultApi,
61
- } from 'pmxtjs';
62
- import type { BuildOrderOperationRequest } from 'pmxtjs';
63
-
64
- async function example() {
65
- console.log("🚀 Testing pmxtjs SDK...");
66
- const api = new DefaultApi();
67
-
68
- const body = {
69
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
70
- exchange: exchange_example,
71
- // BuildOrderRequest (optional)
72
- buildOrderRequest: ...,
73
- } satisfies BuildOrderOperationRequest;
74
-
75
- try {
76
- const data = await api.buildOrder(body);
77
- console.log(data);
78
- } catch (error) {
79
- console.error(error);
80
- }
81
- }
82
-
83
- // Run the test
84
- example().catch(console.error);
85
- ```
86
-
87
55
  ### Parameters
88
56
 
89
57
 
@@ -122,38 +90,6 @@ Cancel Order
122
90
 
123
91
  Cancel an existing open order.
124
92
 
125
- ### Example
126
-
127
- ```ts
128
- import {
129
- Configuration,
130
- DefaultApi,
131
- } from 'pmxtjs';
132
- import type { CancelOrderOperationRequest } from 'pmxtjs';
133
-
134
- async function example() {
135
- console.log("🚀 Testing pmxtjs SDK...");
136
- const api = new DefaultApi();
137
-
138
- const body = {
139
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
140
- exchange: exchange_example,
141
- // CancelOrderRequest (optional)
142
- cancelOrderRequest: ...,
143
- } satisfies CancelOrderOperationRequest;
144
-
145
- try {
146
- const data = await api.cancelOrder(body);
147
- console.log(data);
148
- } catch (error) {
149
- console.error(error);
150
- }
151
- }
152
-
153
- // Run the test
154
- example().catch(console.error);
155
- ```
156
-
157
93
  ### Parameters
158
94
 
159
95
 
@@ -192,38 +128,6 @@ Close
192
128
 
193
129
  Close all WebSocket connections and clean up resources. Call this when you\'re done streaming to properly release connections.
194
130
 
195
- ### Example
196
-
197
- ```ts
198
- import {
199
- Configuration,
200
- DefaultApi,
201
- } from 'pmxtjs';
202
- import type { CloseOperationRequest } from 'pmxtjs';
203
-
204
- async function example() {
205
- console.log("🚀 Testing pmxtjs SDK...");
206
- const api = new DefaultApi();
207
-
208
- const body = {
209
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
210
- exchange: exchange_example,
211
- // CloseRequest (optional)
212
- closeRequest: ...,
213
- } satisfies CloseOperationRequest;
214
-
215
- try {
216
- const data = await api.close(body);
217
- console.log(data);
218
- } catch (error) {
219
- console.error(error);
220
- }
221
- }
222
-
223
- // Run the test
224
- example().catch(console.error);
225
- ```
226
-
227
131
  ### Parameters
228
132
 
229
133
 
@@ -262,38 +166,6 @@ Compare Prices Across Venues
262
166
 
263
167
  Compare live prices for the same market across venues. Finds identity matches and returns side-by-side best bid/ask prices so you can spot price differences at a glance.
264
168
 
265
- ### Example
266
-
267
- ```ts
268
- import {
269
- Configuration,
270
- DefaultApi,
271
- } from 'pmxtjs';
272
- import type { CompareMarketPricesOperationRequest } from 'pmxtjs';
273
-
274
- async function example() {
275
- console.log("🚀 Testing pmxtjs SDK...");
276
- const api = new DefaultApi();
277
-
278
- const body = {
279
- // 'router' | The prediction market exchange to target.
280
- exchange: exchange_example,
281
- // CompareMarketPricesRequest (optional)
282
- compareMarketPricesRequest: ...,
283
- } satisfies CompareMarketPricesOperationRequest;
284
-
285
- try {
286
- const data = await api.compareMarketPrices(body);
287
- console.log(data);
288
- } catch (error) {
289
- console.error(error);
290
- }
291
- }
292
-
293
- // Run the test
294
- example().catch(console.error);
295
- ```
296
-
297
169
  ### Parameters
298
170
 
299
171
 
@@ -332,38 +204,6 @@ Create Order
332
204
 
333
205
  Place a new order on the exchange.
334
206
 
335
- ### Example
336
-
337
- ```ts
338
- import {
339
- Configuration,
340
- DefaultApi,
341
- } from 'pmxtjs';
342
- import type { CreateOrderOperationRequest } from 'pmxtjs';
343
-
344
- async function example() {
345
- console.log("🚀 Testing pmxtjs SDK...");
346
- const api = new DefaultApi();
347
-
348
- const body = {
349
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
350
- exchange: exchange_example,
351
- // CreateOrderRequest (optional)
352
- createOrderRequest: ...,
353
- } satisfies CreateOrderOperationRequest;
354
-
355
- try {
356
- const data = await api.createOrder(body);
357
- console.log(data);
358
- } catch (error) {
359
- console.error(error);
360
- }
361
- }
362
-
363
- // Run the test
364
- example().catch(console.error);
365
- ```
366
-
367
207
  ### Parameters
368
208
 
369
209
 
@@ -400,45 +240,7 @@ No authorization required
400
240
 
401
241
  Fetch All Orders
402
242
 
403
- ### Example
404
-
405
- ```ts
406
- import {
407
- Configuration,
408
- DefaultApi,
409
- } from 'pmxtjs';
410
- import type { FetchAllOrdersRequest } from 'pmxtjs';
411
-
412
- async function example() {
413
- console.log("🚀 Testing pmxtjs SDK...");
414
- const api = new DefaultApi();
415
-
416
- const body = {
417
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
418
- exchange: exchange_example,
419
- // string | required for Limitless (slug) (optional)
420
- marketId: marketId_example,
421
- // Date | Only return records after this date (optional)
422
- since: 2013-10-20T19:20:30+01:00,
423
- // Date | Only return records before this date (optional)
424
- until: 2013-10-20T19:20:30+01:00,
425
- // number | Maximum number of results to return (optional)
426
- limit: 8.14,
427
- // string | Opaque pagination cursor from a previous response (optional)
428
- cursor: cursor_example,
429
- } satisfies FetchAllOrdersRequest;
430
-
431
- try {
432
- const data = await api.fetchAllOrders(body);
433
- console.log(data);
434
- } catch (error) {
435
- console.error(error);
436
- }
437
- }
438
-
439
- // Run the test
440
- example().catch(console.error);
441
- ```
243
+ Fetch authenticated order history across open and closed orders.
442
244
 
443
245
  ### Parameters
444
246
 
@@ -480,44 +282,6 @@ No authorization required
480
282
 
481
283
  Find Arbitrage Opportunities
482
284
 
483
- ### Example
484
-
485
- ```ts
486
- import {
487
- Configuration,
488
- DefaultApi,
489
- } from 'pmxtjs';
490
- import type { FetchArbitrageRequest } from 'pmxtjs';
491
-
492
- async function example() {
493
- console.log("🚀 Testing pmxtjs SDK...");
494
- const api = new DefaultApi();
495
-
496
- const body = {
497
- // 'router' | The prediction market exchange to target.
498
- exchange: exchange_example,
499
- // number (optional)
500
- minSpread: 8.14,
501
- // string (optional)
502
- category: category_example,
503
- // number (optional)
504
- limit: 8.14,
505
- // Array<'identity' | 'complement' | 'subset' | 'superset' | 'overlap' | 'disjoint'> | Comma-separated relation types to include (default: \'identity\'). (optional)
506
- relations: ...,
507
- } satisfies FetchArbitrageRequest;
508
-
509
- try {
510
- const data = await api.fetchArbitrage(body);
511
- console.log(data);
512
- } catch (error) {
513
- console.error(error);
514
- }
515
- }
516
-
517
- // Run the test
518
- example().catch(console.error);
519
- ```
520
-
521
285
  ### Parameters
522
286
 
523
287
 
@@ -559,38 +323,6 @@ Fetch Balance
559
323
 
560
324
  Fetch account balances.
561
325
 
562
- ### Example
563
-
564
- ```ts
565
- import {
566
- Configuration,
567
- DefaultApi,
568
- } from 'pmxtjs';
569
- import type { FetchBalanceRequest } from 'pmxtjs';
570
-
571
- async function example() {
572
- console.log("🚀 Testing pmxtjs SDK...");
573
- const api = new DefaultApi();
574
-
575
- const body = {
576
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
577
- exchange: exchange_example,
578
- // string (optional)
579
- address: address_example,
580
- } satisfies FetchBalanceRequest;
581
-
582
- try {
583
- const data = await api.fetchBalance(body);
584
- console.log(data);
585
- } catch (error) {
586
- console.error(error);
587
- }
588
- }
589
-
590
- // Run the test
591
- example().catch(console.error);
592
- ```
593
-
594
326
  ### Parameters
595
327
 
596
328
 
@@ -627,45 +359,7 @@ No authorization required
627
359
 
628
360
  Fetch Closed Orders
629
361
 
630
- ### Example
631
-
632
- ```ts
633
- import {
634
- Configuration,
635
- DefaultApi,
636
- } from 'pmxtjs';
637
- import type { FetchClosedOrdersRequest } from 'pmxtjs';
638
-
639
- async function example() {
640
- console.log("🚀 Testing pmxtjs SDK...");
641
- const api = new DefaultApi();
642
-
643
- const body = {
644
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
645
- exchange: exchange_example,
646
- // string | required for Limitless (slug) (optional)
647
- marketId: marketId_example,
648
- // Date | Only return records after this date (optional)
649
- since: 2013-10-20T19:20:30+01:00,
650
- // Date | Only return records before this date (optional)
651
- until: 2013-10-20T19:20:30+01:00,
652
- // number | Maximum number of results to return (optional)
653
- limit: 8.14,
654
- // string | Opaque pagination cursor from a previous response (optional)
655
- cursor: cursor_example,
656
- } satisfies FetchClosedOrdersRequest;
657
-
658
- try {
659
- const data = await api.fetchClosedOrders(body);
660
- console.log(data);
661
- } catch (error) {
662
- console.error(error);
663
- }
664
- }
665
-
666
- // Run the test
667
- example().catch(console.error);
668
- ```
362
+ Fetch authenticated closed orders.
669
363
 
670
364
  ### Parameters
671
365
 
@@ -709,66 +403,6 @@ Fetch Event
709
403
 
710
404
  Fetch a single event by lookup parameters. Convenience wrapper around fetchEvents() that returns a single result or throws EventNotFound.
711
405
 
712
- ### Example
713
-
714
- ```ts
715
- import {
716
- Configuration,
717
- DefaultApi,
718
- } from 'pmxtjs';
719
- import type { FetchEventRequest } from 'pmxtjs';
720
-
721
- async function example() {
722
- console.log("🚀 Testing pmxtjs SDK...");
723
- const api = new DefaultApi();
724
-
725
- const body = {
726
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
727
- exchange: exchange_example,
728
- // string | For keyword search (optional)
729
- query: query_example,
730
- // number | Maximum number of results to return (optional)
731
- limit: 8.14,
732
- // string | Opaque venue pagination cursor, where supported. (optional)
733
- cursor: cursor_example,
734
- // number | Pagination offset — number of results to skip (optional)
735
- offset: 8.14,
736
- // 'volume' | 'liquidity' | 'newest' | Sort order for results (optional)
737
- sort: sort_example,
738
- // 'active' | 'inactive' | 'closed' | 'all' | Filter by event status (default: \'active\', \'inactive\' and \'closed\' are interchangeable) (optional)
739
- status: status_example,
740
- // 'title' | 'description' | 'both' | Where to search (default: \'title\') (optional)
741
- searchIn: searchIn_example,
742
- // string | Direct lookup by event ID (optional)
743
- eventId: eventId_example,
744
- // string | Lookup by event slug (optional)
745
- slug: slug_example,
746
- // string | Filter events by their parent series. Accepts the venue-native series id / ticker / slug (e.g. Kalshi `\"KXATPMATCH\"`, Polymarket `\"wta\"`). Passed through to the vendor where supported, otherwise applied to `sourceMetadata` after fetch. (optional)
747
- series: series_example,
748
- // EventFilterCriteria | Optional client-side filter applied after fetching (optional)
749
- filter: ...,
750
- // string | Filter by category. Each event belongs to a venue-assigned category such as \"Sports\", \"Politics\", \"Crypto\", \"Bitcoin\", \"Soccer\", \"Economic Policy\" (Polymarket) or \"Sports\", \"Mentions\" (Kalshi). (optional)
751
- category: category_example,
752
- // Array<string> | 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\". (optional)
753
- tags: ...,
754
- // string | Filter by source venue (e.g. \'polymarket\', \'kalshi\', \'myriad\'). `exchange` is an alias. (optional)
755
- sourceExchange: sourceExchange_example,
756
- // string | Alias for `sourceExchange`. (optional)
757
- exchange2: exchange_example,
758
- } satisfies FetchEventRequest;
759
-
760
- try {
761
- const data = await api.fetchEvent(body);
762
- console.log(data);
763
- } catch (error) {
764
- console.error(error);
765
- }
766
- }
767
-
768
- // Run the test
769
- example().catch(console.error);
770
- ```
771
-
772
406
  ### Parameters
773
407
 
774
408
 
@@ -821,54 +455,6 @@ Event Matches
821
455
 
822
456
  Find the same or related event on other venues. Two modes: **Lookup mode** (eventId/slug provided): Given an event on one venue, discover semantically equivalent events across every other venue PMXT ingests. **Browse mode** (no identifier): Returns all matched event pairs from the catalog. Supports query and category params for filtering.
823
457
 
824
- ### Example
825
-
826
- ```ts
827
- import {
828
- Configuration,
829
- DefaultApi,
830
- } from 'pmxtjs';
831
- import type { FetchEventMatchesRequest } from 'pmxtjs';
832
-
833
- async function example() {
834
- console.log("🚀 Testing pmxtjs SDK...");
835
- const api = new DefaultApi();
836
-
837
- const body = {
838
- // 'router' | The prediction market exchange to target.
839
- exchange: exchange_example,
840
- // string | Keyword search across matched event titles. (optional)
841
- query: query_example,
842
- // string | Filter matches by category. (optional)
843
- category: category_example,
844
- // UnifiedEvent | Pass a UnifiedEvent directly instead of eventId/slug. (optional)
845
- event: ...,
846
- // string | Lookup a specific event by ID. Omit for browse mode. (optional)
847
- eventId: eventId_example,
848
- // string (optional)
849
- slug: slug_example,
850
- // 'identity' | 'complement' | 'subset' | 'superset' | 'overlap' | 'disjoint' (optional)
851
- relation: relation_example,
852
- // number (optional)
853
- minConfidence: 8.14,
854
- // number (optional)
855
- limit: 8.14,
856
- // boolean (optional)
857
- includePrices: true,
858
- } satisfies FetchEventMatchesRequest;
859
-
860
- try {
861
- const data = await api.fetchEventMatches(body);
862
- console.log(data);
863
- } catch (error) {
864
- console.error(error);
865
- }
866
- }
867
-
868
- // Run the test
869
- example().catch(console.error);
870
- ```
871
-
872
458
  ### Parameters
873
459
 
874
460
 
@@ -915,66 +501,6 @@ Fetch Events
915
501
 
916
502
  Fetch events with optional keyword search. Events group related markets together (e.g., \&quot;Who will be Fed Chair?\&quot; contains multiple candidate markets).
917
503
 
918
- ### Example
919
-
920
- ```ts
921
- import {
922
- Configuration,
923
- DefaultApi,
924
- } from 'pmxtjs';
925
- import type { FetchEventsRequest } from 'pmxtjs';
926
-
927
- async function example() {
928
- console.log("🚀 Testing pmxtjs SDK...");
929
- const api = new DefaultApi();
930
-
931
- const body = {
932
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
933
- exchange: exchange_example,
934
- // string | For keyword search (optional)
935
- query: query_example,
936
- // number | Maximum number of results to return (optional)
937
- limit: 8.14,
938
- // string | Opaque venue pagination cursor, where supported. (optional)
939
- cursor: cursor_example,
940
- // number | Pagination offset — number of results to skip (optional)
941
- offset: 8.14,
942
- // 'volume' | 'liquidity' | 'newest' | Sort order for results (optional)
943
- sort: sort_example,
944
- // 'active' | 'inactive' | 'closed' | 'all' | Filter by event status (default: \'active\', \'inactive\' and \'closed\' are interchangeable) (optional)
945
- status: status_example,
946
- // 'title' | 'description' | 'both' | Where to search (default: \'title\') (optional)
947
- searchIn: searchIn_example,
948
- // string | Direct lookup by event ID (optional)
949
- eventId: eventId_example,
950
- // string | Lookup by event slug (optional)
951
- slug: slug_example,
952
- // string | Filter events by their parent series. Accepts the venue-native series id / ticker / slug (e.g. Kalshi `\"KXATPMATCH\"`, Polymarket `\"wta\"`). Passed through to the vendor where supported, otherwise applied to `sourceMetadata` after fetch. (optional)
953
- series: series_example,
954
- // EventFilterCriteria | Optional client-side filter applied after fetching (optional)
955
- filter: ...,
956
- // string | Filter by category. Each event belongs to a venue-assigned category such as \"Sports\", \"Politics\", \"Crypto\", \"Bitcoin\", \"Soccer\", \"Economic Policy\" (Polymarket) or \"Sports\", \"Mentions\" (Kalshi). (optional)
957
- category: category_example,
958
- // Array<string> | 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\". (optional)
959
- tags: ...,
960
- // string | Filter by source venue (e.g. \'polymarket\', \'kalshi\', \'myriad\'). `exchange` is an alias. (optional)
961
- sourceExchange: sourceExchange_example,
962
- // string | Alias for `sourceExchange`. (optional)
963
- exchange2: exchange_example,
964
- } satisfies FetchEventsRequest;
965
-
966
- try {
967
- const data = await api.fetchEvents(body);
968
- console.log(data);
969
- } catch (error) {
970
- console.error(error);
971
- }
972
- }
973
-
974
- // Run the test
975
- example().catch(console.error);
976
- ```
977
-
978
504
  ### Parameters
979
505
 
980
506
 
@@ -1027,42 +553,6 @@ Fetch Events Paginated
1027
553
 
1028
554
  Paginated variant of {@link fetchEvents}. On the first call (no &#x60;cursor&#x60;), all events are fetched from the exchange and cached in an in-memory snapshot. A cursor is returned along with the first page. Subsequent calls with that cursor serve additional pages directly from the cached snapshot -- no additional API calls are made. The snapshot is invalidated after &#x60;snapshotTTL&#x60; ms (configured via &#x60;ExchangeOptions&#x60; in the constructor). A request using a cursor from an expired snapshot throws &#x60;\&#39;Cursor has expired\&#39;&#x60;.
1029
555
 
1030
- ### Example
1031
-
1032
- ```ts
1033
- import {
1034
- Configuration,
1035
- DefaultApi,
1036
- } from 'pmxtjs';
1037
- import type { FetchEventsPaginatedRequest } from 'pmxtjs';
1038
-
1039
- async function example() {
1040
- console.log("🚀 Testing pmxtjs SDK...");
1041
- const api = new DefaultApi();
1042
-
1043
- const body = {
1044
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
1045
- exchange: exchange_example,
1046
- // number (optional)
1047
- limit: 8.14,
1048
- // string (optional)
1049
- cursor: cursor_example,
1050
- // EventFilterCriteria (optional)
1051
- filter: ...,
1052
- } satisfies FetchEventsPaginatedRequest;
1053
-
1054
- try {
1055
- const data = await api.fetchEventsPaginated(body);
1056
- console.log(data);
1057
- } catch (error) {
1058
- console.error(error);
1059
- }
1060
- }
1061
-
1062
- // Run the test
1063
- example().catch(console.error);
1064
- ```
1065
-
1066
556
  ### Parameters
1067
557
 
1068
558
 
@@ -1101,60 +591,6 @@ No authorization required
1101
591
 
1102
592
  Find Hedging Opportunities
1103
593
 
1104
- ### Example
1105
-
1106
- ```ts
1107
- import {
1108
- Configuration,
1109
- DefaultApi,
1110
- } from 'pmxtjs';
1111
- import type { FetchHedgesRequest } from 'pmxtjs';
1112
-
1113
- async function example() {
1114
- console.log("🚀 Testing pmxtjs SDK...");
1115
- const api = new DefaultApi();
1116
-
1117
- const body = {
1118
- // 'router' | The prediction market exchange to target.
1119
- exchange: exchange_example,
1120
- // string | Keyword search across matched market titles. (optional)
1121
- query: query_example,
1122
- // string | Filter matches by category. (optional)
1123
- category: category_example,
1124
- // UnifiedMarket | Pass a UnifiedMarket directly instead of marketId/slug/url. (optional)
1125
- market: ...,
1126
- // string | Lookup a specific market by ID. Omit for browse mode. (optional)
1127
- marketId: marketId_example,
1128
- // string (optional)
1129
- slug: slug_example,
1130
- // string (optional)
1131
- url: url_example,
1132
- // 'identity' | 'complement' | 'subset' | 'superset' | 'overlap' | 'disjoint' (optional)
1133
- relation: relation_example,
1134
- // number (optional)
1135
- minConfidence: 8.14,
1136
- // number (optional)
1137
- limit: 8.14,
1138
- // boolean (optional)
1139
- includePrices: true,
1140
- // number | Minimum price difference between venues. Browse mode only. (optional)
1141
- minDifference: 8.14,
1142
- // 'confidence' | 'volume' | 'priceDifference' | Sort order. Browse mode only. (optional)
1143
- sort: sort_example,
1144
- } satisfies FetchHedgesRequest;
1145
-
1146
- try {
1147
- const data = await api.fetchHedges(body);
1148
- console.log(data);
1149
- } catch (error) {
1150
- console.error(error);
1151
- }
1152
- }
1153
-
1154
- // Run the test
1155
- example().catch(console.error);
1156
- ```
1157
-
1158
594
  ### Parameters
1159
595
 
1160
596
 
@@ -1204,64 +640,6 @@ Fetch Market
1204
640
 
1205
641
  Fetch a single market by lookup parameters. Convenience wrapper around fetchMarkets() that returns a single result or throws MarketNotFound.
1206
642
 
1207
- ### Example
1208
-
1209
- ```ts
1210
- import {
1211
- Configuration,
1212
- DefaultApi,
1213
- } from 'pmxtjs';
1214
- import type { FetchMarketRequest } from 'pmxtjs';
1215
-
1216
- async function example() {
1217
- console.log("🚀 Testing pmxtjs SDK...");
1218
- const api = new DefaultApi();
1219
-
1220
- const body = {
1221
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
1222
- exchange: exchange_example,
1223
- // number | Maximum number of results to return (optional)
1224
- limit: 8.14,
1225
- // number | Pagination offset — number of results to skip (optional)
1226
- offset: 8.14,
1227
- // 'volume' | 'liquidity' | 'newest' | Sort order for results (optional)
1228
- sort: sort_example,
1229
- // 'active' | 'inactive' | 'closed' | 'all' | Filter by market status (default: \'active\', \'inactive\' and \'closed\' are interchangeable) (optional)
1230
- status: status_example,
1231
- // 'title' | 'description' | 'both' | Where to search (default: \'title\') (optional)
1232
- searchIn: searchIn_example,
1233
- // string | For keyword search (optional)
1234
- query: query_example,
1235
- // string | For slug/ticker lookup (optional)
1236
- slug: slug_example,
1237
- // string | Direct lookup by market ID (optional)
1238
- marketId: marketId_example,
1239
- // string | Reverse lookup -- find market containing this outcome (optional)
1240
- outcomeId: outcomeId_example,
1241
- // string | Find markets belonging to an event (optional)
1242
- eventId: eventId_example,
1243
- // number | For pagination (used by Limitless) (optional)
1244
- page: 8.14,
1245
- // number | For semantic search (used by Limitless) (optional)
1246
- similarityThreshold: 8.14,
1247
- // string | Filter by source venue (e.g. \'polymarket\', \'kalshi\', \'myriad\'). `exchange` is an alias. (optional)
1248
- sourceExchange: sourceExchange_example,
1249
- // string | Alias for `sourceExchange`. (optional)
1250
- exchange2: exchange_example,
1251
- } satisfies FetchMarketRequest;
1252
-
1253
- try {
1254
- const data = await api.fetchMarket(body);
1255
- console.log(data);
1256
- } catch (error) {
1257
- console.error(error);
1258
- }
1259
- }
1260
-
1261
- // Run the test
1262
- example().catch(console.error);
1263
- ```
1264
-
1265
643
  ### Parameters
1266
644
 
1267
645
 
@@ -1313,60 +691,6 @@ Market Matches
1313
691
 
1314
692
  Find the same or related market on other venues. Two modes: **Lookup mode** (marketId/slug/url provided): Given a market on one venue, discover semantically equivalent markets across every other venue PMXT ingests. **Browse mode** (no identifier): Returns all matched market pairs from the catalog. Supports query, category, minDifference, and sort params for filtering.
1315
693
 
1316
- ### Example
1317
-
1318
- ```ts
1319
- import {
1320
- Configuration,
1321
- DefaultApi,
1322
- } from 'pmxtjs';
1323
- import type { FetchMarketMatchesRequest } from 'pmxtjs';
1324
-
1325
- async function example() {
1326
- console.log("🚀 Testing pmxtjs SDK...");
1327
- const api = new DefaultApi();
1328
-
1329
- const body = {
1330
- // 'router' | The prediction market exchange to target.
1331
- exchange: exchange_example,
1332
- // string | Keyword search across matched market titles. (optional)
1333
- query: query_example,
1334
- // string | Filter matches by category. (optional)
1335
- category: category_example,
1336
- // UnifiedMarket | Pass a UnifiedMarket directly instead of marketId/slug/url. (optional)
1337
- market: ...,
1338
- // string | Lookup a specific market by ID. Omit for browse mode. (optional)
1339
- marketId: marketId_example,
1340
- // string (optional)
1341
- slug: slug_example,
1342
- // string (optional)
1343
- url: url_example,
1344
- // 'identity' | 'complement' | 'subset' | 'superset' | 'overlap' | 'disjoint' (optional)
1345
- relation: relation_example,
1346
- // number (optional)
1347
- minConfidence: 8.14,
1348
- // number (optional)
1349
- limit: 8.14,
1350
- // boolean (optional)
1351
- includePrices: true,
1352
- // number | Minimum price difference between venues. Browse mode only. (optional)
1353
- minDifference: 8.14,
1354
- // 'confidence' | 'volume' | 'priceDifference' | Sort order. Browse mode only. (optional)
1355
- sort: sort_example,
1356
- } satisfies FetchMarketMatchesRequest;
1357
-
1358
- try {
1359
- const data = await api.fetchMarketMatches(body);
1360
- console.log(data);
1361
- } catch (error) {
1362
- console.error(error);
1363
- }
1364
- }
1365
-
1366
- // Run the test
1367
- example().catch(console.error);
1368
- ```
1369
-
1370
694
  ### Parameters
1371
695
 
1372
696
 
@@ -1416,64 +740,6 @@ Fetch Markets
1416
740
 
1417
741
  Fetch markets with optional filtering, search, or slug lookup. Always hits the exchange API — results reflect the live state at the time of the call.
1418
742
 
1419
- ### Example
1420
-
1421
- ```ts
1422
- import {
1423
- Configuration,
1424
- DefaultApi,
1425
- } from 'pmxtjs';
1426
- import type { FetchMarketsRequest } from 'pmxtjs';
1427
-
1428
- async function example() {
1429
- console.log("🚀 Testing pmxtjs SDK...");
1430
- const api = new DefaultApi();
1431
-
1432
- const body = {
1433
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
1434
- exchange: exchange_example,
1435
- // number | Maximum number of results to return (optional)
1436
- limit: 8.14,
1437
- // number | Pagination offset — number of results to skip (optional)
1438
- offset: 8.14,
1439
- // 'volume' | 'liquidity' | 'newest' | Sort order for results (optional)
1440
- sort: sort_example,
1441
- // 'active' | 'inactive' | 'closed' | 'all' | Filter by market status (default: \'active\', \'inactive\' and \'closed\' are interchangeable) (optional)
1442
- status: status_example,
1443
- // 'title' | 'description' | 'both' | Where to search (default: \'title\') (optional)
1444
- searchIn: searchIn_example,
1445
- // string | For keyword search (optional)
1446
- query: query_example,
1447
- // string | For slug/ticker lookup (optional)
1448
- slug: slug_example,
1449
- // string | Direct lookup by market ID (optional)
1450
- marketId: marketId_example,
1451
- // string | Reverse lookup -- find market containing this outcome (optional)
1452
- outcomeId: outcomeId_example,
1453
- // string | Find markets belonging to an event (optional)
1454
- eventId: eventId_example,
1455
- // number | For pagination (used by Limitless) (optional)
1456
- page: 8.14,
1457
- // number | For semantic search (used by Limitless) (optional)
1458
- similarityThreshold: 8.14,
1459
- // string | Filter by source venue (e.g. \'polymarket\', \'kalshi\', \'myriad\'). `exchange` is an alias. (optional)
1460
- sourceExchange: sourceExchange_example,
1461
- // string | Alias for `sourceExchange`. (optional)
1462
- exchange2: exchange_example,
1463
- } satisfies FetchMarketsRequest;
1464
-
1465
- try {
1466
- const data = await api.fetchMarkets(body);
1467
- console.log(data);
1468
- } catch (error) {
1469
- console.error(error);
1470
- }
1471
- }
1472
-
1473
- // Run the test
1474
- example().catch(console.error);
1475
- ```
1476
-
1477
743
  ### Parameters
1478
744
 
1479
745
 
@@ -1525,42 +791,6 @@ Fetch Markets Paginated
1525
791
 
1526
792
  Fetch markets with cursor-based pagination backed by a stable in-memory snapshot. On the first call (or when no cursor is supplied), fetches all markets once and caches them. Subsequent calls with a cursor returned from a previous call slice directly from the cached snapshot — no additional API calls are made. The snapshot is invalidated after &#x60;snapshotTTL&#x60; ms (configured via &#x60;ExchangeOptions&#x60; in the constructor). A request using a cursor from an expired snapshot throws &#x60;\&#39;Cursor has expired\&#39;&#x60;.
1527
793
 
1528
- ### Example
1529
-
1530
- ```ts
1531
- import {
1532
- Configuration,
1533
- DefaultApi,
1534
- } from 'pmxtjs';
1535
- import type { FetchMarketsPaginatedRequest } from 'pmxtjs';
1536
-
1537
- async function example() {
1538
- console.log("🚀 Testing pmxtjs SDK...");
1539
- const api = new DefaultApi();
1540
-
1541
- const body = {
1542
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
1543
- exchange: exchange_example,
1544
- // number (optional)
1545
- limit: 8.14,
1546
- // string (optional)
1547
- cursor: cursor_example,
1548
- // MarketFilterCriteria (optional)
1549
- filter: ...,
1550
- } satisfies FetchMarketsPaginatedRequest;
1551
-
1552
- try {
1553
- const data = await api.fetchMarketsPaginated(body);
1554
- console.log(data);
1555
- } catch (error) {
1556
- console.error(error);
1557
- }
1558
- }
1559
-
1560
- // Run the test
1561
- example().catch(console.error);
1562
- ```
1563
-
1564
794
  ### Parameters
1565
795
 
1566
796
 
@@ -1599,44 +829,6 @@ No authorization required
1599
829
 
1600
830
  Matched Markets
1601
831
 
1602
- ### Example
1603
-
1604
- ```ts
1605
- import {
1606
- Configuration,
1607
- DefaultApi,
1608
- } from 'pmxtjs';
1609
- import type { FetchMatchedMarketsRequest } from 'pmxtjs';
1610
-
1611
- async function example() {
1612
- console.log("🚀 Testing pmxtjs SDK...");
1613
- const api = new DefaultApi();
1614
-
1615
- const body = {
1616
- // 'router' | The prediction market exchange to target.
1617
- exchange: exchange_example,
1618
- // number (optional)
1619
- minDifference: 8.14,
1620
- // string (optional)
1621
- category: category_example,
1622
- // number (optional)
1623
- limit: 8.14,
1624
- // Array<'identity' | 'complement' | 'subset' | 'superset' | 'overlap' | 'disjoint'> | Comma-separated relation types to include (default: \'identity\'). (optional)
1625
- relations: ...,
1626
- } satisfies FetchMatchedMarketsRequest;
1627
-
1628
- try {
1629
- const data = await api.fetchMatchedMarkets(body);
1630
- console.log(data);
1631
- } catch (error) {
1632
- console.error(error);
1633
- }
1634
- }
1635
-
1636
- // Run the test
1637
- example().catch(console.error);
1638
- ```
1639
-
1640
832
  ### Parameters
1641
833
 
1642
834
 
@@ -1676,44 +868,6 @@ No authorization required
1676
868
 
1677
869
  Compare Matched Market Prices
1678
870
 
1679
- ### Example
1680
-
1681
- ```ts
1682
- import {
1683
- Configuration,
1684
- DefaultApi,
1685
- } from 'pmxtjs';
1686
- import type { FetchMatchedPricesRequest } from 'pmxtjs';
1687
-
1688
- async function example() {
1689
- console.log("🚀 Testing pmxtjs SDK...");
1690
- const api = new DefaultApi();
1691
-
1692
- const body = {
1693
- // 'router' | The prediction market exchange to target.
1694
- exchange: exchange_example,
1695
- // number (optional)
1696
- minDifference: 8.14,
1697
- // string (optional)
1698
- category: category_example,
1699
- // number (optional)
1700
- limit: 8.14,
1701
- // Array<'identity' | 'complement' | 'subset' | 'superset' | 'overlap' | 'disjoint'> | Comma-separated relation types to include (default: \'identity\'). (optional)
1702
- relations: ...,
1703
- } satisfies FetchMatchedPricesRequest;
1704
-
1705
- try {
1706
- const data = await api.fetchMatchedPrices(body);
1707
- console.log(data);
1708
- } catch (error) {
1709
- console.error(error);
1710
- }
1711
- }
1712
-
1713
- // Run the test
1714
- example().catch(console.error);
1715
- ```
1716
-
1717
871
  ### Parameters
1718
872
 
1719
873
 
@@ -1753,47 +907,7 @@ No authorization required
1753
907
 
1754
908
  Fetch My Trades
1755
909
 
1756
- ### Example
1757
-
1758
- ```ts
1759
- import {
1760
- Configuration,
1761
- DefaultApi,
1762
- } from 'pmxtjs';
1763
- import type { FetchMyTradesRequest } from 'pmxtjs';
1764
-
1765
- async function example() {
1766
- console.log("🚀 Testing pmxtjs SDK...");
1767
- const api = new DefaultApi();
1768
-
1769
- const body = {
1770
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
1771
- exchange: exchange_example,
1772
- // string | filter to specific outcome/ticker (optional)
1773
- outcomeId: outcomeId_example,
1774
- // string | filter to specific market (optional)
1775
- marketId: marketId_example,
1776
- // Date | Only return records after this date (optional)
1777
- since: 2013-10-20T19:20:30+01:00,
1778
- // Date | Only return records before this date (optional)
1779
- until: 2013-10-20T19:20:30+01:00,
1780
- // number | Maximum number of results to return (optional)
1781
- limit: 8.14,
1782
- // string | for Kalshi cursor pagination (optional)
1783
- cursor: cursor_example,
1784
- } satisfies FetchMyTradesRequest;
1785
-
1786
- try {
1787
- const data = await api.fetchMyTrades(body);
1788
- console.log(data);
1789
- } catch (error) {
1790
- console.error(error);
1791
- }
1792
- }
1793
-
1794
- // Run the test
1795
- example().catch(console.error);
1796
- ```
910
+ Fetch authenticated user trade history.
1797
911
 
1798
912
  ### Parameters
1799
913
 
@@ -1838,46 +952,6 @@ Fetch OHLCV
1838
952
 
1839
953
  Fetch historical OHLCV (candlestick) price data for a specific market outcome.
1840
954
 
1841
- ### Example
1842
-
1843
- ```ts
1844
- import {
1845
- Configuration,
1846
- DefaultApi,
1847
- } from 'pmxtjs';
1848
- import type { FetchOHLCVRequest } from 'pmxtjs';
1849
-
1850
- async function example() {
1851
- console.log("🚀 Testing pmxtjs SDK...");
1852
- const api = new DefaultApi();
1853
-
1854
- const body = {
1855
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
1856
- exchange: exchange_example,
1857
- // string
1858
- outcomeId: outcomeId_example,
1859
- // string | Required for candle aggregation (optional)
1860
- resolution: resolution_example,
1861
- // Date | Start of the time range (optional)
1862
- start: 2013-10-20T19:20:30+01:00,
1863
- // Date | End of the time range (optional)
1864
- end: 2013-10-20T19:20:30+01:00,
1865
- // number | Maximum number of results to return (optional)
1866
- limit: 8.14,
1867
- } satisfies FetchOHLCVRequest;
1868
-
1869
- try {
1870
- const data = await api.fetchOHLCV(body);
1871
- console.log(data);
1872
- } catch (error) {
1873
- console.error(error);
1874
- }
1875
- }
1876
-
1877
- // Run the test
1878
- example().catch(console.error);
1879
- ```
1880
-
1881
955
  ### Parameters
1882
956
 
1883
957
 
@@ -1920,38 +994,6 @@ Fetch Open Orders
1920
994
 
1921
995
  Fetch all open orders, optionally filtered by market.
1922
996
 
1923
- ### Example
1924
-
1925
- ```ts
1926
- import {
1927
- Configuration,
1928
- DefaultApi,
1929
- } from 'pmxtjs';
1930
- import type { FetchOpenOrdersRequest } from 'pmxtjs';
1931
-
1932
- async function example() {
1933
- console.log("🚀 Testing pmxtjs SDK...");
1934
- const api = new DefaultApi();
1935
-
1936
- const body = {
1937
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
1938
- exchange: exchange_example,
1939
- // string (optional)
1940
- marketId: marketId_example,
1941
- } satisfies FetchOpenOrdersRequest;
1942
-
1943
- try {
1944
- const data = await api.fetchOpenOrders(body);
1945
- console.log(data);
1946
- } catch (error) {
1947
- console.error(error);
1948
- }
1949
- }
1950
-
1951
- // Run the test
1952
- example().catch(console.error);
1953
- ```
1954
-
1955
997
  ### Parameters
1956
998
 
1957
999
 
@@ -1990,38 +1032,6 @@ Fetch Order
1990
1032
 
1991
1033
  Fetch a specific order by ID.
1992
1034
 
1993
- ### Example
1994
-
1995
- ```ts
1996
- import {
1997
- Configuration,
1998
- DefaultApi,
1999
- } from 'pmxtjs';
2000
- import type { FetchOrderRequest } from 'pmxtjs';
2001
-
2002
- async function example() {
2003
- console.log("🚀 Testing pmxtjs SDK...");
2004
- const api = new DefaultApi();
2005
-
2006
- const body = {
2007
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
2008
- exchange: exchange_example,
2009
- // string
2010
- orderId: orderId_example,
2011
- } satisfies FetchOrderRequest;
2012
-
2013
- try {
2014
- const data = await api.fetchOrder(body);
2015
- console.log(data);
2016
- } catch (error) {
2017
- console.error(error);
2018
- }
2019
- }
2020
-
2021
- // Run the test
2022
- example().catch(console.error);
2023
- ```
2024
-
2025
1035
  ### Parameters
2026
1036
 
2027
1037
 
@@ -2060,48 +1070,6 @@ Fetch Order Book
2060
1070
 
2061
1071
  Fetch the order book (bids/asks) for a specific outcome. Supports live and historical queries. For historical data, pass &#x60;since&#x60; to get a single snapshot, or &#x60;since&#x60; + &#x60;until&#x60; to get an array of fully reconstructed L2 books from the archive. Range queries return up to &#x60;limit&#x60; snapshots (default 100, max 1000).
2062
1072
 
2063
- ### Example
2064
-
2065
- ```ts
2066
- import {
2067
- Configuration,
2068
- DefaultApi,
2069
- } from 'pmxtjs';
2070
- import type { FetchOrderBookRequest } from 'pmxtjs';
2071
-
2072
- async function example() {
2073
- console.log("🚀 Testing pmxtjs SDK...");
2074
- const api = new DefaultApi();
2075
-
2076
- const body = {
2077
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
2078
- exchange: exchange_example,
2079
- // string
2080
- outcomeId: outcomeId_example,
2081
- // number (optional)
2082
- limit: 8.14,
2083
- // 'yes' | 'no' | Outcome side: \'yes\' or \'no\'. Required for exchanges like Limitless where the API returns a single orderbook per market. (optional)
2084
- side: side_example,
2085
- // string | Outcome alias: \'yes\' or \'no\', or an outcome token ID. When set, the first argument is treated as a market ID and this value selects which outcome\'s order book to fetch. Accepts the literal strings \'yes\'/\'no\' (resolved via a market lookup) or a raw outcome token ID. (optional)
2086
- outcome: outcome_example,
2087
- // number | Unix timestamp (ms) — fetch a historical snapshot at or before this time, or the start of a range when combined with `until` (hosted API only). (optional)
2088
- since: 8.14,
2089
- // number | Unix timestamp (ms) — end of a historical range. When combined with `since`, returns an array of reconstructed L2 OrderBook snapshots between `since` and `until` (hosted API only). (optional)
2090
- until: 8.14,
2091
- } satisfies FetchOrderBookRequest;
2092
-
2093
- try {
2094
- const data = await api.fetchOrderBook(body);
2095
- console.log(data);
2096
- } catch (error) {
2097
- console.error(error);
2098
- }
2099
- }
2100
-
2101
- // Run the test
2102
- example().catch(console.error);
2103
- ```
2104
-
2105
1073
  ### Parameters
2106
1074
 
2107
1075
 
@@ -2145,38 +1113,6 @@ Fetch Order Books
2145
1113
 
2146
1114
  Batch variant of {@link fetchOrderBook}. Fetches order books for multiple outcomes in a single request where the exchange supports it.
2147
1115
 
2148
- ### Example
2149
-
2150
- ```ts
2151
- import {
2152
- Configuration,
2153
- DefaultApi,
2154
- } from 'pmxtjs';
2155
- import type { FetchOrderBooksOperationRequest } from 'pmxtjs';
2156
-
2157
- async function example() {
2158
- console.log("🚀 Testing pmxtjs SDK...");
2159
- const api = new DefaultApi();
2160
-
2161
- const body = {
2162
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
2163
- exchange: exchange_example,
2164
- // FetchOrderBooksRequest (optional)
2165
- fetchOrderBooksRequest: ...,
2166
- } satisfies FetchOrderBooksOperationRequest;
2167
-
2168
- try {
2169
- const data = await api.fetchOrderBooks(body);
2170
- console.log(data);
2171
- } catch (error) {
2172
- console.error(error);
2173
- }
2174
- }
2175
-
2176
- // Run the test
2177
- example().catch(console.error);
2178
- ```
2179
-
2180
1116
  ### Parameters
2181
1117
 
2182
1118
 
@@ -2215,38 +1151,6 @@ Fetch Positions
2215
1151
 
2216
1152
  Fetch current user positions across all markets.
2217
1153
 
2218
- ### Example
2219
-
2220
- ```ts
2221
- import {
2222
- Configuration,
2223
- DefaultApi,
2224
- } from 'pmxtjs';
2225
- import type { FetchPositionsRequest } from 'pmxtjs';
2226
-
2227
- async function example() {
2228
- console.log("🚀 Testing pmxtjs SDK...");
2229
- const api = new DefaultApi();
2230
-
2231
- const body = {
2232
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
2233
- exchange: exchange_example,
2234
- // string (optional)
2235
- address: address_example,
2236
- } satisfies FetchPositionsRequest;
2237
-
2238
- try {
2239
- const data = await api.fetchPositions(body);
2240
- console.log(data);
2241
- } catch (error) {
2242
- console.error(error);
2243
- }
2244
- }
2245
-
2246
- // Run the test
2247
- example().catch(console.error);
2248
- ```
2249
-
2250
1154
  ### Parameters
2251
1155
 
2252
1156
 
@@ -2285,60 +1189,6 @@ Find Related Markets
2285
1189
 
2286
1190
  Find related markets across venues. Discovers subset/superset market relationships where one market\&#39;s outcome implies another, with live prices.
2287
1191
 
2288
- ### Example
2289
-
2290
- ```ts
2291
- import {
2292
- Configuration,
2293
- DefaultApi,
2294
- } from 'pmxtjs';
2295
- import type { FetchRelatedMarketsRequest } from 'pmxtjs';
2296
-
2297
- async function example() {
2298
- console.log("🚀 Testing pmxtjs SDK...");
2299
- const api = new DefaultApi();
2300
-
2301
- const body = {
2302
- // 'router' | The prediction market exchange to target.
2303
- exchange: exchange_example,
2304
- // string | Keyword search across matched market titles. (optional)
2305
- query: query_example,
2306
- // string | Filter matches by category. (optional)
2307
- category: category_example,
2308
- // UnifiedMarket | Pass a UnifiedMarket directly instead of marketId/slug/url. (optional)
2309
- market: ...,
2310
- // string | Lookup a specific market by ID. Omit for browse mode. (optional)
2311
- marketId: marketId_example,
2312
- // string (optional)
2313
- slug: slug_example,
2314
- // string (optional)
2315
- url: url_example,
2316
- // 'identity' | 'complement' | 'subset' | 'superset' | 'overlap' | 'disjoint' (optional)
2317
- relation: relation_example,
2318
- // number (optional)
2319
- minConfidence: 8.14,
2320
- // number (optional)
2321
- limit: 8.14,
2322
- // boolean (optional)
2323
- includePrices: true,
2324
- // number | Minimum price difference between venues. Browse mode only. (optional)
2325
- minDifference: 8.14,
2326
- // 'confidence' | 'volume' | 'priceDifference' | Sort order. Browse mode only. (optional)
2327
- sort: sort_example,
2328
- } satisfies FetchRelatedMarketsRequest;
2329
-
2330
- try {
2331
- const data = await api.fetchRelatedMarkets(body);
2332
- console.log(data);
2333
- } catch (error) {
2334
- console.error(error);
2335
- }
2336
- }
2337
-
2338
- // Run the test
2339
- example().catch(console.error);
2340
- ```
2341
-
2342
1192
  ### Parameters
2343
1193
 
2344
1194
 
@@ -2388,36 +1238,6 @@ Fetch Series
2388
1238
 
2389
1239
  Fetch the recurring series (fourth tier above Event -&gt; Market -&gt; Outcome) that this venue exposes. Returns an empty array on venues without a series concept (Limitless, Smarkets, Probable, Metaculus, Baozi, Hyperliquid, SuiBets, Polymarket US). - &#x60;params.id&#x60; -&gt; a single matching series with its events populated where supported. - no params -&gt; the full list, typically without nested events for payload size.
2390
1240
 
2391
- ### Example
2392
-
2393
- ```ts
2394
- import {
2395
- Configuration,
2396
- DefaultApi,
2397
- } from 'pmxtjs';
2398
- import type { FetchSeriesRequest } from 'pmxtjs';
2399
-
2400
- async function example() {
2401
- console.log("🚀 Testing pmxtjs SDK...");
2402
- const api = new DefaultApi();
2403
-
2404
- const body = {
2405
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
2406
- exchange: exchange_example,
2407
- } satisfies FetchSeriesRequest;
2408
-
2409
- try {
2410
- const data = await api.fetchSeries(body);
2411
- console.log(data);
2412
- } catch (error) {
2413
- console.error(error);
2414
- }
2415
- }
2416
-
2417
- // Run the test
2418
- example().catch(console.error);
2419
- ```
2420
-
2421
1241
  ### Parameters
2422
1242
 
2423
1243
 
@@ -2455,44 +1275,6 @@ Fetch Trades
2455
1275
 
2456
1276
  Fetch raw trade history for a specific outcome.
2457
1277
 
2458
- ### Example
2459
-
2460
- ```ts
2461
- import {
2462
- Configuration,
2463
- DefaultApi,
2464
- } from 'pmxtjs';
2465
- import type { FetchTradesRequest } from 'pmxtjs';
2466
-
2467
- async function example() {
2468
- console.log("🚀 Testing pmxtjs SDK...");
2469
- const api = new DefaultApi();
2470
-
2471
- const body = {
2472
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
2473
- exchange: exchange_example,
2474
- // string
2475
- outcomeId: outcomeId_example,
2476
- // Date | Start of the time range (optional)
2477
- start: 2013-10-20T19:20:30+01:00,
2478
- // Date | End of the time range (optional)
2479
- end: 2013-10-20T19:20:30+01:00,
2480
- // number | Maximum number of results to return (max {@link MAX_TRADES_LIMIT}) (optional)
2481
- limit: 8.14,
2482
- } satisfies FetchTradesRequest;
2483
-
2484
- try {
2485
- const data = await api.fetchTrades(body);
2486
- console.log(data);
2487
- } catch (error) {
2488
- console.error(error);
2489
- }
2490
- }
2491
-
2492
- // Run the test
2493
- example().catch(console.error);
2494
- ```
2495
-
2496
1278
  ### Parameters
2497
1279
 
2498
1280
 
@@ -2534,38 +1316,6 @@ Filter Events
2534
1316
 
2535
1317
  Filter a list of events by criteria. Can filter by string query, structured criteria object, or custom filter function.
2536
1318
 
2537
- ### Example
2538
-
2539
- ```ts
2540
- import {
2541
- Configuration,
2542
- DefaultApi,
2543
- } from 'pmxtjs';
2544
- import type { FilterEventsOperationRequest } from 'pmxtjs';
2545
-
2546
- async function example() {
2547
- console.log("🚀 Testing pmxtjs SDK...");
2548
- const api = new DefaultApi();
2549
-
2550
- const body = {
2551
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
2552
- exchange: exchange_example,
2553
- // FilterEventsRequest (optional)
2554
- filterEventsRequest: ...,
2555
- } satisfies FilterEventsOperationRequest;
2556
-
2557
- try {
2558
- const data = await api.filterEvents(body);
2559
- console.log(data);
2560
- } catch (error) {
2561
- console.error(error);
2562
- }
2563
- }
2564
-
2565
- // Run the test
2566
- example().catch(console.error);
2567
- ```
2568
-
2569
1319
  ### Parameters
2570
1320
 
2571
1321
 
@@ -2604,38 +1354,6 @@ Filter Markets
2604
1354
 
2605
1355
  Filter a list of markets by criteria. Can filter by string query, structured criteria object, or custom filter function.
2606
1356
 
2607
- ### Example
2608
-
2609
- ```ts
2610
- import {
2611
- Configuration,
2612
- DefaultApi,
2613
- } from 'pmxtjs';
2614
- import type { FilterMarketsOperationRequest } from 'pmxtjs';
2615
-
2616
- async function example() {
2617
- console.log("🚀 Testing pmxtjs SDK...");
2618
- const api = new DefaultApi();
2619
-
2620
- const body = {
2621
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
2622
- exchange: exchange_example,
2623
- // FilterMarketsRequest (optional)
2624
- filterMarketsRequest: ...,
2625
- } satisfies FilterMarketsOperationRequest;
2626
-
2627
- try {
2628
- const data = await api.filterMarkets(body);
2629
- console.log(data);
2630
- } catch (error) {
2631
- console.error(error);
2632
- }
2633
- }
2634
-
2635
- // Run the test
2636
- example().catch(console.error);
2637
- ```
2638
-
2639
1357
  ### Parameters
2640
1358
 
2641
1359
 
@@ -2674,38 +1392,6 @@ Get Execution Price
2674
1392
 
2675
1393
  Calculate the volume-weighted average execution price for a given order size. Returns 0 if the order cannot be fully filled.
2676
1394
 
2677
- ### Example
2678
-
2679
- ```ts
2680
- import {
2681
- Configuration,
2682
- DefaultApi,
2683
- } from 'pmxtjs';
2684
- import type { GetExecutionPriceOperationRequest } from 'pmxtjs';
2685
-
2686
- async function example() {
2687
- console.log("🚀 Testing pmxtjs SDK...");
2688
- const api = new DefaultApi();
2689
-
2690
- const body = {
2691
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
2692
- exchange: exchange_example,
2693
- // GetExecutionPriceRequest (optional)
2694
- getExecutionPriceRequest: ...,
2695
- } satisfies GetExecutionPriceOperationRequest;
2696
-
2697
- try {
2698
- const data = await api.getExecutionPrice(body);
2699
- console.log(data);
2700
- } catch (error) {
2701
- console.error(error);
2702
- }
2703
- }
2704
-
2705
- // Run the test
2706
- example().catch(console.error);
2707
- ```
2708
-
2709
1395
  ### Parameters
2710
1396
 
2711
1397
 
@@ -2744,38 +1430,6 @@ Get Execution Price Detailed
2744
1430
 
2745
1431
  Calculate detailed execution price information including partial fill data.
2746
1432
 
2747
- ### Example
2748
-
2749
- ```ts
2750
- import {
2751
- Configuration,
2752
- DefaultApi,
2753
- } from 'pmxtjs';
2754
- import type { GetExecutionPriceDetailedOperationRequest } from 'pmxtjs';
2755
-
2756
- async function example() {
2757
- console.log("🚀 Testing pmxtjs SDK...");
2758
- const api = new DefaultApi();
2759
-
2760
- const body = {
2761
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
2762
- exchange: exchange_example,
2763
- // GetExecutionPriceDetailedRequest (optional)
2764
- getExecutionPriceDetailedRequest: ...,
2765
- } satisfies GetExecutionPriceDetailedOperationRequest;
2766
-
2767
- try {
2768
- const data = await api.getExecutionPriceDetailed(body);
2769
- console.log(data);
2770
- } catch (error) {
2771
- console.error(error);
2772
- }
2773
- }
2774
-
2775
- // Run the test
2776
- example().catch(console.error);
2777
- ```
2778
-
2779
1433
  ### Parameters
2780
1434
 
2781
1435
 
@@ -2812,31 +1466,6 @@ No authorization required
2812
1466
 
2813
1467
  Server Health Check
2814
1468
 
2815
- ### Example
2816
-
2817
- ```ts
2818
- import {
2819
- Configuration,
2820
- DefaultApi,
2821
- } from 'pmxtjs';
2822
- import type { HealthCheckRequest } from 'pmxtjs';
2823
-
2824
- async function example() {
2825
- console.log("🚀 Testing pmxtjs SDK...");
2826
- const api = new DefaultApi();
2827
-
2828
- try {
2829
- const data = await api.healthCheck();
2830
- console.log(data);
2831
- } catch (error) {
2832
- console.error(error);
2833
- }
2834
- }
2835
-
2836
- // Run the test
2837
- example().catch(console.error);
2838
- ```
2839
-
2840
1469
  ### Parameters
2841
1470
 
2842
1471
  This endpoint does not need any parameter.
@@ -2871,38 +1500,6 @@ Load Markets
2871
1500
 
2872
1501
  Load and cache all markets from the exchange into &#x60;this.markets&#x60; and &#x60;this.marketsBySlug&#x60;. Subsequent calls return the cached result without hitting the API again. This is the correct way to paginate or iterate over markets without drift. Because &#x60;fetchMarkets()&#x60; always hits the API, repeated calls with different &#x60;offset&#x60; values may return inconsistent results if the exchange reorders or adds markets between requests. Use &#x60;loadMarkets()&#x60; once to get a stable snapshot, then paginate over &#x60;Object.values(exchange.markets)&#x60; locally.
2873
1502
 
2874
- ### Example
2875
-
2876
- ```ts
2877
- import {
2878
- Configuration,
2879
- DefaultApi,
2880
- } from 'pmxtjs';
2881
- import type { LoadMarketsOperationRequest } from 'pmxtjs';
2882
-
2883
- async function example() {
2884
- console.log("🚀 Testing pmxtjs SDK...");
2885
- const api = new DefaultApi();
2886
-
2887
- const body = {
2888
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
2889
- exchange: exchange_example,
2890
- // LoadMarketsRequest (optional)
2891
- loadMarketsRequest: ...,
2892
- } satisfies LoadMarketsOperationRequest;
2893
-
2894
- try {
2895
- const data = await api.loadMarkets(body);
2896
- console.log(data);
2897
- } catch (error) {
2898
- console.error(error);
2899
- }
2900
- }
2901
-
2902
- // Run the test
2903
- example().catch(console.error);
2904
- ```
2905
-
2906
1503
  ### Parameters
2907
1504
 
2908
1505
 
@@ -2941,38 +1538,6 @@ Submit Order
2941
1538
 
2942
1539
  Submit a pre-built order returned by buildOrder().
2943
1540
 
2944
- ### Example
2945
-
2946
- ```ts
2947
- import {
2948
- Configuration,
2949
- DefaultApi,
2950
- } from 'pmxtjs';
2951
- import type { SubmitOrderOperationRequest } from 'pmxtjs';
2952
-
2953
- async function example() {
2954
- console.log("🚀 Testing pmxtjs SDK...");
2955
- const api = new DefaultApi();
2956
-
2957
- const body = {
2958
- // 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'mock' | 'router' | The prediction market exchange to target.
2959
- exchange: exchange_example,
2960
- // SubmitOrderRequest (optional)
2961
- submitOrderRequest: ...,
2962
- } satisfies SubmitOrderOperationRequest;
2963
-
2964
- try {
2965
- const data = await api.submitOrder(body);
2966
- console.log(data);
2967
- } catch (error) {
2968
- console.error(error);
2969
- }
2970
- }
2971
-
2972
- // Run the test
2973
- example().catch(console.error);
2974
- ```
2975
-
2976
1541
  ### Parameters
2977
1542
 
2978
1543