pmxtjs 2.41.3 → 2.41.5

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 (29) hide show
  1. package/dist/esm/generated/src/apis/DefaultApi.d.ts +1 -187
  2. package/dist/esm/generated/src/apis/DefaultApi.js +1 -271
  3. package/dist/esm/generated/src/models/index.d.ts +0 -2
  4. package/dist/esm/generated/src/models/index.js +0 -2
  5. package/dist/esm/pmxt/client.js +10 -3
  6. package/dist/generated/src/apis/DefaultApi.d.ts +1 -187
  7. package/dist/generated/src/apis/DefaultApi.js +1 -271
  8. package/dist/generated/src/models/index.d.ts +0 -2
  9. package/dist/generated/src/models/index.js +0 -2
  10. package/dist/pmxt/client.js +10 -3
  11. package/generated/.openapi-generator/FILES +0 -4
  12. package/generated/docs/DefaultApi.md +0 -408
  13. package/generated/package.json +1 -1
  14. package/generated/src/apis/DefaultApi.ts +0 -372
  15. package/generated/src/models/index.ts +0 -2
  16. package/package.json +3 -3
  17. package/pmxt/client.ts +5 -3
  18. package/dist/esm/generated/src/models/WatchAddress200Response.d.ts +0 -45
  19. package/dist/esm/generated/src/models/WatchAddress200Response.js +0 -46
  20. package/dist/esm/generated/src/models/WatchOrderBooks200Response.d.ts +0 -48
  21. package/dist/esm/generated/src/models/WatchOrderBooks200Response.js +0 -48
  22. package/dist/generated/src/models/WatchAddress200Response.d.ts +0 -45
  23. package/dist/generated/src/models/WatchAddress200Response.js +0 -53
  24. package/dist/generated/src/models/WatchOrderBooks200Response.d.ts +0 -48
  25. package/dist/generated/src/models/WatchOrderBooks200Response.js +0 -55
  26. package/generated/docs/WatchAddress200Response.md +0 -38
  27. package/generated/docs/WatchOrderBooks200Response.md +0 -38
  28. package/generated/src/models/WatchAddress200Response.ts +0 -89
  29. package/generated/src/models/WatchOrderBooks200Response.ts +0 -96
@@ -57,8 +57,6 @@ import type {
57
57
  TestDummyMethodRequest,
58
58
  UnifiedEvent,
59
59
  UnifiedMarket,
60
- WatchAddress200Response,
61
- WatchOrderBooks200Response,
62
60
  } from '../models/index';
