pmxtjs 2.40.6 → 2.41.1
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 +24 -24
- package/dist/esm/generated/src/apis/DefaultApi.js +24 -24
- package/dist/esm/generated/src/models/UnwatchAddressRequest.d.ts +1 -1
- package/dist/esm/generated/src/models/UnwatchAddressRequest.js +1 -3
- package/dist/esm/generated/src/models/UnwatchOrderBookRequest.d.ts +1 -1
- package/dist/esm/generated/src/models/UnwatchOrderBookRequest.js +1 -3
- package/dist/esm/generated/src/models/WatchAddressRequest.d.ts +2 -3
- package/dist/esm/generated/src/models/WatchAddressRequest.js +2 -5
- package/dist/esm/generated/src/models/WatchOrderBookRequest.d.ts +2 -3
- package/dist/esm/generated/src/models/WatchOrderBookRequest.js +2 -5
- package/dist/esm/generated/src/models/WatchOrderBooksRequest.d.ts +2 -3
- package/dist/esm/generated/src/models/WatchOrderBooksRequest.js +2 -5
- package/dist/esm/generated/src/models/WatchTradesRequest.d.ts +2 -3
- package/dist/esm/generated/src/models/WatchTradesRequest.js +2 -5
- package/dist/esm/generated/src/models/index.d.ts +0 -3
- package/dist/esm/generated/src/models/index.js +0 -3
- package/dist/esm/pmxt/client.d.ts +27 -6
- package/dist/esm/pmxt/client.js +132 -14
- package/dist/esm/pmxt/models.d.ts +11 -0
- package/dist/esm/pmxt/ws-client.d.ts +2 -1
- package/dist/esm/pmxt/ws-client.js +25 -14
- package/dist/generated/src/apis/DefaultApi.d.ts +24 -24
- package/dist/generated/src/apis/DefaultApi.js +24 -24
- package/dist/generated/src/models/UnwatchAddressRequest.d.ts +1 -1
- package/dist/generated/src/models/UnwatchAddressRequest.js +1 -3
- package/dist/generated/src/models/UnwatchOrderBookRequest.d.ts +1 -1
- package/dist/generated/src/models/UnwatchOrderBookRequest.js +1 -3
- package/dist/generated/src/models/WatchAddressRequest.d.ts +2 -3
- package/dist/generated/src/models/WatchAddressRequest.js +2 -5
- package/dist/generated/src/models/WatchOrderBookRequest.d.ts +2 -3
- package/dist/generated/src/models/WatchOrderBookRequest.js +2 -5
- package/dist/generated/src/models/WatchOrderBooksRequest.d.ts +2 -3
- package/dist/generated/src/models/WatchOrderBooksRequest.js +2 -5
- package/dist/generated/src/models/WatchTradesRequest.d.ts +2 -3
- package/dist/generated/src/models/WatchTradesRequest.js +2 -5
- package/dist/generated/src/models/index.d.ts +0 -3
- package/dist/generated/src/models/index.js +0 -3
- package/dist/pmxt/client.d.ts +27 -6
- package/dist/pmxt/client.js +132 -14
- package/dist/pmxt/models.d.ts +11 -0
- package/dist/pmxt/ws-client.d.ts +2 -1
- package/dist/pmxt/ws-client.js +25 -14
- package/generated/.openapi-generator/FILES +0 -6
- package/generated/docs/DefaultApi.md +24 -24
- package/generated/docs/WatchAddressRequest.md +1 -1
- package/generated/docs/WatchOrderBookRequest.md +1 -1
- package/generated/docs/WatchOrderBooksRequest.md +1 -1
- package/generated/docs/WatchTradesRequest.md +1 -1
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +24 -24
- package/generated/src/models/UnwatchAddressRequest.ts +2 -3
- package/generated/src/models/UnwatchOrderBookRequest.ts +2 -3
- package/generated/src/models/WatchAddressRequest.ts +4 -12
- package/generated/src/models/WatchOrderBookRequest.ts +4 -12
- package/generated/src/models/WatchOrderBooksRequest.ts +4 -12
- package/generated/src/models/WatchTradesRequest.ts +4 -12
- package/generated/src/models/index.ts +0 -3
- package/package.json +3 -2
- package/pmxt/client.ts +137 -16
- package/pmxt/models.ts +14 -0
- package/pmxt/ws-client.ts +26 -13
- package/dist/esm/generated/src/models/WatchAddressRequestArgsInner.d.ts +0 -21
- package/dist/esm/generated/src/models/WatchAddressRequestArgsInner.js +0 -37
- package/dist/esm/generated/src/models/WatchOrderBookRequestArgsInner.d.ts +0 -21
- package/dist/esm/generated/src/models/WatchOrderBookRequestArgsInner.js +0 -43
- package/dist/esm/generated/src/models/WatchOrderBooksRequestArgsInner.d.ts +0 -21
- package/dist/esm/generated/src/models/WatchOrderBooksRequestArgsInner.js +0 -47
- package/dist/generated/src/models/WatchAddressRequestArgsInner.d.ts +0 -21
- package/dist/generated/src/models/WatchAddressRequestArgsInner.js +0 -43
- package/dist/generated/src/models/WatchOrderBookRequestArgsInner.d.ts +0 -21
- package/dist/generated/src/models/WatchOrderBookRequestArgsInner.js +0 -49
- package/dist/generated/src/models/WatchOrderBooksRequestArgsInner.d.ts +0 -21
- package/dist/generated/src/models/WatchOrderBooksRequestArgsInner.js +0 -53
- package/generated/docs/WatchAddressRequestArgsInner.md +0 -32
- package/generated/docs/WatchOrderBookRequestArgsInner.md +0 -32
- package/generated/docs/WatchOrderBooksRequestArgsInner.md +0 -32
- package/generated/src/models/WatchAddressRequestArgsInner.ts +0 -49
- package/generated/src/models/WatchOrderBookRequestArgsInner.ts +0 -55
- package/generated/src/models/WatchOrderBooksRequestArgsInner.ts +0 -59
|
@@ -647,63 +647,63 @@ export declare class DefaultApi extends runtime.BaseAPI {
|
|
|
647
647
|
*/
|
|
648
648
|
testDummyMethod(requestParameters: TestDummyMethodOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TestDummyMethod200Response>;
|
|
649
649
|
/**
|
|
650
|
-
* Stop watching a previously registered wallet address and release its resource updates.
|
|
651
|
-
* Unwatch Address
|
|
650
|
+
* 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\" } ```
|
|
651
|
+
* Unwatch Address (WebSocket)
|
|
652
652
|
*/
|
|
653
653
|
unwatchAddressRaw(requestParameters: UnwatchAddressOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseResponse>>;
|
|
654
654
|
/**
|
|
655
|
-
* Stop watching a previously registered wallet address and release its resource updates.
|
|
656
|
-
* Unwatch Address
|
|
655
|
+
* 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\" } ```
|
|
656
|
+
* Unwatch Address (WebSocket)
|
|
657
657
|
*/
|
|
658
658
|
unwatchAddress(requestParameters: UnwatchAddressOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseResponse>;
|
|
659
659
|
/**
|
|
660
|
-
* Unsubscribe from a previously watched order book stream.
|
|
661
|
-
* Unwatch Order Book
|
|
660
|
+
* 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\" } ```
|
|
661
|
+
* Unwatch Order Book (WebSocket)
|
|
662
662
|
*/
|
|
663
663
|
unwatchOrderBookRaw(requestParameters: UnwatchOrderBookOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseResponse>>;
|
|
664
664
|
/**
|
|
665
|
-
* Unsubscribe from a previously watched order book stream.
|
|
666
|
-
* Unwatch Order Book
|
|
665
|
+
* 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\" } ```
|
|
666
|
+
* Unwatch Order Book (WebSocket)
|
|
667
667
|
*/
|
|
668
668
|
unwatchOrderBook(requestParameters: UnwatchOrderBookOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseResponse>;
|
|
669
669
|
/**
|
|
670
|
-
* 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).
|
|
671
|
-
* Watch Address
|
|
670
|
+
* 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\" } ```
|
|
671
|
+
* Watch Address (WebSocket)
|
|
672
672
|
*/
|
|
673
673
|
watchAddressRaw(requestParameters: WatchAddressOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WatchAddress200Response>>;
|
|
674
674
|
/**
|
|
675
|
-
* 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).
|
|
676
|
-
* Watch Address
|
|
675
|
+
* 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\" } ```
|
|
676
|
+
* Watch Address (WebSocket)
|
|
677
677
|
*/
|
|
678
678
|
watchAddress(requestParameters: WatchAddressOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WatchAddress200Response>;
|
|
679
679
|
/**
|
|
680
|
-
* 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).
|
|
681
|
-
* Watch Order Book
|
|
680
|
+
* 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\" } ```
|
|
681
|
+
* Watch Order Book (WebSocket)
|
|
682
682
|
*/
|
|
683
683
|
watchOrderBookRaw(requestParameters: WatchOrderBookOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchOrderBook200Response>>;
|
|
684
684
|
/**
|
|
685
|
-
* 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).
|
|
686
|
-
* Watch Order Book
|
|
685
|
+
* 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\" } ```
|
|
686
|
+
* Watch Order Book (WebSocket)
|
|
687
687
|
*/
|
|
688
688
|
watchOrderBook(requestParameters: WatchOrderBookOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchOrderBook200Response>;
|
|
689
689
|
/**
|
|
690
|
-
* 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.
|
|
691
|
-
* Watch Order Books
|
|
690
|
+
* 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\" } ```
|
|
691
|
+
* Watch Order Books (WebSocket)
|
|
692
692
|
*/
|
|
693
693
|
watchOrderBooksRaw(requestParameters: WatchOrderBooksOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WatchOrderBooks200Response>>;
|
|
694
694
|
/**
|
|
695
|
-
* 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.
|
|
696
|
-
* Watch Order Books
|
|
695
|
+
* 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\" } ```
|
|
696
|
+
* Watch Order Books (WebSocket)
|
|
697
697
|
*/
|
|
698
698
|
watchOrderBooks(requestParameters: WatchOrderBooksOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WatchOrderBooks200Response>;
|
|
699
699
|
/**
|
|
700
|
-
* 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).
|
|
701
|
-
* Watch Trades
|
|
700
|
+
* 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\" } ```
|
|
701
|
+
* Watch Trades (WebSocket)
|
|
702
702
|
*/
|
|
703
703
|
watchTradesRaw(requestParameters: WatchTradesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchTrades200Response>>;
|
|
704
704
|
/**
|
|
705
|
-
* 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).
|
|
706
|
-
* Watch Trades
|
|
705
|
+
* 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\" } ```
|
|
706
|
+
* Watch Trades (WebSocket)
|
|
707
707
|
*/
|
|
708
708
|
watchTrades(requestParameters: WatchTradesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchTrades200Response>;
|
|
709
709
|
}
|
|
@@ -1468,8 +1468,8 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1468
1468
|
return await response.value();
|
|
1469
1469
|
}
|
|
1470
1470
|
/**
|
|
1471
|
-
* Stop watching a previously registered wallet address and release its resource updates.
|
|
1472
|
-
* Unwatch Address
|
|
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 (WebSocket)
|
|
1473
1473
|
*/
|
|
1474
1474
|
async unwatchAddressRaw(requestParameters, initOverrides) {
|
|
1475
1475
|
if (requestParameters['exchange'] == null) {
|
|
@@ -1490,16 +1490,16 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1490
1490
|
return new runtime.JSONApiResponse(response, (jsonValue) => BaseResponseFromJSON(jsonValue));
|
|
1491
1491
|
}
|
|
1492
1492
|
/**
|
|
1493
|
-
* Stop watching a previously registered wallet address and release its resource updates.
|
|
1494
|
-
* Unwatch Address
|
|
1493
|
+
* 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\" } ```
|
|
1494
|
+
* Unwatch Address (WebSocket)
|
|
1495
1495
|
*/
|
|
1496
1496
|
async unwatchAddress(requestParameters, initOverrides) {
|
|
1497
1497
|
const response = await this.unwatchAddressRaw(requestParameters, initOverrides);
|
|
1498
1498
|
return await response.value();
|
|
1499
1499
|
}
|
|
1500
1500
|
/**
|
|
1501
|
-
* Unsubscribe from a previously watched order book stream.
|
|
1502
|
-
* Unwatch Order Book
|
|
1501
|
+
* 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\" } ```
|
|
1502
|
+
* Unwatch Order Book (WebSocket)
|
|
1503
1503
|
*/
|
|
1504
1504
|
async unwatchOrderBookRaw(requestParameters, initOverrides) {
|
|
1505
1505
|
if (requestParameters['exchange'] == null) {
|
|
@@ -1520,16 +1520,16 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1520
1520
|
return new runtime.JSONApiResponse(response, (jsonValue) => BaseResponseFromJSON(jsonValue));
|
|
1521
1521
|
}
|
|
1522
1522
|
/**
|
|
1523
|
-
* Unsubscribe from a previously watched order book stream.
|
|
1524
|
-
* Unwatch Order Book
|
|
1523
|
+
* 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\" } ```
|
|
1524
|
+
* Unwatch Order Book (WebSocket)
|
|
1525
1525
|
*/
|
|
1526
1526
|
async unwatchOrderBook(requestParameters, initOverrides) {
|
|
1527
1527
|
const response = await this.unwatchOrderBookRaw(requestParameters, initOverrides);
|
|
1528
1528
|
return await response.value();
|
|
1529
1529
|
}
|
|
1530
1530
|
/**
|
|
1531
|
-
* 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).
|
|
1532
|
-
* Watch Address
|
|
1531
|
+
* 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\" } ```
|
|
1532
|
+
* Watch Address (WebSocket)
|
|
1533
1533
|
*/
|
|
1534
1534
|
async watchAddressRaw(requestParameters, initOverrides) {
|
|
1535
1535
|
if (requestParameters['exchange'] == null) {
|
|
@@ -1550,16 +1550,16 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1550
1550
|
return new runtime.JSONApiResponse(response, (jsonValue) => WatchAddress200ResponseFromJSON(jsonValue));
|
|
1551
1551
|
}
|
|
1552
1552
|
/**
|
|
1553
|
-
* 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).
|
|
1554
|
-
* Watch Address
|
|
1553
|
+
* 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\" } ```
|
|
1554
|
+
* Watch Address (WebSocket)
|
|
1555
1555
|
*/
|
|
1556
1556
|
async watchAddress(requestParameters, initOverrides) {
|
|
1557
1557
|
const response = await this.watchAddressRaw(requestParameters, initOverrides);
|
|
1558
1558
|
return await response.value();
|
|
1559
1559
|
}
|
|
1560
1560
|
/**
|
|
1561
|
-
* 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).
|
|
1562
|
-
* Watch Order Book
|
|
1561
|
+
* 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\" } ```
|
|
1562
|
+
* Watch Order Book (WebSocket)
|
|
1563
1563
|
*/
|
|
1564
1564
|
async watchOrderBookRaw(requestParameters, initOverrides) {
|
|
1565
1565
|
if (requestParameters['exchange'] == null) {
|
|
@@ -1580,16 +1580,16 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1580
1580
|
return new runtime.JSONApiResponse(response, (jsonValue) => FetchOrderBook200ResponseFromJSON(jsonValue));
|
|
1581
1581
|
}
|
|
1582
1582
|
/**
|
|
1583
|
-
* 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).
|
|
1584
|
-
* Watch Order Book
|
|
1583
|
+
* 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\" } ```
|
|
1584
|
+
* Watch Order Book (WebSocket)
|
|
1585
1585
|
*/
|
|
1586
1586
|
async watchOrderBook(requestParameters, initOverrides) {
|
|
1587
1587
|
const response = await this.watchOrderBookRaw(requestParameters, initOverrides);
|
|
1588
1588
|
return await response.value();
|
|
1589
1589
|
}
|
|
1590
1590
|
/**
|
|
1591
|
-
* 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.
|
|
1592
|
-
* Watch Order Books
|
|
1591
|
+
* 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\" } ```
|
|
1592
|
+
* Watch Order Books (WebSocket)
|
|
1593
1593
|
*/
|
|
1594
1594
|
async watchOrderBooksRaw(requestParameters, initOverrides) {
|
|
1595
1595
|
if (requestParameters['exchange'] == null) {
|
|
@@ -1610,16 +1610,16 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1610
1610
|
return new runtime.JSONApiResponse(response, (jsonValue) => WatchOrderBooks200ResponseFromJSON(jsonValue));
|
|
1611
1611
|
}
|
|
1612
1612
|
/**
|
|
1613
|
-
* 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.
|
|
1614
|
-
* Watch Order Books
|
|
1613
|
+
* 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\" } ```
|
|
1614
|
+
* Watch Order Books (WebSocket)
|
|
1615
1615
|
*/
|
|
1616
1616
|
async watchOrderBooks(requestParameters, initOverrides) {
|
|
1617
1617
|
const response = await this.watchOrderBooksRaw(requestParameters, initOverrides);
|
|
1618
1618
|
return await response.value();
|
|
1619
1619
|
}
|
|
1620
1620
|
/**
|
|
1621
|
-
* 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).
|
|
1622
|
-
* Watch Trades
|
|
1621
|
+
* 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\" } ```
|
|
1622
|
+
* Watch Trades (WebSocket)
|
|
1623
1623
|
*/
|
|
1624
1624
|
async watchTradesRaw(requestParameters, initOverrides) {
|
|
1625
1625
|
if (requestParameters['exchange'] == null) {
|
|
@@ -1640,8 +1640,8 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1640
1640
|
return new runtime.JSONApiResponse(response, (jsonValue) => FetchTrades200ResponseFromJSON(jsonValue));
|
|
1641
1641
|
}
|
|
1642
1642
|
/**
|
|
1643
|
-
* 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).
|
|
1644
|
-
* Watch Trades
|
|
1643
|
+
* 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\" } ```
|
|
1644
|
+
* Watch Trades (WebSocket)
|
|
1645
1645
|
*/
|
|
1646
1646
|
async watchTrades(requestParameters, initOverrides) {
|
|
1647
1647
|
const response = await this.watchTradesRaw(requestParameters, initOverrides);
|
|
@@ -16,8 +16,6 @@ import { ExchangeCredentialsFromJSON, ExchangeCredentialsToJSON, } from './Excha
|
|
|
16
16
|
* Check if a given object implements the UnwatchAddressRequest interface.
|
|
17
17
|
*/
|
|
18
18
|
export function instanceOfUnwatchAddressRequest(value) {
|
|
19
|
-
if (!('args' in value) || value['args'] === undefined)
|
|
20
|
-
return false;
|
|
21
19
|
return true;
|
|
22
20
|
}
|
|
23
21
|
export function UnwatchAddressRequestFromJSON(json) {
|
|
@@ -28,7 +26,7 @@ export function UnwatchAddressRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
28
26
|
return json;
|
|
29
27
|
}
|
|
30
28
|
return {
|
|
31
|
-
'args': json['args'],
|
|
29
|
+
'args': json['args'] == null ? undefined : json['args'],
|
|
32
30
|
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
33
31
|
};
|
|
34
32
|
}
|
|
@@ -16,8 +16,6 @@ import { ExchangeCredentialsFromJSON, ExchangeCredentialsToJSON, } from './Excha
|
|
|
16
16
|
* Check if a given object implements the UnwatchOrderBookRequest interface.
|
|
17
17
|
*/
|
|
18
18
|
export function instanceOfUnwatchOrderBookRequest(value) {
|
|
19
|
-
if (!('args' in value) || value['args'] === undefined)
|
|
20
|
-
return false;
|
|
21
19
|
return true;
|
|
22
20
|
}
|
|
23
21
|
export function UnwatchOrderBookRequestFromJSON(json) {
|
|
@@ -28,7 +26,7 @@ export function UnwatchOrderBookRequestFromJSONTyped(json, ignoreDiscriminator)
|
|
|
28
26
|
return json;
|
|
29
27
|
}
|
|
30
28
|
return {
|
|
31
|
-
'args': json['args'],
|
|
29
|
+
'args': json['args'] == null ? undefined : json['args'],
|
|
32
30
|
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
33
31
|
};
|
|
34
32
|
}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type { WatchAddressRequestArgsInner } from './WatchAddressRequestArgsInner.js';
|
|
13
12
|
import type { ExchangeCredentials } from './ExchangeCredentials.js';
|
|
14
13
|
/**
|
|
15
14
|
*
|
|
@@ -19,10 +18,10 @@ import type { ExchangeCredentials } from './ExchangeCredentials.js';
|
|
|
19
18
|
export interface WatchAddressRequest {
|
|
20
19
|
/**
|
|
21
20
|
*
|
|
22
|
-
* @type {Array<
|
|
21
|
+
* @type {Array<string>}
|
|
23
22
|
* @memberof WatchAddressRequest
|
|
24
23
|
*/
|
|
25
|
-
args
|
|
24
|
+
args?: Array<string>;
|
|
26
25
|
/**
|
|
27
26
|
*
|
|
28
27
|
* @type {ExchangeCredentials}
|
|
@@ -11,14 +11,11 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import { WatchAddressRequestArgsInnerFromJSON, WatchAddressRequestArgsInnerToJSON, } from './WatchAddressRequestArgsInner.js';
|
|
15
14
|
import { ExchangeCredentialsFromJSON, ExchangeCredentialsToJSON, } from './ExchangeCredentials.js';
|
|
16
15
|
/**
|
|
17
16
|
* Check if a given object implements the WatchAddressRequest interface.
|
|
18
17
|
*/
|
|
19
18
|
export function instanceOfWatchAddressRequest(value) {
|
|
20
|
-
if (!('args' in value) || value['args'] === undefined)
|
|
21
|
-
return false;
|
|
22
19
|
return true;
|
|
23
20
|
}
|
|
24
21
|
export function WatchAddressRequestFromJSON(json) {
|
|
@@ -29,7 +26,7 @@ export function WatchAddressRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
26
|
return json;
|
|
30
27
|
}
|
|
31
28
|
return {
|
|
32
|
-
'args':
|
|
29
|
+
'args': json['args'] == null ? undefined : json['args'],
|
|
33
30
|
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
34
31
|
};
|
|
35
32
|
}
|
|
@@ -41,7 +38,7 @@ export function WatchAddressRequestToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
41
38
|
return value;
|
|
42
39
|
}
|
|
43
40
|
return {
|
|
44
|
-
'args':
|
|
41
|
+
'args': value['args'],
|
|
45
42
|
'credentials': ExchangeCredentialsToJSON(value['credentials']),
|
|
46
43
|
};
|
|
47
44
|
}
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ExchangeCredentials } from './ExchangeCredentials.js';
|
|
13
|
-
import type { WatchOrderBookRequestArgsInner } from './WatchOrderBookRequestArgsInner.js';
|
|
14
13
|
/**
|
|
15
14
|
*
|
|
16
15
|
* @export
|
|
@@ -19,10 +18,10 @@ import type { WatchOrderBookRequestArgsInner } from './WatchOrderBookRequestArgs
|
|
|
19
18
|
export interface WatchOrderBookRequest {
|
|
20
19
|
/**
|
|
21
20
|
*
|
|
22
|
-
* @type {Array<
|
|
21
|
+
* @type {Array<string>}
|
|
23
22
|
* @memberof WatchOrderBookRequest
|
|
24
23
|
*/
|
|
25
|
-
args
|
|
24
|
+
args?: Array<string>;
|
|
26
25
|
/**
|
|
27
26
|
*
|
|
28
27
|
* @type {ExchangeCredentials}
|
|
@@ -12,13 +12,10 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { ExchangeCredentialsFromJSON, ExchangeCredentialsToJSON, } from './ExchangeCredentials.js';
|
|
15
|
-
import { WatchOrderBookRequestArgsInnerFromJSON, WatchOrderBookRequestArgsInnerToJSON, } from './WatchOrderBookRequestArgsInner.js';
|
|
16
15
|
/**
|
|
17
16
|
* Check if a given object implements the WatchOrderBookRequest interface.
|
|
18
17
|
*/
|
|
19
18
|
export function instanceOfWatchOrderBookRequest(value) {
|
|
20
|
-
if (!('args' in value) || value['args'] === undefined)
|
|
21
|
-
return false;
|
|
22
19
|
return true;
|
|
23
20
|
}
|
|
24
21
|
export function WatchOrderBookRequestFromJSON(json) {
|
|
@@ -29,7 +26,7 @@ export function WatchOrderBookRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
26
|
return json;
|
|
30
27
|
}
|
|
31
28
|
return {
|
|
32
|
-
'args':
|
|
29
|
+
'args': json['args'] == null ? undefined : json['args'],
|
|
33
30
|
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
34
31
|
};
|
|
35
32
|
}
|
|
@@ -41,7 +38,7 @@ export function WatchOrderBookRequestToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
41
38
|
return value;
|
|
42
39
|
}
|
|
43
40
|
return {
|
|
44
|
-
'args':
|
|
41
|
+
'args': value['args'],
|
|
45
42
|
'credentials': ExchangeCredentialsToJSON(value['credentials']),
|
|
46
43
|
};
|
|
47
44
|
}
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ExchangeCredentials } from './ExchangeCredentials.js';
|
|
13
|
-
import type { WatchOrderBooksRequestArgsInner } from './WatchOrderBooksRequestArgsInner.js';
|
|
14
13
|
/**
|
|
15
14
|
*
|
|
16
15
|
* @export
|
|
@@ -19,10 +18,10 @@ import type { WatchOrderBooksRequestArgsInner } from './WatchOrderBooksRequestAr
|
|
|
19
18
|
export interface WatchOrderBooksRequest {
|
|
20
19
|
/**
|
|
21
20
|
*
|
|
22
|
-
* @type {Array<
|
|
21
|
+
* @type {Array<string>}
|
|
23
22
|
* @memberof WatchOrderBooksRequest
|
|
24
23
|
*/
|
|
25
|
-
args
|
|
24
|
+
args?: Array<string>;
|
|
26
25
|
/**
|
|
27
26
|
*
|
|
28
27
|
* @type {ExchangeCredentials}
|
|
@@ -12,13 +12,10 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { ExchangeCredentialsFromJSON, ExchangeCredentialsToJSON, } from './ExchangeCredentials.js';
|
|
15
|
-
import { WatchOrderBooksRequestArgsInnerFromJSON, WatchOrderBooksRequestArgsInnerToJSON, } from './WatchOrderBooksRequestArgsInner.js';
|
|
16
15
|
/**
|
|
17
16
|
* Check if a given object implements the WatchOrderBooksRequest interface.
|
|
18
17
|
*/
|
|
19
18
|
export function instanceOfWatchOrderBooksRequest(value) {
|
|
20
|
-
if (!('args' in value) || value['args'] === undefined)
|
|
21
|
-
return false;
|
|
22
19
|
return true;
|
|
23
20
|
}
|
|
24
21
|
export function WatchOrderBooksRequestFromJSON(json) {
|
|
@@ -29,7 +26,7 @@ export function WatchOrderBooksRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
26
|
return json;
|
|
30
27
|
}
|
|
31
28
|
return {
|
|
32
|
-
'args':
|
|
29
|
+
'args': json['args'] == null ? undefined : json['args'],
|
|
33
30
|
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
34
31
|
};
|
|
35
32
|
}
|
|
@@ -41,7 +38,7 @@ export function WatchOrderBooksRequestToJSONTyped(value, ignoreDiscriminator = f
|
|
|
41
38
|
return value;
|
|
42
39
|
}
|
|
43
40
|
return {
|
|
44
|
-
'args':
|
|
41
|
+
'args': value['args'],
|
|
45
42
|
'credentials': ExchangeCredentialsToJSON(value['credentials']),
|
|
46
43
|
};
|
|
47
44
|
}
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ExchangeCredentials } from './ExchangeCredentials.js';
|
|
13
|
-
import type { WatchOrderBookRequestArgsInner } from './WatchOrderBookRequestArgsInner.js';
|
|
14
13
|
/**
|
|
15
14
|
*
|
|
16
15
|
* @export
|
|
@@ -19,10 +18,10 @@ import type { WatchOrderBookRequestArgsInner } from './WatchOrderBookRequestArgs
|
|
|
19
18
|
export interface WatchTradesRequest {
|
|
20
19
|
/**
|
|
21
20
|
*
|
|
22
|
-
* @type {Array<
|
|
21
|
+
* @type {Array<string>}
|
|
23
22
|
* @memberof WatchTradesRequest
|
|
24
23
|
*/
|
|
25
|
-
args
|
|
24
|
+
args?: Array<string>;
|
|
26
25
|
/**
|
|
27
26
|
*
|
|
28
27
|
* @type {ExchangeCredentials}
|
|
@@ -12,13 +12,10 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { ExchangeCredentialsFromJSON, ExchangeCredentialsToJSON, } from './ExchangeCredentials.js';
|
|
15
|
-
import { WatchOrderBookRequestArgsInnerFromJSON, WatchOrderBookRequestArgsInnerToJSON, } from './WatchOrderBookRequestArgsInner.js';
|
|
16
15
|
/**
|
|
17
16
|
* Check if a given object implements the WatchTradesRequest interface.
|
|
18
17
|
*/
|
|
19
18
|
export function instanceOfWatchTradesRequest(value) {
|
|
20
|
-
if (!('args' in value) || value['args'] === undefined)
|
|
21
|
-
return false;
|
|
22
19
|
return true;
|
|
23
20
|
}
|
|
24
21
|
export function WatchTradesRequestFromJSON(json) {
|
|
@@ -29,7 +26,7 @@ export function WatchTradesRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
26
|
return json;
|
|
30
27
|
}
|
|
31
28
|
return {
|
|
32
|
-
'args':
|
|
29
|
+
'args': json['args'] == null ? undefined : json['args'],
|
|
33
30
|
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
34
31
|
};
|
|
35
32
|
}
|
|
@@ -41,7 +38,7 @@ export function WatchTradesRequestToJSONTyped(value, ignoreDiscriminator = false
|
|
|
41
38
|
return value;
|
|
42
39
|
}
|
|
43
40
|
return {
|
|
44
|
-
'args':
|
|
41
|
+
'args': value['args'],
|
|
45
42
|
'credentials': ExchangeCredentialsToJSON(value['credentials']),
|
|
46
43
|
};
|
|
47
44
|
}
|
|
@@ -90,10 +90,7 @@ export * from './UnwatchOrderBookRequest.js';
|
|
|
90
90
|
export * from './UserTrade.js';
|
|
91
91
|
export * from './WatchAddress200Response.js';
|
|
92
92
|
export * from './WatchAddressRequest.js';
|
|
93
|
-
export * from './WatchAddressRequestArgsInner.js';
|
|
94
93
|
export * from './WatchOrderBookRequest.js';
|
|
95
|
-
export * from './WatchOrderBookRequestArgsInner.js';
|
|
96
94
|
export * from './WatchOrderBooks200Response.js';
|
|
97
95
|
export * from './WatchOrderBooksRequest.js';
|
|
98
|
-
export * from './WatchOrderBooksRequestArgsInner.js';
|
|
99
96
|
export * from './WatchTradesRequest.js';
|
|
@@ -92,10 +92,7 @@ export * from './UnwatchOrderBookRequest.js';
|
|
|
92
92
|
export * from './UserTrade.js';
|
|
93
93
|
export * from './WatchAddress200Response.js';
|
|
94
94
|
export * from './WatchAddressRequest.js';
|
|
95
|
-
export * from './WatchAddressRequestArgsInner.js';
|
|
96
95
|
export * from './WatchOrderBookRequest.js';
|
|
97
|
-
export * from './WatchOrderBookRequestArgsInner.js';
|
|
98
96
|
export * from './WatchOrderBooks200Response.js';
|
|
99
97
|
export * from './WatchOrderBooksRequest.js';
|
|
100
|
-
export * from './WatchOrderBooksRequestArgsInner.js';
|
|
101
98
|
export * from './WatchTradesRequest.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* OpenAPI client, matching the Python API exactly.
|
|
6
6
|
*/
|
|
7
7
|
import { Configuration, DefaultApi, ExchangeCredentials } from "../generated/src/index.js";
|
|
8
|
-
import { Balance, BuiltOrder, CreateOrderParams, EventFetchParams, EventFilterCriteria, EventFilterFunction, ExecutionPriceResult, MarketFetchParams, MarketFilterCriteria, MarketFilterFunction, MarketOutcome, MyTradesParams, Order, OrderBook, OrderHistoryParams, PaginatedMarketsResult, Position, PriceCandle, SubscribedAddressSnapshot, SubscriptionOption, Trade, UnifiedEvent, UnifiedMarket, UserTrade } from "./models.js";
|
|
8
|
+
import { Balance, BuiltOrder, CreateOrderParams, EventFetchParams, EventFilterCriteria, EventFilterFunction, ExecutionPriceResult, MarketFetchParams, MarketFilterCriteria, MarketFilterFunction, MarketOutcome, MyTradesParams, Order, OrderBook, OrderHistoryParams, PaginatedMarketsResult, Position, PriceCandle, SubscribedAddressSnapshot, SubscriptionOption, Trade, UnifiedEvent, UnifiedMarket, UserTrade, FirehoseEvent } from "./models.js";
|
|
9
9
|
import { ServerManager } from "./server-manager.js";
|
|
10
10
|
/**
|
|
11
11
|
* Base exchange client options.
|
|
@@ -68,6 +68,8 @@ export declare abstract class Exchange {
|
|
|
68
68
|
protected serverManager: ServerManager;
|
|
69
69
|
protected initPromise: Promise<void>;
|
|
70
70
|
protected isHosted: boolean;
|
|
71
|
+
private _hostedAccount?;
|
|
72
|
+
private _accountDiscoveryPromise?;
|
|
71
73
|
/**
|
|
72
74
|
* Sticky flag: set to `true` the first time a GET read is rejected by
|
|
73
75
|
* the sidecar with 404/405 (i.e. an older pmxt-core that only supports
|
|
@@ -252,6 +254,28 @@ export declare abstract class Exchange {
|
|
|
252
254
|
* ```
|
|
253
255
|
*/
|
|
254
256
|
watchOrderBooks(outcomeIds: (string | MarketOutcome)[], limit?: number): Promise<Record<string, OrderBook>>;
|
|
257
|
+
/**
|
|
258
|
+
* Stream all orderbook updates across venues via the hosted WebSocket API.
|
|
259
|
+
*
|
|
260
|
+
* Returns a promise that resolves with the next book event.
|
|
261
|
+
* Call repeatedly in a loop to stream updates (CCXT Pro pattern).
|
|
262
|
+
* Requires hosted mode (`pmxtApiKey` set).
|
|
263
|
+
*
|
|
264
|
+
* @param venues - Optional venue filter (e.g. ["polymarket", "limitless"])
|
|
265
|
+
* @returns Next event with source, symbol, and orderbook
|
|
266
|
+
*
|
|
267
|
+
* @example
|
|
268
|
+
* ```typescript
|
|
269
|
+
* const poly = new Polymarket({ pmxtApiKey: "pmxt_xxx" });
|
|
270
|
+
* while (true) {
|
|
271
|
+
* const event = await poly.watchAllOrderBooks();
|
|
272
|
+
* console.log(event.source, event.symbol, event.orderbook.bids[0]);
|
|
273
|
+
* }
|
|
274
|
+
* ```
|
|
275
|
+
*/
|
|
276
|
+
watchAllOrderBooks(venues?: string[]): Promise<FirehoseEvent>;
|
|
277
|
+
/** @deprecated Use {@link watchAllOrderBooks} instead. */
|
|
278
|
+
firehose(venues?: string[]): Promise<FirehoseEvent>;
|
|
255
279
|
/**
|
|
256
280
|
* Watch real-time trade updates via WebSocket.
|
|
257
281
|
*
|
|
@@ -337,12 +361,9 @@ export declare abstract class Exchange {
|
|
|
337
361
|
buildOrder(params: CreateOrderParams & {
|
|
338
362
|
outcome?: MarketOutcome;
|
|
339
363
|
}): Promise<BuiltOrder>;
|
|
364
|
+
private _discoverHostedAccount;
|
|
365
|
+
private _executeSorOrder;
|
|
340
366
|
/**
|
|
341
|
-
* Create a new order.
|
|
342
|
-
*
|
|
343
|
-
* @param params - Order parameters
|
|
344
|
-
* @returns Created order
|
|
345
|
-
*
|
|
346
367
|
* @example
|
|
347
368
|
* ```typescript
|
|
348
369
|
* const order = await exchange.createOrder({
|