pmxtjs 2.41.0 → 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 +8 -7
- package/dist/esm/pmxt/client.js +79 -11
- 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 +8 -7
- package/dist/pmxt/client.js +79 -11
- 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 +2 -2
- package/pmxt/client.ts +78 -11
- 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
package/dist/esm/pmxt/client.js
CHANGED
|
@@ -131,6 +131,8 @@ export class Exchange {
|
|
|
131
131
|
serverManager;
|
|
132
132
|
initPromise;
|
|
133
133
|
isHosted;
|
|
134
|
+
_hostedAccount;
|
|
135
|
+
_accountDiscoveryPromise;
|
|
134
136
|
/**
|
|
135
137
|
* Sticky flag: set to `true` the first time a GET read is rejected by
|
|
136
138
|
* the sidecar with 404/405 (i.e. an older pmxt-core that only supports
|
|
@@ -1481,24 +1483,24 @@ export class Exchange {
|
|
|
1481
1483
|
* Requires hosted mode (`pmxtApiKey` set).
|
|
1482
1484
|
*
|
|
1483
1485
|
* @param venues - Optional venue filter (e.g. ["polymarket", "limitless"])
|
|
1484
|
-
* @returns Next
|
|
1486
|
+
* @returns Next event with source, symbol, and orderbook
|
|
1485
1487
|
*
|
|
1486
1488
|
* @example
|
|
1487
1489
|
* ```typescript
|
|
1488
1490
|
* const poly = new Polymarket({ pmxtApiKey: "pmxt_xxx" });
|
|
1489
1491
|
* while (true) {
|
|
1490
|
-
* const event = await poly.
|
|
1492
|
+
* const event = await poly.watchAllOrderBooks();
|
|
1491
1493
|
* console.log(event.source, event.symbol, event.orderbook.bids[0]);
|
|
1492
1494
|
* }
|
|
1493
1495
|
* ```
|
|
1494
1496
|
*/
|
|
1495
|
-
async
|
|
1497
|
+
async watchAllOrderBooks(venues) {
|
|
1496
1498
|
await this.initPromise;
|
|
1497
1499
|
if (!this.isHosted) {
|
|
1498
|
-
throw new PmxtError("
|
|
1500
|
+
throw new PmxtError("watchAllOrderBooks() requires hosted mode (set pmxtApiKey)");
|
|
1499
1501
|
}
|
|
1500
1502
|
const args = venues ? [venues] : [];
|
|
1501
|
-
const wsData = await this.watchViaWs("
|
|
1503
|
+
const wsData = await this.watchViaWs("watchAllOrderBooks", args);
|
|
1502
1504
|
if (wsData !== null) {
|
|
1503
1505
|
return {
|
|
1504
1506
|
source: wsData._source || "",
|
|
@@ -1506,7 +1508,11 @@ export class Exchange {
|
|
|
1506
1508
|
orderbook: convertOrderBook(wsData),
|
|
1507
1509
|
};
|
|
1508
1510
|
}
|
|
1509
|
-
throw new PmxtError("
|
|
1511
|
+
throw new PmxtError("watchAllOrderBooks() requires WebSocket transport — connection failed");
|
|
1512
|
+
}
|
|
1513
|
+
/** @deprecated Use {@link watchAllOrderBooks} instead. */
|
|
1514
|
+
async firehose(venues) {
|
|
1515
|
+
return this.watchAllOrderBooks(venues);
|
|
1510
1516
|
}
|
|
1511
1517
|
/**
|
|
1512
1518
|
* Watch real-time trade updates via WebSocket.
|
|
@@ -1710,12 +1716,71 @@ export class Exchange {
|
|
|
1710
1716
|
throw new PmxtError(`Failed to build order: ${error}`);
|
|
1711
1717
|
}
|
|
1712
1718
|
}
|
|
1719
|
+
async _discoverHostedAccount() {
|
|
1720
|
+
if (this._hostedAccount)
|
|
1721
|
+
return;
|
|
1722
|
+
if (!this._accountDiscoveryPromise) {
|
|
1723
|
+
this._accountDiscoveryPromise = (async () => {
|
|
1724
|
+
try {
|
|
1725
|
+
const res = await this.fetchWithRetry(`${this.resolveBaseUrl()}/v0/account`, { method: 'GET', headers: { ...this.getAuthHeaders() } });
|
|
1726
|
+
if (res.ok) {
|
|
1727
|
+
const body = await res.json();
|
|
1728
|
+
this._hostedAccount = { depositWallet: body.deposit_wallet, signatureType: body.signature_type };
|
|
1729
|
+
}
|
|
1730
|
+
else {
|
|
1731
|
+
this._hostedAccount = {};
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
catch {
|
|
1735
|
+
this._hostedAccount = {};
|
|
1736
|
+
}
|
|
1737
|
+
})();
|
|
1738
|
+
}
|
|
1739
|
+
await this._accountDiscoveryPromise;
|
|
1740
|
+
}
|
|
1741
|
+
async _executeSorOrder(params) {
|
|
1742
|
+
await this._discoverHostedAccount();
|
|
1743
|
+
const buildRes = await this.fetchWithRetry(`${this.resolveBaseUrl()}/api/sor/buildOrder`, {
|
|
1744
|
+
method: 'POST',
|
|
1745
|
+
headers: { 'Content-Type': 'application/json', ...this.getAuthHeaders() },
|
|
1746
|
+
body: JSON.stringify({ args: [params] }),
|
|
1747
|
+
});
|
|
1748
|
+
if (!buildRes.ok)
|
|
1749
|
+
throw new PmxtError(`buildOrder failed: ${await buildRes.text()}`);
|
|
1750
|
+
const buildJson = await buildRes.json();
|
|
1751
|
+
const { orderId, legs } = buildJson.data || buildJson;
|
|
1752
|
+
const fills = [];
|
|
1753
|
+
for (const leg of legs) {
|
|
1754
|
+
try {
|
|
1755
|
+
const { Polymarket, Limitless } = require('pmxt-core');
|
|
1756
|
+
const VenueClass = leg.venue === 'polymarket' ? Polymarket : leg.venue === 'limitless' ? Limitless : null;
|
|
1757
|
+
if (!VenueClass)
|
|
1758
|
+
throw new Error(`unsupported venue: ${leg.venue}`);
|
|
1759
|
+
const venueOpts = { privateKey: this.privateKey };
|
|
1760
|
+
if (leg.venue === 'polymarket' && this._hostedAccount?.depositWallet) {
|
|
1761
|
+
venueOpts.funderAddress = this._hostedAccount.depositWallet;
|
|
1762
|
+
venueOpts.signatureType = this._hostedAccount.signatureType || 3;
|
|
1763
|
+
}
|
|
1764
|
+
const venue = new VenueClass(venueOpts);
|
|
1765
|
+
const order = await venue.createOrder({ outcomeId: leg.tokenId, side: leg.side, amount: leg.shares, price: leg.price });
|
|
1766
|
+
const filledShares = order.filled || 0;
|
|
1767
|
+
fills.push({ venue: leg.venue, venueOrderId: order.id, venueMarketId: leg.venueMarketId, venueOutcomeId: leg.venueOutcomeId, shares: filledShares > 0 ? filledShares : leg.shares, price: order.price || leg.price, status: filledShares > 0 ? 'filled' : 'open' });
|
|
1768
|
+
}
|
|
1769
|
+
catch (err) {
|
|
1770
|
+
fills.push({ venue: leg.venue, venueMarketId: leg.venueMarketId, venueOutcomeId: leg.venueOutcomeId, shares: leg.shares, price: leg.price, status: 'failed', error: err.message });
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
const submitRes = await this.fetchWithRetry(`${this.resolveBaseUrl()}/api/sor/submitOrder`, {
|
|
1774
|
+
method: 'POST',
|
|
1775
|
+
headers: { 'Content-Type': 'application/json', ...this.getAuthHeaders() },
|
|
1776
|
+
body: JSON.stringify({ args: [{ orderId, fills }] }),
|
|
1777
|
+
});
|
|
1778
|
+
if (!submitRes.ok)
|
|
1779
|
+
throw new PmxtError(`submitOrder failed: ${await submitRes.text()}`);
|
|
1780
|
+
const submitJson = await submitRes.json();
|
|
1781
|
+
return convertOrder(submitJson.data || submitJson);
|
|
1782
|
+
}
|
|
1713
1783
|
/**
|
|
1714
|
-
* Create a new order.
|
|
1715
|
-
*
|
|
1716
|
-
* @param params - Order parameters
|
|
1717
|
-
* @returns Created order
|
|
1718
|
-
*
|
|
1719
1784
|
* @example
|
|
1720
1785
|
* ```typescript
|
|
1721
1786
|
* const order = await exchange.createOrder({
|
|
@@ -1730,6 +1795,9 @@ export class Exchange {
|
|
|
1730
1795
|
*/
|
|
1731
1796
|
async createOrder(params) {
|
|
1732
1797
|
if (this.isHosted) {
|
|
1798
|
+
if (this.exchangeName === 'sor' && this.privateKey) {
|
|
1799
|
+
return this._executeSorOrder(params);
|
|
1800
|
+
}
|
|
1733
1801
|
throw new PmxtError("Trade execution is not available through the hosted API. " +
|
|
1734
1802
|
"Use the local PMXT SDK with your venue credentials instead. " +
|
|
1735
1803
|
"See https://pmxt.dev/docs/quickstart for setup instructions.");
|
|
@@ -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
|
}
|
|
@@ -1505,8 +1505,8 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
1505
1505
|
return await response.value();
|
|
1506
1506
|
}
|
|
1507
1507
|
/**
|
|
1508
|
-
* Stop watching a previously registered wallet address and release its resource updates.
|
|
1509
|
-
* Unwatch Address
|
|
1508
|
+
* 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\" } ```
|
|
1509
|
+
* Unwatch Address (WebSocket)
|
|
1510
1510
|
*/
|
|
1511
1511
|
async unwatchAddressRaw(requestParameters, initOverrides) {
|
|
1512
1512
|
if (requestParameters['exchange'] == null) {
|
|
@@ -1527,16 +1527,16 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
1527
1527
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BaseResponseFromJSON)(jsonValue));
|
|
1528
1528
|
}
|
|
1529
1529
|
/**
|
|
1530
|
-
* Stop watching a previously registered wallet address and release its resource updates.
|
|
1531
|
-
* Unwatch Address
|
|
1530
|
+
* 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\" } ```
|
|
1531
|
+
* Unwatch Address (WebSocket)
|
|
1532
1532
|
*/
|
|
1533
1533
|
async unwatchAddress(requestParameters, initOverrides) {
|
|
1534
1534
|
const response = await this.unwatchAddressRaw(requestParameters, initOverrides);
|
|
1535
1535
|
return await response.value();
|
|
1536
1536
|
}
|
|
1537
1537
|
/**
|
|
1538
|
-
* Unsubscribe from a previously watched order book stream.
|
|
1539
|
-
* Unwatch Order Book
|
|
1538
|
+
* 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\" } ```
|
|
1539
|
+
* Unwatch Order Book (WebSocket)
|
|
1540
1540
|
*/
|
|
1541
1541
|
async unwatchOrderBookRaw(requestParameters, initOverrides) {
|
|
1542
1542
|
if (requestParameters['exchange'] == null) {
|
|
@@ -1557,16 +1557,16 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
1557
1557
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BaseResponseFromJSON)(jsonValue));
|
|
1558
1558
|
}
|
|
1559
1559
|
/**
|
|
1560
|
-
* Unsubscribe from a previously watched order book stream.
|
|
1561
|
-
* Unwatch Order Book
|
|
1560
|
+
* 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\" } ```
|
|
1561
|
+
* Unwatch Order Book (WebSocket)
|
|
1562
1562
|
*/
|
|
1563
1563
|
async unwatchOrderBook(requestParameters, initOverrides) {
|
|
1564
1564
|
const response = await this.unwatchOrderBookRaw(requestParameters, initOverrides);
|
|
1565
1565
|
return await response.value();
|
|
1566
1566
|
}
|
|
1567
1567
|
/**
|
|
1568
|
-
* 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).
|
|
1569
|
-
* Watch Address
|
|
1568
|
+
* 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\" } ```
|
|
1569
|
+
* Watch Address (WebSocket)
|
|
1570
1570
|
*/
|
|
1571
1571
|
async watchAddressRaw(requestParameters, initOverrides) {
|
|
1572
1572
|
if (requestParameters['exchange'] == null) {
|
|
@@ -1587,16 +1587,16 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
1587
1587
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WatchAddress200ResponseFromJSON)(jsonValue));
|
|
1588
1588
|
}
|
|
1589
1589
|
/**
|
|
1590
|
-
* 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).
|
|
1591
|
-
* Watch Address
|
|
1590
|
+
* 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\" } ```
|
|
1591
|
+
* Watch Address (WebSocket)
|
|
1592
1592
|
*/
|
|
1593
1593
|
async watchAddress(requestParameters, initOverrides) {
|
|
1594
1594
|
const response = await this.watchAddressRaw(requestParameters, initOverrides);
|
|
1595
1595
|
return await response.value();
|
|
1596
1596
|
}
|
|
1597
1597
|
/**
|
|
1598
|
-
* 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).
|
|
1599
|
-
* Watch Order Book
|
|
1598
|
+
* 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\" } ```
|
|
1599
|
+
* Watch Order Book (WebSocket)
|
|
1600
1600
|
*/
|
|
1601
1601
|
async watchOrderBookRaw(requestParameters, initOverrides) {
|
|
1602
1602
|
if (requestParameters['exchange'] == null) {
|
|
@@ -1617,16 +1617,16 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
1617
1617
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FetchOrderBook200ResponseFromJSON)(jsonValue));
|
|
1618
1618
|
}
|
|
1619
1619
|
/**
|
|
1620
|
-
* 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).
|
|
1621
|
-
* Watch Order Book
|
|
1620
|
+
* 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\" } ```
|
|
1621
|
+
* Watch Order Book (WebSocket)
|
|
1622
1622
|
*/
|
|
1623
1623
|
async watchOrderBook(requestParameters, initOverrides) {
|
|
1624
1624
|
const response = await this.watchOrderBookRaw(requestParameters, initOverrides);
|
|
1625
1625
|
return await response.value();
|
|
1626
1626
|
}
|
|
1627
1627
|
/**
|
|
1628
|
-
* 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.
|
|
1629
|
-
* Watch Order Books
|
|
1628
|
+
* 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\" } ```
|
|
1629
|
+
* Watch Order Books (WebSocket)
|
|
1630
1630
|
*/
|
|
1631
1631
|
async watchOrderBooksRaw(requestParameters, initOverrides) {
|
|
1632
1632
|
if (requestParameters['exchange'] == null) {
|
|
@@ -1647,16 +1647,16 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
1647
1647
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WatchOrderBooks200ResponseFromJSON)(jsonValue));
|
|
1648
1648
|
}
|
|
1649
1649
|
/**
|
|
1650
|
-
* 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.
|
|
1651
|
-
* Watch Order Books
|
|
1650
|
+
* 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\" } ```
|
|
1651
|
+
* Watch Order Books (WebSocket)
|
|
1652
1652
|
*/
|
|
1653
1653
|
async watchOrderBooks(requestParameters, initOverrides) {
|
|
1654
1654
|
const response = await this.watchOrderBooksRaw(requestParameters, initOverrides);
|
|
1655
1655
|
return await response.value();
|
|
1656
1656
|
}
|
|
1657
1657
|
/**
|
|
1658
|
-
* 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).
|
|
1659
|
-
* Watch Trades
|
|
1658
|
+
* 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\" } ```
|
|
1659
|
+
* Watch Trades (WebSocket)
|
|
1660
1660
|
*/
|
|
1661
1661
|
async watchTradesRaw(requestParameters, initOverrides) {
|
|
1662
1662
|
if (requestParameters['exchange'] == null) {
|
|
@@ -1677,8 +1677,8 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
1677
1677
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FetchTrades200ResponseFromJSON)(jsonValue));
|
|
1678
1678
|
}
|
|
1679
1679
|
/**
|
|
1680
|
-
* 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).
|
|
1681
|
-
* Watch Trades
|
|
1680
|
+
* 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\" } ```
|
|
1681
|
+
* Watch Trades (WebSocket)
|
|
1682
1682
|
*/
|
|
1683
1683
|
async watchTrades(requestParameters, initOverrides) {
|
|
1684
1684
|
const response = await this.watchTradesRaw(requestParameters, initOverrides);
|
|
@@ -23,8 +23,6 @@ const ExchangeCredentials_1 = require("./ExchangeCredentials");
|
|
|
23
23
|
* Check if a given object implements the UnwatchAddressRequest interface.
|
|
24
24
|
*/
|
|
25
25
|
function instanceOfUnwatchAddressRequest(value) {
|
|
26
|
-
if (!('args' in value) || value['args'] === undefined)
|
|
27
|
-
return false;
|
|
28
26
|
return true;
|
|
29
27
|
}
|
|
30
28
|
function UnwatchAddressRequestFromJSON(json) {
|
|
@@ -35,7 +33,7 @@ function UnwatchAddressRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
33
|
return json;
|
|
36
34
|
}
|
|
37
35
|
return {
|
|
38
|
-
'args': json['args'],
|
|
36
|
+
'args': json['args'] == null ? undefined : json['args'],
|
|
39
37
|
'credentials': json['credentials'] == null ? undefined : (0, ExchangeCredentials_1.ExchangeCredentialsFromJSON)(json['credentials']),
|
|
40
38
|
};
|
|
41
39
|
}
|
|
@@ -23,8 +23,6 @@ const ExchangeCredentials_1 = require("./ExchangeCredentials");
|
|
|
23
23
|
* Check if a given object implements the UnwatchOrderBookRequest interface.
|
|
24
24
|
*/
|
|
25
25
|
function instanceOfUnwatchOrderBookRequest(value) {
|
|
26
|
-
if (!('args' in value) || value['args'] === undefined)
|
|
27
|
-
return false;
|
|
28
26
|
return true;
|
|
29
27
|
}
|
|
30
28
|
function UnwatchOrderBookRequestFromJSON(json) {
|
|
@@ -35,7 +33,7 @@ function UnwatchOrderBookRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
33
|
return json;
|
|
36
34
|
}
|
|
37
35
|
return {
|
|
38
|
-
'args': json['args'],
|
|
36
|
+
'args': json['args'] == null ? undefined : json['args'],
|
|
39
37
|
'credentials': json['credentials'] == null ? undefined : (0, ExchangeCredentials_1.ExchangeCredentialsFromJSON)(json['credentials']),
|
|
40
38
|
};
|
|
41
39
|
}
|
|
@@ -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';
|
|
13
12
|
import type { ExchangeCredentials } from './ExchangeCredentials';
|
|
14
13
|
/**
|
|
15
14
|
*
|
|
@@ -19,10 +18,10 @@ import type { ExchangeCredentials } from './ExchangeCredentials';
|
|
|
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}
|
|
@@ -18,14 +18,11 @@ exports.WatchAddressRequestFromJSON = WatchAddressRequestFromJSON;
|
|
|
18
18
|
exports.WatchAddressRequestFromJSONTyped = WatchAddressRequestFromJSONTyped;
|
|
19
19
|
exports.WatchAddressRequestToJSON = WatchAddressRequestToJSON;
|
|
20
20
|
exports.WatchAddressRequestToJSONTyped = WatchAddressRequestToJSONTyped;
|
|
21
|
-
const WatchAddressRequestArgsInner_1 = require("./WatchAddressRequestArgsInner");
|
|
22
21
|
const ExchangeCredentials_1 = require("./ExchangeCredentials");
|
|
23
22
|
/**
|
|
24
23
|
* Check if a given object implements the WatchAddressRequest interface.
|
|
25
24
|
*/
|
|
26
25
|
function instanceOfWatchAddressRequest(value) {
|
|
27
|
-
if (!('args' in value) || value['args'] === undefined)
|
|
28
|
-
return false;
|
|
29
26
|
return true;
|
|
30
27
|
}
|
|
31
28
|
function WatchAddressRequestFromJSON(json) {
|
|
@@ -36,7 +33,7 @@ function WatchAddressRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
33
|
return json;
|
|
37
34
|
}
|
|
38
35
|
return {
|
|
39
|
-
'args':
|
|
36
|
+
'args': json['args'] == null ? undefined : json['args'],
|
|
40
37
|
'credentials': json['credentials'] == null ? undefined : (0, ExchangeCredentials_1.ExchangeCredentialsFromJSON)(json['credentials']),
|
|
41
38
|
};
|
|
42
39
|
}
|
|
@@ -48,7 +45,7 @@ function WatchAddressRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
48
45
|
return value;
|
|
49
46
|
}
|
|
50
47
|
return {
|
|
51
|
-
'args':
|
|
48
|
+
'args': value['args'],
|
|
52
49
|
'credentials': (0, ExchangeCredentials_1.ExchangeCredentialsToJSON)(value['credentials']),
|
|
53
50
|
};
|
|
54
51
|
}
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ExchangeCredentials } from './ExchangeCredentials';
|
|
13
|
-
import type { WatchOrderBookRequestArgsInner } from './WatchOrderBookRequestArgsInner';
|
|
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}
|
|
@@ -19,13 +19,10 @@ exports.WatchOrderBookRequestFromJSONTyped = WatchOrderBookRequestFromJSONTyped;
|
|
|
19
19
|
exports.WatchOrderBookRequestToJSON = WatchOrderBookRequestToJSON;
|
|
20
20
|
exports.WatchOrderBookRequestToJSONTyped = WatchOrderBookRequestToJSONTyped;
|
|
21
21
|
const ExchangeCredentials_1 = require("./ExchangeCredentials");
|
|
22
|
-
const WatchOrderBookRequestArgsInner_1 = require("./WatchOrderBookRequestArgsInner");
|
|
23
22
|
/**
|
|
24
23
|
* Check if a given object implements the WatchOrderBookRequest interface.
|
|
25
24
|
*/
|
|
26
25
|
function instanceOfWatchOrderBookRequest(value) {
|
|
27
|
-
if (!('args' in value) || value['args'] === undefined)
|
|
28
|
-
return false;
|
|
29
26
|
return true;
|
|
30
27
|
}
|
|
31
28
|
function WatchOrderBookRequestFromJSON(json) {
|
|
@@ -36,7 +33,7 @@ function WatchOrderBookRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
33
|
return json;
|
|
37
34
|
}
|
|
38
35
|
return {
|
|
39
|
-
'args':
|
|
36
|
+
'args': json['args'] == null ? undefined : json['args'],
|
|
40
37
|
'credentials': json['credentials'] == null ? undefined : (0, ExchangeCredentials_1.ExchangeCredentialsFromJSON)(json['credentials']),
|
|
41
38
|
};
|
|
42
39
|
}
|
|
@@ -48,7 +45,7 @@ function WatchOrderBookRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
48
45
|
return value;
|
|
49
46
|
}
|
|
50
47
|
return {
|
|
51
|
-
'args':
|
|
48
|
+
'args': value['args'],
|
|
52
49
|
'credentials': (0, ExchangeCredentials_1.ExchangeCredentialsToJSON)(value['credentials']),
|
|
53
50
|
};
|
|
54
51
|
}
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ExchangeCredentials } from './ExchangeCredentials';
|
|
13
|
-
import type { WatchOrderBooksRequestArgsInner } from './WatchOrderBooksRequestArgsInner';
|
|
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}
|
|
@@ -19,13 +19,10 @@ exports.WatchOrderBooksRequestFromJSONTyped = WatchOrderBooksRequestFromJSONType
|
|
|
19
19
|
exports.WatchOrderBooksRequestToJSON = WatchOrderBooksRequestToJSON;
|
|
20
20
|
exports.WatchOrderBooksRequestToJSONTyped = WatchOrderBooksRequestToJSONTyped;
|
|
21
21
|
const ExchangeCredentials_1 = require("./ExchangeCredentials");
|
|
22
|
-
const WatchOrderBooksRequestArgsInner_1 = require("./WatchOrderBooksRequestArgsInner");
|
|
23
22
|
/**
|
|
24
23
|
* Check if a given object implements the WatchOrderBooksRequest interface.
|
|
25
24
|
*/
|
|
26
25
|
function instanceOfWatchOrderBooksRequest(value) {
|
|
27
|
-
if (!('args' in value) || value['args'] === undefined)
|
|
28
|
-
return false;
|
|
29
26
|
return true;
|
|
30
27
|
}
|
|
31
28
|
function WatchOrderBooksRequestFromJSON(json) {
|
|
@@ -36,7 +33,7 @@ function WatchOrderBooksRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
33
|
return json;
|
|
37
34
|
}
|
|
38
35
|
return {
|
|
39
|
-
'args':
|
|
36
|
+
'args': json['args'] == null ? undefined : json['args'],
|
|
40
37
|
'credentials': json['credentials'] == null ? undefined : (0, ExchangeCredentials_1.ExchangeCredentialsFromJSON)(json['credentials']),
|
|
41
38
|
};
|
|
42
39
|
}
|
|
@@ -48,7 +45,7 @@ function WatchOrderBooksRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
48
45
|
return value;
|
|
49
46
|
}
|
|
50
47
|
return {
|
|
51
|
-
'args':
|
|
48
|
+
'args': value['args'],
|
|
52
49
|
'credentials': (0, ExchangeCredentials_1.ExchangeCredentialsToJSON)(value['credentials']),
|
|
53
50
|
};
|
|
54
51
|
}
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ExchangeCredentials } from './ExchangeCredentials';
|
|
13
|
-
import type { WatchOrderBookRequestArgsInner } from './WatchOrderBookRequestArgsInner';
|
|
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}
|