63
61
  import {
64
62
  BaseResponseFromJSON,
@@ -145,10 +143,6 @@ import {
145
143
  UnifiedEventToJSON,
146
144
  UnifiedMarketFromJSON,
147
145
  UnifiedMarketToJSON,
148
- WatchAddress200ResponseFromJSON,
149
- WatchAddress200ResponseToJSON,
150
- WatchOrderBooks200ResponseFromJSON,
151
- WatchOrderBooks200ResponseToJSON,
152
146
  } from '../models/index';
153
147
 
154
148
  export interface BuildOrderOperationRequest {
@@ -443,30 +437,6 @@ export interface TestDummyMethodOperationRequest {
443
437
  testDummyMethodRequest?: TestDummyMethodRequest;
444
438
  }
445
439
 
446
- export interface UnwatchAddressRequest {
447
- exchange: UnwatchAddressExchangeEnum;
448
- }
449
-
450
- export interface UnwatchOrderBookRequest {
451
- exchange: UnwatchOrderBookExchangeEnum;
452
- }
453
-
454
- export interface WatchAddressRequest {
455
- exchange: WatchAddressExchangeEnum;
456
- }
457
-
458
- export interface WatchOrderBookRequest {
459
- exchange: WatchOrderBookExchangeEnum;
460
- }
461
-
462
- export interface WatchOrderBooksRequest {
463
- exchange: WatchOrderBooksExchangeEnum;
464
- }
465
-
466
- export interface WatchTradesRequest {
467
- exchange: WatchTradesExchangeEnum;
468
- }
469
-
470
440
  /**
471
441
  *
472
442
  */
@@ -2482,240 +2452,6 @@ export class DefaultApi extends runtime.BaseAPI {
2482
2452
  return await response.value();
2483
2453
  }
2484
2454
 
2485
- /**
2486
- * Stop watching a previously registered wallet address and release its resource updates. **Transport:** WebSocket | Environment | URL | |---|---| | Local sidecar | `ws://localhost:3847/ws` | | Hosted API | `wss://api.pmxt.dev/ws?apiKey=YOUR_KEY` | **Subscribe:** ```json { \"id\": \"req-1\", \"action\": \"subscribe\", \"method\": \"unwatchAddress\", \"args\": [...] } ``` **Server response:** ```json { \"event\": \"data\", \"id\": \"req-1\", \"method\": \"unwatchAddress\", \"symbol\": \"...\", \"data\": { ... } } ``` **Unsubscribe:** ```json { \"id\": \"req-1\", \"action\": \"unsubscribe\" } ```
2487
- * Unwatch Address
2488
- */
2489
- async unwatchAddressRaw(requestParameters: UnwatchAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseResponse>> {
2490
- if (requestParameters['exchange'] == null) {
2491
- throw new runtime.RequiredError(
2492
- 'exchange',
2493
- 'Required parameter "exchange" was null or undefined when calling unwatchAddress().'
2494
- );
2495
- }
2496
-
2497
- const queryParameters: any = {};
2498
-
2499
- const headerParameters: runtime.HTTPHeaders = {};
2500
-
2501
-
2502
- let urlPath = `/api/{exchange}/unwatchAddress`;
2503
- urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
2504
-
2505
- const response = await this.request({
2506
- path: urlPath,
2507
- method: 'POST',
2508
- headers: headerParameters,
2509
- query: queryParameters,
2510
- }, initOverrides);
2511
-
2512
- return new runtime.JSONApiResponse(response, (jsonValue) => BaseResponseFromJSON(jsonValue));
2513
- }
2514
-
2515
- /**
2516
- * Stop watching a previously registered wallet address and release its resource updates. **Transport:** WebSocket | Environment | URL | |---|---| | Local sidecar | `ws://localhost:3847/ws` | | Hosted API | `wss://api.pmxt.dev/ws?apiKey=YOUR_KEY` | **Subscribe:** ```json { \"id\": \"req-1\", \"action\": \"subscribe\", \"method\": \"unwatchAddress\", \"args\": [...] } ``` **Server response:** ```json { \"event\": \"data\", \"id\": \"req-1\", \"method\": \"unwatchAddress\", \"symbol\": \"...\", \"data\": { ... } } ``` **Unsubscribe:** ```json { \"id\": \"req-1\", \"action\": \"unsubscribe\" } ```
2517
- * Unwatch Address
2518
- */
2519
- async unwatchAddress(requestParameters: UnwatchAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseResponse> {
2520
- const response = await this.unwatchAddressRaw(requestParameters, initOverrides);
2521
- return await response.value();
2522
- }
2523
-
2524
- /**
2525
- * Unsubscribe from a previously watched order book stream. **Transport:** WebSocket | Environment | URL | |---|---| | Local sidecar | `ws://localhost:3847/ws` | | Hosted API | `wss://api.pmxt.dev/ws?apiKey=YOUR_KEY` | **Subscribe:** ```json { \"id\": \"req-1\", \"action\": \"subscribe\", \"method\": \"unwatchOrderBook\", \"args\": [...] } ``` **Server response:** ```json { \"event\": \"data\", \"id\": \"req-1\", \"method\": \"unwatchOrderBook\", \"symbol\": \"...\", \"data\": { ... } } ``` **Unsubscribe:** ```json { \"id\": \"req-1\", \"action\": \"unsubscribe\" } ```
2526
- * Unwatch Order Book
2527
- */
2528
- async unwatchOrderBookRaw(requestParameters: UnwatchOrderBookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseResponse>> {
2529
- if (requestParameters['exchange'] == null) {
2530
- throw new runtime.RequiredError(
2531
- 'exchange',
2532
- 'Required parameter "exchange" was null or undefined when calling unwatchOrderBook().'
2533
- );
2534
- }
2535
-
2536
- const queryParameters: any = {};
2537
-
2538
- const headerParameters: runtime.HTTPHeaders = {};
2539
-
2540
-
2541
- let urlPath = `/api/{exchange}/unwatchOrderBook`;
2542
- urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
2543
-
2544
- const response = await this.request({
2545
- path: urlPath,
2546
- method: 'POST',
2547
- headers: headerParameters,
2548
- query: queryParameters,
2549
- }, initOverrides);
2550
-
2551
- return new runtime.JSONApiResponse(response, (jsonValue) => BaseResponseFromJSON(jsonValue));
2552
- }
2553
-
2554
- /**
2555
- * Unsubscribe from a previously watched order book stream. **Transport:** WebSocket | Environment | URL | |---|---| | Local sidecar | `ws://localhost:3847/ws` | | Hosted API | `wss://api.pmxt.dev/ws?apiKey=YOUR_KEY` | **Subscribe:** ```json { \"id\": \"req-1\", \"action\": \"subscribe\", \"method\": \"unwatchOrderBook\", \"args\": [...] } ``` **Server response:** ```json { \"event\": \"data\", \"id\": \"req-1\", \"method\": \"unwatchOrderBook\", \"symbol\": \"...\", \"data\": { ... } } ``` **Unsubscribe:** ```json { \"id\": \"req-1\", \"action\": \"unsubscribe\" } ```
2556
- * Unwatch Order Book
2557
- */
2558
- async unwatchOrderBook(requestParameters: UnwatchOrderBookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseResponse> {
2559
- const response = await this.unwatchOrderBookRaw(requestParameters, initOverrides);
2560
- return await response.value();
2561
- }
2562
-
2563
- /**
2564
- * Stream activity for a public wallet address Returns a promise that resolves with the next activity snapshot whenever a change is detected. Call repeatedly in a loop to stream updates (CCXT Pro pattern). **Transport:** WebSocket | Environment | URL | |---|---| | Local sidecar | `ws://localhost:3847/ws` | | Hosted API | `wss://api.pmxt.dev/ws?apiKey=YOUR_KEY` | **Subscribe:** ```json { \"id\": \"req-1\", \"action\": \"subscribe\", \"method\": \"watchAddress\", \"args\": [...] } ``` **Server response:** ```json { \"event\": \"data\", \"id\": \"req-1\", \"method\": \"watchAddress\", \"symbol\": \"...\", \"data\": { ... } } ``` **Unsubscribe:** ```json { \"id\": \"req-1\", \"action\": \"unsubscribe\" } ```
2565
- * Watch Address
2566
- */
2567
- async watchAddressRaw(requestParameters: WatchAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WatchAddress200Response>> {
2568
- if (requestParameters['exchange'] == null) {
2569
- throw new runtime.RequiredError(
2570
- 'exchange',
2571
- 'Required parameter "exchange" was null or undefined when calling watchAddress().'
2572
- );
2573
- }
2574
-
2575
- const queryParameters: any = {};
2576
-
2577
- const headerParameters: runtime.HTTPHeaders = {};
2578
-
2579
-
2580
- let urlPath = `/api/{exchange}/watchAddress`;
2581
- urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
2582
-
2583
- const response = await this.request({
2584
- path: urlPath,
2585
- method: 'POST',
2586
- headers: headerParameters,
2587
- query: queryParameters,
2588
- }, initOverrides);
2589
-
2590
- return new runtime.JSONApiResponse(response, (jsonValue) => WatchAddress200ResponseFromJSON(jsonValue));
2591
- }
2592
-
2593
- /**
2594
- * Stream activity for a public wallet address Returns a promise that resolves with the next activity snapshot whenever a change is detected. Call repeatedly in a loop to stream updates (CCXT Pro pattern). **Transport:** WebSocket | Environment | URL | |---|---| | Local sidecar | `ws://localhost:3847/ws` | | Hosted API | `wss://api.pmxt.dev/ws?apiKey=YOUR_KEY` | **Subscribe:** ```json { \"id\": \"req-1\", \"action\": \"subscribe\", \"method\": \"watchAddress\", \"args\": [...] } ``` **Server response:** ```json { \"event\": \"data\", \"id\": \"req-1\", \"method\": \"watchAddress\", \"symbol\": \"...\", \"data\": { ... } } ``` **Unsubscribe:** ```json { \"id\": \"req-1\", \"action\": \"unsubscribe\" } ```
2595
- * Watch Address
2596
- */
2597
- async watchAddress(requestParameters: WatchAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WatchAddress200Response> {
2598
- const response = await this.watchAddressRaw(requestParameters, initOverrides);
2599
- return await response.value();
2600
- }
2601
-
2602
- /**
2603
- * Watch order book updates in real-time via WebSocket. Returns a promise that resolves with the next order book update. Call repeatedly in a loop to stream updates (CCXT Pro pattern). **Transport:** WebSocket | Environment | URL | |---|---| | Local sidecar | `ws://localhost:3847/ws` | | Hosted API | `wss://api.pmxt.dev/ws?apiKey=YOUR_KEY` | **Subscribe:** ```json { \"id\": \"req-1\", \"action\": \"subscribe\", \"method\": \"watchOrderBook\", \"args\": [...] } ``` **Server response:** ```json { \"event\": \"data\", \"id\": \"req-1\", \"method\": \"watchOrderBook\", \"symbol\": \"...\", \"data\": { ... } } ``` **Unsubscribe:** ```json { \"id\": \"req-1\", \"action\": \"unsubscribe\" } ```
2604
- * Watch Order Book
2605
- */
2606
- async watchOrderBookRaw(requestParameters: WatchOrderBookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchOrderBook200Response>> {
2607
- if (requestParameters['exchange'] == null) {
2608
- throw new runtime.RequiredError(
2609
- 'exchange',
2610
- 'Required parameter "exchange" was null or undefined when calling watchOrderBook().'
2611
- );
2612
- }
2613
-
2614
- const queryParameters: any = {};
2615
-
2616
- const headerParameters: runtime.HTTPHeaders = {};
2617
-
2618
-
2619
- let urlPath = `/api/{exchange}/watchOrderBook`;
2620
- urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
2621
-
2622
- const response = await this.request({
2623
- path: urlPath,
2624
- method: 'POST',
2625
- headers: headerParameters,
2626
- query: queryParameters,
2627
- }, initOverrides);
2628
-
2629
- return new runtime.JSONApiResponse(response, (jsonValue) => FetchOrderBook200ResponseFromJSON(jsonValue));
2630
- }
2631
-
2632
- /**
2633
- * Watch order book updates in real-time via WebSocket. Returns a promise that resolves with the next order book update. Call repeatedly in a loop to stream updates (CCXT Pro pattern). **Transport:** WebSocket | Environment | URL | |---|---| | Local sidecar | `ws://localhost:3847/ws` | | Hosted API | `wss://api.pmxt.dev/ws?apiKey=YOUR_KEY` | **Subscribe:** ```json { \"id\": \"req-1\", \"action\": \"subscribe\", \"method\": \"watchOrderBook\", \"args\": [...] } ``` **Server response:** ```json { \"event\": \"data\", \"id\": \"req-1\", \"method\": \"watchOrderBook\", \"symbol\": \"...\", \"data\": { ... } } ``` **Unsubscribe:** ```json { \"id\": \"req-1\", \"action\": \"unsubscribe\" } ```
2634
- * Watch Order Book
2635
- */
2636
- async watchOrderBook(requestParameters: WatchOrderBookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchOrderBook200Response> {
2637
- const response = await this.watchOrderBookRaw(requestParameters, initOverrides);
2638
- return await response.value();
2639
- }
2640
-
2641
- /**
2642
- * Watch multiple order books simultaneously via WebSocket. Returns a promise that resolves with a record of order book snapshots keyed by ID. Exchanges with native batch support (e.g. Kalshi) send a single subscribe message for all tickers; others fall back to individual watchOrderBook calls. **Transport:** WebSocket | Environment | URL | |---|---| | Local sidecar | `ws://localhost:3847/ws` | | Hosted API | `wss://api.pmxt.dev/ws?apiKey=YOUR_KEY` | **Subscribe:** ```json { \"id\": \"req-1\", \"action\": \"subscribe\", \"method\": \"watchOrderBooks\", \"args\": [...] } ``` **Server response:** ```json { \"event\": \"data\", \"id\": \"req-1\", \"method\": \"watchOrderBooks\", \"symbol\": \"...\", \"data\": { ... } } ``` **Unsubscribe:** ```json { \"id\": \"req-1\", \"action\": \"unsubscribe\" } ```
2643
- * Watch Order Books
2644
- */
2645
- async watchOrderBooksRaw(requestParameters: WatchOrderBooksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WatchOrderBooks200Response>> {
2646
- if (requestParameters['exchange'] == null) {
2647
- throw new runtime.RequiredError(
2648
- 'exchange',
2649
- 'Required parameter "exchange" was null or undefined when calling watchOrderBooks().'
2650
- );
2651
- }
2652
-
2653
- const queryParameters: any = {};
2654
-
2655
- const headerParameters: runtime.HTTPHeaders = {};
2656
-
2657
-
2658
- let urlPath = `/api/{exchange}/watchOrderBooks`;
2659
- urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
2660
-
2661
- const response = await this.request({
2662
- path: urlPath,
2663
- method: 'POST',
2664
- headers: headerParameters,
2665
- query: queryParameters,
2666
- }, initOverrides);
2667
-
2668
- return new runtime.JSONApiResponse(response, (jsonValue) => WatchOrderBooks200ResponseFromJSON(jsonValue));
2669
- }
2670
-
2671
- /**
2672
- * Watch multiple order books simultaneously via WebSocket. Returns a promise that resolves with a record of order book snapshots keyed by ID. Exchanges with native batch support (e.g. Kalshi) send a single subscribe message for all tickers; others fall back to individual watchOrderBook calls. **Transport:** WebSocket | Environment | URL | |---|---| | Local sidecar | `ws://localhost:3847/ws` | | Hosted API | `wss://api.pmxt.dev/ws?apiKey=YOUR_KEY` | **Subscribe:** ```json { \"id\": \"req-1\", \"action\": \"subscribe\", \"method\": \"watchOrderBooks\", \"args\": [...] } ``` **Server response:** ```json { \"event\": \"data\", \"id\": \"req-1\", \"method\": \"watchOrderBooks\", \"symbol\": \"...\", \"data\": { ... } } ``` **Unsubscribe:** ```json { \"id\": \"req-1\", \"action\": \"unsubscribe\" } ```
2673
- * Watch Order Books
2674
- */
2675
- async watchOrderBooks(requestParameters: WatchOrderBooksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WatchOrderBooks200Response> {
2676
- const response = await this.watchOrderBooksRaw(requestParameters, initOverrides);
2677
- return await response.value();
2678
- }
2679
-
2680
- /**
2681
- * Watch trade executions in real-time via WebSocket. Returns a promise that resolves with the next trade(s). Call repeatedly in a loop to stream updates (CCXT Pro pattern). **Transport:** WebSocket | Environment | URL | |---|---| | Local sidecar | `ws://localhost:3847/ws` | | Hosted API | `wss://api.pmxt.dev/ws?apiKey=YOUR_KEY` | **Subscribe:** ```json { \"id\": \"req-1\", \"action\": \"subscribe\", \"method\": \"watchTrades\", \"args\": [...] } ``` **Server response:** ```json { \"event\": \"data\", \"id\": \"req-1\", \"method\": \"watchTrades\", \"symbol\": \"...\", \"data\": { ... } } ``` **Unsubscribe:** ```json { \"id\": \"req-1\", \"action\": \"unsubscribe\" } ```
2682
- * Watch Trades
2683
- */
2684
- async watchTradesRaw(requestParameters: WatchTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchTrades200Response>> {
2685
- if (requestParameters['exchange'] == null) {
2686
- throw new runtime.RequiredError(
2687
- 'exchange',
2688
- 'Required parameter "exchange" was null or undefined when calling watchTrades().'
2689
- );
2690
- }
2691
-
2692
- const queryParameters: any = {};
2693
-
2694
- const headerParameters: runtime.HTTPHeaders = {};
2695
-
2696
-
2697
- let urlPath = `/api/{exchange}/watchTrades`;
2698
- urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
2699
-
2700
- const response = await this.request({
2701
- path: urlPath,
2702
- method: 'POST',
2703
- headers: headerParameters,
2704
- query: queryParameters,
2705
- }, initOverrides);
2706
-
2707
- return new runtime.JSONApiResponse(response, (jsonValue) => FetchTrades200ResponseFromJSON(jsonValue));
2708
- }
2709
-
2710
- /**
2711
- * Watch trade executions in real-time via WebSocket. Returns a promise that resolves with the next trade(s). Call repeatedly in a loop to stream updates (CCXT Pro pattern). **Transport:** WebSocket | Environment | URL | |---|---| | Local sidecar | `ws://localhost:3847/ws` | | Hosted API | `wss://api.pmxt.dev/ws?apiKey=YOUR_KEY` | **Subscribe:** ```json { \"id\": \"req-1\", \"action\": \"subscribe\", \"method\": \"watchTrades\", \"args\": [...] } ``` **Server response:** ```json { \"event\": \"data\", \"id\": \"req-1\", \"method\": \"watchTrades\", \"symbol\": \"...\", \"data\": { ... } } ``` **Unsubscribe:** ```json { \"id\": \"req-1\", \"action\": \"unsubscribe\" } ```
2712
- * Watch Trades
2713
- */
2714
- async watchTrades(requestParameters: WatchTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchTrades200Response> {
2715
- const response = await this.watchTradesRaw(requestParameters, initOverrides);
2716
- return await response.value();
2717
- }
2718
-
2719
2455
  }
2720
2456
 
2721
2457
  /**
@@ -3476,111 +3212,3 @@ export const TestDummyMethodOperationExchangeEnum = {
3476
3212
  Router: 'router'
3477
3213
  } as const;
3478
3214
  export type TestDummyMethodOperationExchangeEnum = typeof TestDummyMethodOperationExchangeEnum[keyof typeof TestDummyMethodOperationExchangeEnum];
3479
- /**
3480
- * @export
3481
- */
3482
- export const UnwatchAddressExchangeEnum = {
3483
- Polymarket: 'polymarket',
3484
- Kalshi: 'kalshi',
3485
- KalshiDemo: 'kalshi-demo',
3486
- Limitless: 'limitless',
3487
- Probable: 'probable',
3488
- Baozi: 'baozi',
3489
- Myriad: 'myriad',
3490
- Opinion: 'opinion',
3491
- Metaculus: 'metaculus',
3492
- Smarkets: 'smarkets',
3493
- PolymarketUs: 'polymarket_us',
3494
- Router: 'router'
3495
- } as const;
3496
- export type UnwatchAddressExchangeEnum = typeof UnwatchAddressExchangeEnum[keyof typeof UnwatchAddressExchangeEnum];
3497
- /**
3498
- * @export
3499
- */
3500
- export const UnwatchOrderBookExchangeEnum = {
3501
- Polymarket: 'polymarket',
3502
- Kalshi: 'kalshi',
3503
- KalshiDemo: 'kalshi-demo',
3504
- Limitless: 'limitless',
3505
- Probable: 'probable',
3506
- Baozi: 'baozi',
3507
- Myriad: 'myriad',
3508
- Opinion: 'opinion',
3509
- Metaculus: 'metaculus',
3510
- Smarkets: 'smarkets',
3511
- PolymarketUs: 'polymarket_us',
3512
- Router: 'router'
3513
- } as const;
3514
- export type UnwatchOrderBookExchangeEnum = typeof UnwatchOrderBookExchangeEnum[keyof typeof UnwatchOrderBookExchangeEnum];
3515
- /**
3516
- * @export
3517
- */
3518
- export const WatchAddressExchangeEnum = {
3519
- Polymarket: 'polymarket',
3520
- Kalshi: 'kalshi',
3521
- KalshiDemo: 'kalshi-demo',
3522
- Limitless: 'limitless',
3523
- Probable: 'probable',
3524
- Baozi: 'baozi',
3525
- Myriad: 'myriad',
3526
- Opinion: 'opinion',
3527
- Metaculus: 'metaculus',
3528
- Smarkets: 'smarkets',
3529
- PolymarketUs: 'polymarket_us',
3530
- Router: 'router'
3531
- } as const;
3532
- export type WatchAddressExchangeEnum = typeof WatchAddressExchangeEnum[keyof typeof WatchAddressExchangeEnum];
3533
- /**
3534
- * @export
3535
- */
3536
- export const WatchOrderBookExchangeEnum = {
3537
- Polymarket: 'polymarket',
3538
- Kalshi: 'kalshi',
3539
- KalshiDemo: 'kalshi-demo',
3540
- Limitless: 'limitless',
3541
- Probable: 'probable',
3542
- Baozi: 'baozi',
3543
- Myriad: 'myriad',
3544
- Opinion: 'opinion',
3545
- Metaculus: 'metaculus',
3546
- Smarkets: 'smarkets',
3547
- PolymarketUs: 'polymarket_us',
3548
- Router: 'router'
3549
- } as const;
3550
- export type WatchOrderBookExchangeEnum = typeof WatchOrderBookExchangeEnum[keyof typeof WatchOrderBookExchangeEnum];
3551
- /**
3552
- * @export
3553
- */
3554
- export const WatchOrderBooksExchangeEnum = {
3555
- Polymarket: 'polymarket',
3556
- Kalshi: 'kalshi',
3557
- KalshiDemo: 'kalshi-demo',
3558
- Limitless: 'limitless',
3559
- Probable: 'probable',
3560
- Baozi: 'baozi',
3561
- Myriad: 'myriad',
3562
- Opinion: 'opinion',
3563
- Metaculus: 'metaculus',
3564
- Smarkets: 'smarkets',
3565
- PolymarketUs: 'polymarket_us',
3566
- Router: 'router'
3567
- } as const;
3568
- export type WatchOrderBooksExchangeEnum = typeof WatchOrderBooksExchangeEnum[keyof typeof WatchOrderBooksExchangeEnum];
3569
- /**
3570
- * @export
3571
- */
3572
- export const WatchTradesExchangeEnum = {
3573
- Polymarket: 'polymarket',
3574
- Kalshi: 'kalshi',
3575
- KalshiDemo: 'kalshi-demo',
3576
- Limitless: 'limitless',
3577
- Probable: 'probable',
3578
- Baozi: 'baozi',
3579
- Myriad: 'myriad',
3580
- Opinion: 'opinion',
3581
- Metaculus: 'metaculus',
3582
- Smarkets: 'smarkets',
3583
- PolymarketUs: 'polymarket_us',
3584
- Router: 'router'
3585
- } as const;
3586
- export type WatchTradesExchangeEnum = typeof WatchTradesExchangeEnum[keyof typeof WatchTradesExchangeEnum];
@@ -88,5 +88,3 @@ export * from './TradesParams';
88
88
  export * from './UnifiedEvent';
89
89
  export * from './UnifiedMarket';
90
90
  export * from './UserTrade';
91
- export * from './WatchAddress200Response';
92
- export * from './WatchOrderBooks200Response';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmxtjs",
3
- "version": "2.41.3",
3
+ "version": "2.41.5",
4
4
  "description": "Unified prediction market data API - The ccxt for prediction markets",
5
5
  "author": "PMXT Contributors",
6
6
  "repository": {
@@ -43,13 +43,13 @@
43
43
  "unified"
44
44
  ],
45
45
  "dependencies": {
46
- "pmxt-core": "2.41.3",
46
+ "pmxt-core": "2.41.5",
47
47
  "ws": "^8.18.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/jest": "^30.0.0",
51
51
  "@types/node": "^20.0.0",
52
- "jest": "^30.3.0",
52
+ "jest": "^30.4.2",
53
53
  "ts-jest": "^29.4.9",
54
54
  "typescript": "^5.0.0"
55
55
  }
package/pmxt/client.ts CHANGED
@@ -1901,9 +1901,11 @@ export abstract class Exchange {
1901
1901
  venueOpts.signatureType = this._hostedAccount.signatureType || 3;
1902
1902
  }
1903
1903
  const venue = new VenueClass(venueOpts);
1904
- const order = await venue.createOrder({ outcomeId: leg.tokenId, side: leg.side, amount: leg.shares, price: leg.price });
1905
- const filledShares = order.filled || 0;
1906
- fills.push({ venue: leg.venue, venueOrderId: order.id, venueMarketId: leg.venueMarketId, venueOutcomeId: leg.venueOutcomeId, shares: filledShares > 0 ? filledShares : leg.shares, price: order.price || leg.price, status: filledShares > 0 ? 'filled' : 'open' });
1904
+ const orderParams: any = { outcomeId: leg.tokenId, side: leg.side, amount: leg.shares };
1905
+ if (leg.orderType === 'market') { orderParams.type = 'market'; orderParams.price = leg.price; }
1906
+ else { orderParams.price = leg.price; }
1907
+ const order = await venue.createOrder(orderParams);
1908
+ fills.push({ venue: leg.venue, venueOrderId: order.id, venueMarketId: leg.venueMarketId, venueOutcomeId: leg.venueOutcomeId, shares: order.filled ?? leg.shares, price: order.price || leg.price, status: order.status });
1907
1909
  } catch (err: any) {
1908
1910
  fills.push({ venue: leg.venue, venueMarketId: leg.venueMarketId, venueOutcomeId: leg.venueOutcomeId, shares: leg.shares, price: leg.price, status: 'failed', error: err.message });
1909
1911
  }
@@ -1,45 +0,0 @@
1
- /**
2
- * PMXT Sidecar API
3
- * A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
4
- *
5
- * The version of the OpenAPI document: 0.4.4
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { ErrorDetail } from './ErrorDetail.js';
13
- /**
14
- *
15
- * @export
16
- * @interface WatchAddress200Response
17
- */
18
- export interface WatchAddress200Response {
19
- /**
20
- *
21
- * @type {boolean}
22
- * @memberof WatchAddress200Response
23
- */
24
- success?: boolean;
25
- /**
26
- *
27
- * @type {ErrorDetail}
28
- * @memberof WatchAddress200Response
29
- */
30
- error?: ErrorDetail;
31
- /**
32
- *
33
- * @type {object}
34
- * @memberof WatchAddress200Response
35
- */
36
- data?: object;
37
- }
38
- /**
39
- * Check if a given object implements the WatchAddress200Response interface.
40
- */
41
- export declare function instanceOfWatchAddress200Response(value: object): value is WatchAddress200Response;
42
- export declare function WatchAddress200ResponseFromJSON(json: any): WatchAddress200Response;
43
- export declare function WatchAddress200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchAddress200Response;
44
- export declare function WatchAddress200ResponseToJSON(json: any): WatchAddress200Response;
45
- export declare function WatchAddress200ResponseToJSONTyped(value?: WatchAddress200Response | null, ignoreDiscriminator?: boolean): any;
@@ -1,46 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * PMXT Sidecar API
5
- * A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
6
- *
7
- * The version of the OpenAPI document: 0.4.4
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import { ErrorDetailFromJSON, ErrorDetailToJSON, } from './ErrorDetail.js';
15
- /**
16
- * Check if a given object implements the WatchAddress200Response interface.
17
- */
18
- export function instanceOfWatchAddress200Response(value) {
19
- return true;
20
- }
21
- export function WatchAddress200ResponseFromJSON(json) {
22
- return WatchAddress200ResponseFromJSONTyped(json, false);
23
- }
24
- export function WatchAddress200ResponseFromJSONTyped(json, ignoreDiscriminator) {
25
- if (json == null) {
26
- return json;
27
- }
28
- return {
29
- 'success': json['success'] == null ? undefined : json['success'],
30
- 'error': json['error'] == null ? undefined : ErrorDetailFromJSON(json['error']),
31
- 'data': json['data'] == null ? undefined : json['data'],
32
- };
33
- }
34
- export function WatchAddress200ResponseToJSON(json) {
35
- return WatchAddress200ResponseToJSONTyped(json, false);
36
- }
37
- export function WatchAddress200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
38
- if (value == null) {
39
- return value;
40
- }
41
- return {
42
- 'success': value['success'],
43
- 'error': ErrorDetailToJSON(value['error']),
44
- 'data': value['data'],
45
- };
46
- }
@@ -1,48 +0,0 @@
1
- /**
2
- * PMXT Sidecar API
3
- * A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
4
- *
5
- * The version of the OpenAPI document: 0.4.4
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { ErrorDetail } from './ErrorDetail.js';
13
- import type { OrderBook } from './OrderBook.js';
14
- /**
15
- *
16
- * @export
17
- * @interface WatchOrderBooks200Response
18
- */
19
- export interface WatchOrderBooks200Response {
20
- /**
21
- *
22
- * @type {boolean}
23
- * @memberof WatchOrderBooks200Response
24
- */
25
- success?: boolean;
26
- /**
27
- *
28
- * @type {ErrorDetail}
29
- * @memberof WatchOrderBooks200Response
30
- */
31
- error?: ErrorDetail;
32
- /**
33
- *
34
- * @type {{ [key: string]: OrderBook; }}
35
- * @memberof WatchOrderBooks200Response
36
- */
37
- data?: {
38
- [key: string]: OrderBook;
39
- };
40
- }
41
- /**
42
- * Check if a given object implements the WatchOrderBooks200Response interface.
43
- */
44
- export declare function instanceOfWatchOrderBooks200Response(value: object): value is WatchOrderBooks200Response;
45
- export declare function WatchOrderBooks200ResponseFromJSON(json: any): WatchOrderBooks200Response;
46
- export declare function WatchOrderBooks200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchOrderBooks200Response;
47
- export declare function WatchOrderBooks200ResponseToJSON(json: any): WatchOrderBooks200Response;
48
- export declare function WatchOrderBooks200ResponseToJSONTyped(value?: WatchOrderBooks200Response | null, ignoreDiscriminator?: boolean): any;
@@ -1,48 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * PMXT Sidecar API
5
- * A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
6
- *
7
- * The version of the OpenAPI document: 0.4.4
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import { mapValues } from '../runtime.js';
15
- import { ErrorDetailFromJSON, ErrorDetailToJSON, } from './ErrorDetail.js';
16
- import { OrderBookFromJSON, OrderBookToJSON, } from './OrderBook.js';
17
- /**
18
- * Check if a given object implements the WatchOrderBooks200Response interface.
19
- */
20
- export function instanceOfWatchOrderBooks200Response(value) {
21
- return true;
22
- }
23
- export function WatchOrderBooks200ResponseFromJSON(json) {
24
- return WatchOrderBooks200ResponseFromJSONTyped(json, false);
25
- }
26
- export function WatchOrderBooks200ResponseFromJSONTyped(json, ignoreDiscriminator) {
27
- if (json == null) {
28
- return json;
29
- }
30
- return {
31
- 'success': json['success'] == null ? undefined : json['success'],
32
- 'error': json['error'] == null ? undefined : ErrorDetailFromJSON(json['error']),
33
- 'data': json['data'] == null ? undefined : (mapValues(json['data'], OrderBookFromJSON)),
34
- };
35
- }
36
- export function WatchOrderBooks200ResponseToJSON(json) {
37
- return WatchOrderBooks200ResponseToJSONTyped(json, false);
38
- }
39
- export function WatchOrderBooks200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
40
- if (value == null) {
41
- return value;
42
- }
43
- return {
44
- 'success': value['success'],
45
- 'error': ErrorDetailToJSON(value['error']),
46
- 'data': value['data'] == null ? undefined : (mapValues(value['data'], OrderBookToJSON)),
47
- };
48
- }