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.
- package/dist/esm/generated/src/apis/DefaultApi.d.ts +1 -187
- package/dist/esm/generated/src/apis/DefaultApi.js +1 -271
- package/dist/esm/generated/src/models/index.d.ts +0 -2
- package/dist/esm/generated/src/models/index.js +0 -2
- package/dist/esm/pmxt/client.js +10 -3
- package/dist/generated/src/apis/DefaultApi.d.ts +1 -187
- package/dist/generated/src/apis/DefaultApi.js +1 -271
- package/dist/generated/src/models/index.d.ts +0 -2
- package/dist/generated/src/models/index.js +0 -2
- package/dist/pmxt/client.js +10 -3
- package/generated/.openapi-generator/FILES +0 -4
- package/generated/docs/DefaultApi.md +0 -408
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +0 -372
- package/generated/src/models/index.ts +0 -2
- package/package.json +3 -3
- package/pmxt/client.ts +5 -3
- package/dist/esm/generated/src/models/WatchAddress200Response.d.ts +0 -45
- package/dist/esm/generated/src/models/WatchAddress200Response.js +0 -46
- package/dist/esm/generated/src/models/WatchOrderBooks200Response.d.ts +0 -48
- package/dist/esm/generated/src/models/WatchOrderBooks200Response.js +0 -48
- package/dist/generated/src/models/WatchAddress200Response.d.ts +0 -45
- package/dist/generated/src/models/WatchAddress200Response.js +0 -53
- package/dist/generated/src/models/WatchOrderBooks200Response.d.ts +0 -48
- package/dist/generated/src/models/WatchOrderBooks200Response.js +0 -55
- package/generated/docs/WatchAddress200Response.md +0 -38
- package/generated/docs/WatchOrderBooks200Response.md +0 -38
- package/generated/src/models/WatchAddress200Response.ts +0 -89
- package/generated/src/models/WatchOrderBooks200Response.ts +0 -96
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
|
-
import type { BaseResponse, BuildOrder200Response, BuildOrderRequest, CancelOrderRequest, CloseRequest, CompareMarketPrices200Response, CompareMarketPricesRequest, CreateOrder200Response, CreateOrderRequest, EventFilterCriteria, FetchArbitrage200Response, FetchBalance200Response, FetchEvent200Response, FetchEventMatches200Response, FetchEvents200Response, FetchEventsPaginated200Response, FetchMarket200Response, FetchMarketMatches200Response, FetchMarkets200Response, FetchMarketsPaginated200Response, FetchMatchedMarkets200Response, FetchMyTrades200Response, FetchOHLCV200Response, FetchOpenOrders200Response, FetchOrderBook200Response, FetchPositions200Response, FetchTrades200Response, FilterEventsRequest, FilterMarketsRequest, GetExecutionPrice200Response, GetExecutionPriceDetailed200Response, GetExecutionPriceDetailedRequest, GetExecutionPriceRequest, HealthCheck200Response, LoadMarkets200Response, LoadMarketsRequest, MarketFilterCriteria, SubmitOrderRequest, TestDummyMethod200Response, TestDummyMethodRequest, UnifiedEvent, UnifiedMarket
|
|
13
|
+
import type { BaseResponse, BuildOrder200Response, BuildOrderRequest, CancelOrderRequest, CloseRequest, CompareMarketPrices200Response, CompareMarketPricesRequest, CreateOrder200Response, CreateOrderRequest, EventFilterCriteria, FetchArbitrage200Response, FetchBalance200Response, FetchEvent200Response, FetchEventMatches200Response, FetchEvents200Response, FetchEventsPaginated200Response, FetchMarket200Response, FetchMarketMatches200Response, FetchMarkets200Response, FetchMarketsPaginated200Response, FetchMatchedMarkets200Response, FetchMyTrades200Response, FetchOHLCV200Response, FetchOpenOrders200Response, FetchOrderBook200Response, FetchPositions200Response, FetchTrades200Response, FilterEventsRequest, FilterMarketsRequest, GetExecutionPrice200Response, GetExecutionPriceDetailed200Response, GetExecutionPriceDetailedRequest, GetExecutionPriceRequest, HealthCheck200Response, LoadMarkets200Response, LoadMarketsRequest, MarketFilterCriteria, SubmitOrderRequest, TestDummyMethod200Response, TestDummyMethodRequest, UnifiedEvent, UnifiedMarket } from '../models/index.js';
|
|
14
14
|
export interface BuildOrderOperationRequest {
|
|
15
15
|
exchange: BuildOrderOperationExchangeEnum;
|
|
16
16
|
buildOrderRequest?: BuildOrderRequest;
|
|
@@ -268,24 +268,6 @@ export interface TestDummyMethodOperationRequest {
|
|
|
268
268
|
exchange: TestDummyMethodOperationExchangeEnum;
|
|
269
269
|
testDummyMethodRequest?: TestDummyMethodRequest;
|
|
270
270
|
}
|
|
271
|
-
export interface UnwatchAddressRequest {
|
|
272
|
-
exchange: UnwatchAddressExchangeEnum;
|
|
273
|
-
}
|
|
274
|
-
export interface UnwatchOrderBookRequest {
|
|
275
|
-
exchange: UnwatchOrderBookExchangeEnum;
|
|
276
|
-
}
|
|
277
|
-
export interface WatchAddressRequest {
|
|
278
|
-
exchange: WatchAddressExchangeEnum;
|
|
279
|
-
}
|
|
280
|
-
export interface WatchOrderBookRequest {
|
|
281
|
-
exchange: WatchOrderBookExchangeEnum;
|
|
282
|
-
}
|
|
283
|
-
export interface WatchOrderBooksRequest {
|
|
284
|
-
exchange: WatchOrderBooksExchangeEnum;
|
|
285
|
-
}
|
|
286
|
-
export interface WatchTradesRequest {
|
|
287
|
-
exchange: WatchTradesExchangeEnum;
|
|
288
|
-
}
|
|
289
271
|
/**
|
|
290
272
|
*
|
|
291
273
|
*/
|
|
@@ -640,66 +622,6 @@ export declare class DefaultApi extends runtime.BaseAPI {
|
|
|
640
622
|
* Test Dummy Method
|
|
641
623
|
*/
|
|
642
624
|
testDummyMethod(requestParameters: TestDummyMethodOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TestDummyMethod200Response>;
|
|
643
|
-
/**
|
|
644
|
-
* 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\" } ```
|
|
645
|
-
* Unwatch Address
|
|
646
|
-
*/
|
|
647
|
-
unwatchAddressRaw(requestParameters: UnwatchAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseResponse>>;
|
|
648
|
-
/**
|
|
649
|
-
* 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\" } ```
|
|
650
|
-
* Unwatch Address
|
|
651
|
-
*/
|
|
652
|
-
unwatchAddress(requestParameters: UnwatchAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseResponse>;
|
|
653
|
-
/**
|
|
654
|
-
* 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\" } ```
|
|
655
|
-
* Unwatch Order Book
|
|
656
|
-
*/
|
|
657
|
-
unwatchOrderBookRaw(requestParameters: UnwatchOrderBookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseResponse>>;
|
|
658
|
-
/**
|
|
659
|
-
* 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\" } ```
|
|
660
|
-
* Unwatch Order Book
|
|
661
|
-
*/
|
|
662
|
-
unwatchOrderBook(requestParameters: UnwatchOrderBookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseResponse>;
|
|
663
|
-
/**
|
|
664
|
-
* 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\" } ```
|
|
665
|
-
* Watch Address
|
|
666
|
-
*/
|
|
667
|
-
watchAddressRaw(requestParameters: WatchAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WatchAddress200Response>>;
|
|
668
|
-
/**
|
|
669
|
-
* 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\" } ```
|
|
670
|
-
* Watch Address
|
|
671
|
-
*/
|
|
672
|
-
watchAddress(requestParameters: WatchAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WatchAddress200Response>;
|
|
673
|
-
/**
|
|
674
|
-
* 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\" } ```
|
|
675
|
-
* Watch Order Book
|
|
676
|
-
*/
|
|
677
|
-
watchOrderBookRaw(requestParameters: WatchOrderBookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchOrderBook200Response>>;
|
|
678
|
-
/**
|
|
679
|
-
* 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\" } ```
|
|
680
|
-
* Watch Order Book
|
|
681
|
-
*/
|
|
682
|
-
watchOrderBook(requestParameters: WatchOrderBookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchOrderBook200Response>;
|
|
683
|
-
/**
|
|
684
|
-
* 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\" } ```
|
|
685
|
-
* Watch Order Books
|
|
686
|
-
*/
|
|
687
|
-
watchOrderBooksRaw(requestParameters: WatchOrderBooksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WatchOrderBooks200Response>>;
|
|
688
|
-
/**
|
|
689
|
-
* 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\" } ```
|
|
690
|
-
* Watch Order Books
|
|
691
|
-
*/
|
|
692
|
-
watchOrderBooks(requestParameters: WatchOrderBooksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WatchOrderBooks200Response>;
|
|
693
|
-
/**
|
|
694
|
-
* 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\" } ```
|
|
695
|
-
* Watch Trades
|
|
696
|
-
*/
|
|
697
|
-
watchTradesRaw(requestParameters: WatchTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchTrades200Response>>;
|
|
698
|
-
/**
|
|
699
|
-
* 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\" } ```
|
|
700
|
-
* Watch Trades
|
|
701
|
-
*/
|
|
702
|
-
watchTrades(requestParameters: WatchTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchTrades200Response>;
|
|
703
625
|
}
|
|
704
626
|
/**
|
|
705
627
|
* @export
|
|
@@ -1459,111 +1381,3 @@ export declare const TestDummyMethodOperationExchangeEnum: {
|
|
|
1459
1381
|
readonly Router: "router";
|
|
1460
1382
|
};
|
|
1461
1383
|
export type TestDummyMethodOperationExchangeEnum = typeof TestDummyMethodOperationExchangeEnum[keyof typeof TestDummyMethodOperationExchangeEnum];
|
|
1462
|
-
/**
|
|
1463
|
-
* @export
|
|
1464
|
-
*/
|
|
1465
|
-
export declare const UnwatchAddressExchangeEnum: {
|
|
1466
|
-
readonly Polymarket: "polymarket";
|
|
1467
|
-
readonly Kalshi: "kalshi";
|
|
1468
|
-
readonly KalshiDemo: "kalshi-demo";
|
|
1469
|
-
readonly Limitless: "limitless";
|
|
1470
|
-
readonly Probable: "probable";
|
|
1471
|
-
readonly Baozi: "baozi";
|
|
1472
|
-
readonly Myriad: "myriad";
|
|
1473
|
-
readonly Opinion: "opinion";
|
|
1474
|
-
readonly Metaculus: "metaculus";
|
|
1475
|
-
readonly Smarkets: "smarkets";
|
|
1476
|
-
readonly PolymarketUs: "polymarket_us";
|
|
1477
|
-
readonly Router: "router";
|
|
1478
|
-
};
|
|
1479
|
-
export type UnwatchAddressExchangeEnum = typeof UnwatchAddressExchangeEnum[keyof typeof UnwatchAddressExchangeEnum];
|
|
1480
|
-
/**
|
|
1481
|
-
* @export
|
|
1482
|
-
*/
|
|
1483
|
-
export declare const UnwatchOrderBookExchangeEnum: {
|
|
1484
|
-
readonly Polymarket: "polymarket";
|
|
1485
|
-
readonly Kalshi: "kalshi";
|
|
1486
|
-
readonly KalshiDemo: "kalshi-demo";
|
|
1487
|
-
readonly Limitless: "limitless";
|
|
1488
|
-
readonly Probable: "probable";
|
|
1489
|
-
readonly Baozi: "baozi";
|
|
1490
|
-
readonly Myriad: "myriad";
|
|
1491
|
-
readonly Opinion: "opinion";
|
|
1492
|
-
readonly Metaculus: "metaculus";
|
|
1493
|
-
readonly Smarkets: "smarkets";
|
|
1494
|
-
readonly PolymarketUs: "polymarket_us";
|
|
1495
|
-
readonly Router: "router";
|
|
1496
|
-
};
|
|
1497
|
-
export type UnwatchOrderBookExchangeEnum = typeof UnwatchOrderBookExchangeEnum[keyof typeof UnwatchOrderBookExchangeEnum];
|
|
1498
|
-
/**
|
|
1499
|
-
* @export
|
|
1500
|
-
*/
|
|
1501
|
-
export declare const WatchAddressExchangeEnum: {
|
|
1502
|
-
readonly Polymarket: "polymarket";
|
|
1503
|
-
readonly Kalshi: "kalshi";
|
|
1504
|
-
readonly KalshiDemo: "kalshi-demo";
|
|
1505
|
-
readonly Limitless: "limitless";
|
|
1506
|
-
readonly Probable: "probable";
|
|
1507
|
-
readonly Baozi: "baozi";
|
|
1508
|
-
readonly Myriad: "myriad";
|
|
1509
|
-
readonly Opinion: "opinion";
|
|
1510
|
-
readonly Metaculus: "metaculus";
|
|
1511
|
-
readonly Smarkets: "smarkets";
|
|
1512
|
-
readonly PolymarketUs: "polymarket_us";
|
|
1513
|
-
readonly Router: "router";
|
|
1514
|
-
};
|
|
1515
|
-
export type WatchAddressExchangeEnum = typeof WatchAddressExchangeEnum[keyof typeof WatchAddressExchangeEnum];
|
|
1516
|
-
/**
|
|
1517
|
-
* @export
|
|
1518
|
-
*/
|
|
1519
|
-
export declare const WatchOrderBookExchangeEnum: {
|
|
1520
|
-
readonly Polymarket: "polymarket";
|
|
1521
|
-
readonly Kalshi: "kalshi";
|
|
1522
|
-
readonly KalshiDemo: "kalshi-demo";
|
|
1523
|
-
readonly Limitless: "limitless";
|
|
1524
|
-
readonly Probable: "probable";
|
|
1525
|
-
readonly Baozi: "baozi";
|
|
1526
|
-
readonly Myriad: "myriad";
|
|
1527
|
-
readonly Opinion: "opinion";
|
|
1528
|
-
readonly Metaculus: "metaculus";
|
|
1529
|
-
readonly Smarkets: "smarkets";
|
|
1530
|
-
readonly PolymarketUs: "polymarket_us";
|
|
1531
|
-
readonly Router: "router";
|
|
1532
|
-
};
|
|
1533
|
-
export type WatchOrderBookExchangeEnum = typeof WatchOrderBookExchangeEnum[keyof typeof WatchOrderBookExchangeEnum];
|
|
1534
|
-
/**
|
|
1535
|
-
* @export
|
|
1536
|
-
*/
|
|
1537
|
-
export declare const WatchOrderBooksExchangeEnum: {
|
|
1538
|
-
readonly Polymarket: "polymarket";
|
|
1539
|
-
readonly Kalshi: "kalshi";
|
|
1540
|
-
readonly KalshiDemo: "kalshi-demo";
|
|
1541
|
-
readonly Limitless: "limitless";
|
|
1542
|
-
readonly Probable: "probable";
|
|
1543
|
-
readonly Baozi: "baozi";
|
|
1544
|
-
readonly Myriad: "myriad";
|
|
1545
|
-
readonly Opinion: "opinion";
|
|
1546
|
-
readonly Metaculus: "metaculus";
|
|
1547
|
-
readonly Smarkets: "smarkets";
|
|
1548
|
-
readonly PolymarketUs: "polymarket_us";
|
|
1549
|
-
readonly Router: "router";
|
|
1550
|
-
};
|
|
1551
|
-
export type WatchOrderBooksExchangeEnum = typeof WatchOrderBooksExchangeEnum[keyof typeof WatchOrderBooksExchangeEnum];
|
|
1552
|
-
/**
|
|
1553
|
-
* @export
|
|
1554
|
-
*/
|
|
1555
|
-
export declare const WatchTradesExchangeEnum: {
|
|
1556
|
-
readonly Polymarket: "polymarket";
|
|
1557
|
-
readonly Kalshi: "kalshi";
|
|
1558
|
-
readonly KalshiDemo: "kalshi-demo";
|
|
1559
|
-
readonly Limitless: "limitless";
|
|
1560
|
-
readonly Probable: "probable";
|
|
1561
|
-
readonly Baozi: "baozi";
|
|
1562
|
-
readonly Myriad: "myriad";
|
|
1563
|
-
readonly Opinion: "opinion";
|
|
1564
|
-
readonly Metaculus: "metaculus";
|
|
1565
|
-
readonly Smarkets: "smarkets";
|
|
1566
|
-
readonly PolymarketUs: "polymarket_us";
|
|
1567
|
-
readonly Router: "router";
|
|
1568
|
-
};
|
|
1569
|
-
export type WatchTradesExchangeEnum = typeof WatchTradesExchangeEnum[keyof typeof WatchTradesExchangeEnum];
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import * as runtime from '../runtime.js';
|
|
15
|
-
import { BaseResponseFromJSON, BuildOrder200ResponseFromJSON, BuildOrderRequestToJSON, CancelOrderRequestToJSON, CloseRequestToJSON, CompareMarketPrices200ResponseFromJSON, CompareMarketPricesRequestToJSON, CreateOrder200ResponseFromJSON, CreateOrderRequestToJSON, FetchArbitrage200ResponseFromJSON, FetchBalance200ResponseFromJSON, FetchEvent200ResponseFromJSON, FetchEventMatches200ResponseFromJSON, FetchEvents200ResponseFromJSON, FetchEventsPaginated200ResponseFromJSON, FetchMarket200ResponseFromJSON, FetchMarketMatches200ResponseFromJSON, FetchMarkets200ResponseFromJSON, FetchMarketsPaginated200ResponseFromJSON, FetchMatchedMarkets200ResponseFromJSON, FetchMyTrades200ResponseFromJSON, FetchOHLCV200ResponseFromJSON, FetchOpenOrders200ResponseFromJSON, FetchOrderBook200ResponseFromJSON, FetchPositions200ResponseFromJSON, FetchTrades200ResponseFromJSON, FilterEventsRequestToJSON, FilterMarketsRequestToJSON, GetExecutionPrice200ResponseFromJSON, GetExecutionPriceDetailed200ResponseFromJSON, GetExecutionPriceDetailedRequestToJSON, GetExecutionPriceRequestToJSON, HealthCheck200ResponseFromJSON, LoadMarkets200ResponseFromJSON, LoadMarketsRequestToJSON, SubmitOrderRequestToJSON, TestDummyMethod200ResponseFromJSON, TestDummyMethodRequestToJSON,
|
|
15
|
+
import { BaseResponseFromJSON, BuildOrder200ResponseFromJSON, BuildOrderRequestToJSON, CancelOrderRequestToJSON, CloseRequestToJSON, CompareMarketPrices200ResponseFromJSON, CompareMarketPricesRequestToJSON, CreateOrder200ResponseFromJSON, CreateOrderRequestToJSON, FetchArbitrage200ResponseFromJSON, FetchBalance200ResponseFromJSON, FetchEvent200ResponseFromJSON, FetchEventMatches200ResponseFromJSON, FetchEvents200ResponseFromJSON, FetchEventsPaginated200ResponseFromJSON, FetchMarket200ResponseFromJSON, FetchMarketMatches200ResponseFromJSON, FetchMarkets200ResponseFromJSON, FetchMarketsPaginated200ResponseFromJSON, FetchMatchedMarkets200ResponseFromJSON, FetchMyTrades200ResponseFromJSON, FetchOHLCV200ResponseFromJSON, FetchOpenOrders200ResponseFromJSON, FetchOrderBook200ResponseFromJSON, FetchPositions200ResponseFromJSON, FetchTrades200ResponseFromJSON, FilterEventsRequestToJSON, FilterMarketsRequestToJSON, GetExecutionPrice200ResponseFromJSON, GetExecutionPriceDetailed200ResponseFromJSON, GetExecutionPriceDetailedRequestToJSON, GetExecutionPriceRequestToJSON, HealthCheck200ResponseFromJSON, LoadMarkets200ResponseFromJSON, LoadMarketsRequestToJSON, SubmitOrderRequestToJSON, TestDummyMethod200ResponseFromJSON, TestDummyMethodRequestToJSON, } from '../models/index.js';
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
@@ -1467,174 +1467,6 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1467
1467
|
const response = await this.testDummyMethodRaw(requestParameters, initOverrides);
|
|
1468
1468
|
return await response.value();
|
|
1469
1469
|
}
|
|
1470
|
-
/**
|
|
1471
|
-
* 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\" } ```
|
|
1472
|
-
* Unwatch Address
|
|
1473
|
-
*/
|
|
1474
|
-
async unwatchAddressRaw(requestParameters, initOverrides) {
|
|
1475
|
-
if (requestParameters['exchange'] == null) {
|
|
1476
|
-
throw new runtime.RequiredError('exchange', 'Required parameter "exchange" was null or undefined when calling unwatchAddress().');
|
|
1477
|
-
}
|
|
1478
|
-
const queryParameters = {};
|
|
1479
|
-
const headerParameters = {};
|
|
1480
|
-
let urlPath = `/api/{exchange}/unwatchAddress`;
|
|
1481
|
-
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
1482
|
-
const response = await this.request({
|
|
1483
|
-
path: urlPath,
|
|
1484
|
-
method: 'POST',
|
|
1485
|
-
headers: headerParameters,
|
|
1486
|
-
query: queryParameters,
|
|
1487
|
-
}, initOverrides);
|
|
1488
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => BaseResponseFromJSON(jsonValue));
|
|
1489
|
-
}
|
|
1490
|
-
/**
|
|
1491
|
-
* 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\" } ```
|
|
1492
|
-
* Unwatch Address
|
|
1493
|
-
*/
|
|
1494
|
-
async unwatchAddress(requestParameters, initOverrides) {
|
|
1495
|
-
const response = await this.unwatchAddressRaw(requestParameters, initOverrides);
|
|
1496
|
-
return await response.value();
|
|
1497
|
-
}
|
|
1498
|
-
/**
|
|
1499
|
-
* 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\" } ```
|
|
1500
|
-
* Unwatch Order Book
|
|
1501
|
-
*/
|
|
1502
|
-
async unwatchOrderBookRaw(requestParameters, initOverrides) {
|
|
1503
|
-
if (requestParameters['exchange'] == null) {
|
|
1504
|
-
throw new runtime.RequiredError('exchange', 'Required parameter "exchange" was null or undefined when calling unwatchOrderBook().');
|
|
1505
|
-
}
|
|
1506
|
-
const queryParameters = {};
|
|
1507
|
-
const headerParameters = {};
|
|
1508
|
-
let urlPath = `/api/{exchange}/unwatchOrderBook`;
|
|
1509
|
-
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
1510
|
-
const response = await this.request({
|
|
1511
|
-
path: urlPath,
|
|
1512
|
-
method: 'POST',
|
|
1513
|
-
headers: headerParameters,
|
|
1514
|
-
query: queryParameters,
|
|
1515
|
-
}, initOverrides);
|
|
1516
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => BaseResponseFromJSON(jsonValue));
|
|
1517
|
-
}
|
|
1518
|
-
/**
|
|
1519
|
-
* 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\" } ```
|
|
1520
|
-
* Unwatch Order Book
|
|
1521
|
-
*/
|
|
1522
|
-
async unwatchOrderBook(requestParameters, initOverrides) {
|
|
1523
|
-
const response = await this.unwatchOrderBookRaw(requestParameters, initOverrides);
|
|
1524
|
-
return await response.value();
|
|
1525
|
-
}
|
|
1526
|
-
/**
|
|
1527
|
-
* 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\" } ```
|
|
1528
|
-
* Watch Address
|
|
1529
|
-
*/
|
|
1530
|
-
async watchAddressRaw(requestParameters, initOverrides) {
|
|
1531
|
-
if (requestParameters['exchange'] == null) {
|
|
1532
|
-
throw new runtime.RequiredError('exchange', 'Required parameter "exchange" was null or undefined when calling watchAddress().');
|
|
1533
|
-
}
|
|
1534
|
-
const queryParameters = {};
|
|
1535
|
-
const headerParameters = {};
|
|
1536
|
-
let urlPath = `/api/{exchange}/watchAddress`;
|
|
1537
|
-
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
1538
|
-
const response = await this.request({
|
|
1539
|
-
path: urlPath,
|
|
1540
|
-
method: 'POST',
|
|
1541
|
-
headers: headerParameters,
|
|
1542
|
-
query: queryParameters,
|
|
1543
|
-
}, initOverrides);
|
|
1544
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => WatchAddress200ResponseFromJSON(jsonValue));
|
|
1545
|
-
}
|
|
1546
|
-
/**
|
|
1547
|
-
* 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\" } ```
|
|
1548
|
-
* Watch Address
|
|
1549
|
-
*/
|
|
1550
|
-
async watchAddress(requestParameters, initOverrides) {
|
|
1551
|
-
const response = await this.watchAddressRaw(requestParameters, initOverrides);
|
|
1552
|
-
return await response.value();
|
|
1553
|
-
}
|
|
1554
|
-
/**
|
|
1555
|
-
* 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\" } ```
|
|
1556
|
-
* Watch Order Book
|
|
1557
|
-
*/
|
|
1558
|
-
async watchOrderBookRaw(requestParameters, initOverrides) {
|
|
1559
|
-
if (requestParameters['exchange'] == null) {
|
|
1560
|
-
throw new runtime.RequiredError('exchange', 'Required parameter "exchange" was null or undefined when calling watchOrderBook().');
|
|
1561
|
-
}
|
|
1562
|
-
const queryParameters = {};
|
|
1563
|
-
const headerParameters = {};
|
|
1564
|
-
let urlPath = `/api/{exchange}/watchOrderBook`;
|
|
1565
|
-
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
1566
|
-
const response = await this.request({
|
|
1567
|
-
path: urlPath,
|
|
1568
|
-
method: 'POST',
|
|
1569
|
-
headers: headerParameters,
|
|
1570
|
-
query: queryParameters,
|
|
1571
|
-
}, initOverrides);
|
|
1572
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => FetchOrderBook200ResponseFromJSON(jsonValue));
|
|
1573
|
-
}
|
|
1574
|
-
/**
|
|
1575
|
-
* 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\" } ```
|
|
1576
|
-
* Watch Order Book
|
|
1577
|
-
*/
|
|
1578
|
-
async watchOrderBook(requestParameters, initOverrides) {
|
|
1579
|
-
const response = await this.watchOrderBookRaw(requestParameters, initOverrides);
|
|
1580
|
-
return await response.value();
|
|
1581
|
-
}
|
|
1582
|
-
/**
|
|
1583
|
-
* 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\" } ```
|
|
1584
|
-
* Watch Order Books
|
|
1585
|
-
*/
|
|
1586
|
-
async watchOrderBooksRaw(requestParameters, initOverrides) {
|
|
1587
|
-
if (requestParameters['exchange'] == null) {
|
|
1588
|
-
throw new runtime.RequiredError('exchange', 'Required parameter "exchange" was null or undefined when calling watchOrderBooks().');
|
|
1589
|
-
}
|
|
1590
|
-
const queryParameters = {};
|
|
1591
|
-
const headerParameters = {};
|
|
1592
|
-
let urlPath = `/api/{exchange}/watchOrderBooks`;
|
|
1593
|
-
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
1594
|
-
const response = await this.request({
|
|
1595
|
-
path: urlPath,
|
|
1596
|
-
method: 'POST',
|
|
1597
|
-
headers: headerParameters,
|
|
1598
|
-
query: queryParameters,
|
|
1599
|
-
}, initOverrides);
|
|
1600
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => WatchOrderBooks200ResponseFromJSON(jsonValue));
|
|
1601
|
-
}
|
|
1602
|
-
/**
|
|
1603
|
-
* 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\" } ```
|
|
1604
|
-
* Watch Order Books
|
|
1605
|
-
*/
|
|
1606
|
-
async watchOrderBooks(requestParameters, initOverrides) {
|
|
1607
|
-
const response = await this.watchOrderBooksRaw(requestParameters, initOverrides);
|
|
1608
|
-
return await response.value();
|
|
1609
|
-
}
|
|
1610
|
-
/**
|
|
1611
|
-
* 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\" } ```
|
|
1612
|
-
* Watch Trades
|
|
1613
|
-
*/
|
|
1614
|
-
async watchTradesRaw(requestParameters, initOverrides) {
|
|
1615
|
-
if (requestParameters['exchange'] == null) {
|
|
1616
|
-
throw new runtime.RequiredError('exchange', 'Required parameter "exchange" was null or undefined when calling watchTrades().');
|
|
1617
|
-
}
|
|
1618
|
-
const queryParameters = {};
|
|
1619
|
-
const headerParameters = {};
|
|
1620
|
-
let urlPath = `/api/{exchange}/watchTrades`;
|
|
1621
|
-
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
1622
|
-
const response = await this.request({
|
|
1623
|
-
path: urlPath,
|
|
1624
|
-
method: 'POST',
|
|
1625
|
-
headers: headerParameters,
|
|
1626
|
-
query: queryParameters,
|
|
1627
|
-
}, initOverrides);
|
|
1628
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => FetchTrades200ResponseFromJSON(jsonValue));
|
|
1629
|
-
}
|
|
1630
|
-
/**
|
|
1631
|
-
* 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\" } ```
|
|
1632
|
-
* Watch Trades
|
|
1633
|
-
*/
|
|
1634
|
-
async watchTrades(requestParameters, initOverrides) {
|
|
1635
|
-
const response = await this.watchTradesRaw(requestParameters, initOverrides);
|
|
1636
|
-
return await response.value();
|
|
1637
|
-
}
|
|
1638
1470
|
}
|
|
1639
1471
|
/**
|
|
1640
1472
|
* @export
|
|
@@ -2337,105 +2169,3 @@ export const TestDummyMethodOperationExchangeEnum = {
|
|
|
2337
2169
|
PolymarketUs: 'polymarket_us',
|
|
2338
2170
|
Router: 'router'
|
|
2339
2171
|
};
|
|
2340
|
-
/**
|
|
2341
|
-
* @export
|
|
2342
|
-
*/
|
|
2343
|
-
export const UnwatchAddressExchangeEnum = {
|
|
2344
|
-
Polymarket: 'polymarket',
|
|
2345
|
-
Kalshi: 'kalshi',
|
|
2346
|
-
KalshiDemo: 'kalshi-demo',
|
|
2347
|
-
Limitless: 'limitless',
|
|
2348
|
-
Probable: 'probable',
|
|
2349
|
-
Baozi: 'baozi',
|
|
2350
|
-
Myriad: 'myriad',
|
|
2351
|
-
Opinion: 'opinion',
|
|
2352
|
-
Metaculus: 'metaculus',
|
|
2353
|
-
Smarkets: 'smarkets',
|
|
2354
|
-
PolymarketUs: 'polymarket_us',
|
|
2355
|
-
Router: 'router'
|
|
2356
|
-
};
|
|
2357
|
-
/**
|
|
2358
|
-
* @export
|
|
2359
|
-
*/
|
|
2360
|
-
export const UnwatchOrderBookExchangeEnum = {
|
|
2361
|
-
Polymarket: 'polymarket',
|
|
2362
|
-
Kalshi: 'kalshi',
|
|
2363
|
-
KalshiDemo: 'kalshi-demo',
|
|
2364
|
-
Limitless: 'limitless',
|
|
2365
|
-
Probable: 'probable',
|
|
2366
|
-
Baozi: 'baozi',
|
|
2367
|
-
Myriad: 'myriad',
|
|
2368
|
-
Opinion: 'opinion',
|
|
2369
|
-
Metaculus: 'metaculus',
|
|
2370
|
-
Smarkets: 'smarkets',
|
|
2371
|
-
PolymarketUs: 'polymarket_us',
|
|
2372
|
-
Router: 'router'
|
|
2373
|
-
};
|
|
2374
|
-
/**
|
|
2375
|
-
* @export
|
|
2376
|
-
*/
|
|
2377
|
-
export const WatchAddressExchangeEnum = {
|
|
2378
|
-
Polymarket: 'polymarket',
|
|
2379
|
-
Kalshi: 'kalshi',
|
|
2380
|
-
KalshiDemo: 'kalshi-demo',
|
|
2381
|
-
Limitless: 'limitless',
|
|
2382
|
-
Probable: 'probable',
|
|
2383
|
-
Baozi: 'baozi',
|
|
2384
|
-
Myriad: 'myriad',
|
|
2385
|
-
Opinion: 'opinion',
|
|
2386
|
-
Metaculus: 'metaculus',
|
|
2387
|
-
Smarkets: 'smarkets',
|
|
2388
|
-
PolymarketUs: 'polymarket_us',
|
|
2389
|
-
Router: 'router'
|
|
2390
|
-
};
|
|
2391
|
-
/**
|
|
2392
|
-
* @export
|
|
2393
|
-
*/
|
|
2394
|
-
export const WatchOrderBookExchangeEnum = {
|
|
2395
|
-
Polymarket: 'polymarket',
|
|
2396
|
-
Kalshi: 'kalshi',
|
|
2397
|
-
KalshiDemo: 'kalshi-demo',
|
|
2398
|
-
Limitless: 'limitless',
|
|
2399
|
-
Probable: 'probable',
|
|
2400
|
-
Baozi: 'baozi',
|
|
2401
|
-
Myriad: 'myriad',
|
|
2402
|
-
Opinion: 'opinion',
|
|
2403
|
-
Metaculus: 'metaculus',
|
|
2404
|
-
Smarkets: 'smarkets',
|
|
2405
|
-
PolymarketUs: 'polymarket_us',
|
|
2406
|
-
Router: 'router'
|
|
2407
|
-
};
|
|
2408
|
-
/**
|
|
2409
|
-
* @export
|
|
2410
|
-
*/
|
|
2411
|
-
export const WatchOrderBooksExchangeEnum = {
|
|
2412
|
-
Polymarket: 'polymarket',
|
|
2413
|
-
Kalshi: 'kalshi',
|
|
2414
|
-
KalshiDemo: 'kalshi-demo',
|
|
2415
|
-
Limitless: 'limitless',
|
|
2416
|
-
Probable: 'probable',
|
|
2417
|
-
Baozi: 'baozi',
|
|
2418
|
-
Myriad: 'myriad',
|
|
2419
|
-
Opinion: 'opinion',
|
|
2420
|
-
Metaculus: 'metaculus',
|
|
2421
|
-
Smarkets: 'smarkets',
|
|
2422
|
-
PolymarketUs: 'polymarket_us',
|
|
2423
|
-
Router: 'router'
|
|
2424
|
-
};
|
|
2425
|
-
/**
|
|
2426
|
-
* @export
|
|
2427
|
-
*/
|
|
2428
|
-
export const WatchTradesExchangeEnum = {
|
|
2429
|
-
Polymarket: 'polymarket',
|
|
2430
|
-
Kalshi: 'kalshi',
|
|
2431
|
-
KalshiDemo: 'kalshi-demo',
|
|
2432
|
-
Limitless: 'limitless',
|
|
2433
|
-
Probable: 'probable',
|
|
2434
|
-
Baozi: 'baozi',
|
|
2435
|
-
Myriad: 'myriad',
|
|
2436
|
-
Opinion: 'opinion',
|
|
2437
|
-
Metaculus: 'metaculus',
|
|
2438
|
-
Smarkets: 'smarkets',
|
|
2439
|
-
PolymarketUs: 'polymarket_us',
|
|
2440
|
-
Router: 'router'
|
|
2441
|
-
};
|
package/dist/esm/pmxt/client.js
CHANGED
|
@@ -1762,9 +1762,16 @@ export class Exchange {
|
|
|
1762
1762
|
venueOpts.signatureType = this._hostedAccount.signatureType || 3;
|
|
1763
1763
|
}
|
|
1764
1764
|
const venue = new VenueClass(venueOpts);
|
|
1765
|
-
const
|
|
1766
|
-
|
|
1767
|
-
|
|
1765
|
+
const orderParams = { outcomeId: leg.tokenId, side: leg.side, amount: leg.shares };
|
|
1766
|
+
if (leg.orderType === 'market') {
|
|
1767
|
+
orderParams.type = 'market';
|
|
1768
|
+
orderParams.price = leg.price;
|
|
1769
|
+
}
|
|
1770
|
+
else {
|
|
1771
|
+
orderParams.price = leg.price;
|
|
1772
|
+
}
|
|
1773
|
+
const order = await venue.createOrder(orderParams);
|
|
1774
|
+
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 });
|
|
1768
1775
|
}
|
|
1769
1776
|
catch (err) {
|
|
1770
1777
|
fills.push({ venue: leg.venue, venueMarketId: leg.venueMarketId, venueOutcomeId: leg.venueOutcomeId, shares: leg.shares, price: leg.price, status: 'failed', error: err.message });
|