pmxtjs 2.41.1 → 2.41.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/generated/src/apis/DefaultApi.d.ts +49 -55
- package/dist/esm/generated/src/apis/DefaultApi.js +19 -31
- package/dist/esm/generated/src/models/index.d.ts +0 -6
- package/dist/esm/generated/src/models/index.js +0 -6
- package/dist/esm/pmxt/client.js +5 -1
- package/dist/generated/src/apis/DefaultApi.d.ts +49 -55
- package/dist/generated/src/apis/DefaultApi.js +19 -31
- package/dist/generated/src/models/index.d.ts +0 -6
- package/dist/generated/src/models/index.js +0 -6
- package/dist/pmxt/client.js +5 -1
- package/generated/.openapi-generator/FILES +0 -12
- package/generated/docs/DefaultApi.md +42 -60
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +48 -90
- package/generated/src/models/index.ts +0 -6
- package/package.json +2 -2
- package/pmxt/client.ts +5 -1
- package/dist/esm/generated/src/models/UnwatchAddressRequest.d.ts +0 -39
- package/dist/esm/generated/src/models/UnwatchAddressRequest.js +0 -44
- package/dist/esm/generated/src/models/UnwatchOrderBookRequest.d.ts +0 -39
- package/dist/esm/generated/src/models/UnwatchOrderBookRequest.js +0 -44
- package/dist/esm/generated/src/models/WatchAddressRequest.d.ts +0 -39
- package/dist/esm/generated/src/models/WatchAddressRequest.js +0 -44
- package/dist/esm/generated/src/models/WatchOrderBookRequest.d.ts +0 -39
- package/dist/esm/generated/src/models/WatchOrderBookRequest.js +0 -44
- package/dist/esm/generated/src/models/WatchOrderBooksRequest.d.ts +0 -39
- package/dist/esm/generated/src/models/WatchOrderBooksRequest.js +0 -44
- package/dist/esm/generated/src/models/WatchTradesRequest.d.ts +0 -39
- package/dist/esm/generated/src/models/WatchTradesRequest.js +0 -44
- package/dist/generated/src/models/UnwatchAddressRequest.d.ts +0 -39
- package/dist/generated/src/models/UnwatchAddressRequest.js +0 -51
- package/dist/generated/src/models/UnwatchOrderBookRequest.d.ts +0 -39
- package/dist/generated/src/models/UnwatchOrderBookRequest.js +0 -51
- package/dist/generated/src/models/WatchAddressRequest.d.ts +0 -39
- package/dist/generated/src/models/WatchAddressRequest.js +0 -51
- package/dist/generated/src/models/WatchOrderBookRequest.d.ts +0 -39
- package/dist/generated/src/models/WatchOrderBookRequest.js +0 -51
- package/dist/generated/src/models/WatchOrderBooksRequest.d.ts +0 -39
- package/dist/generated/src/models/WatchOrderBooksRequest.js +0 -51
- package/dist/generated/src/models/WatchTradesRequest.d.ts +0 -39
- package/dist/generated/src/models/WatchTradesRequest.js +0 -51
- package/generated/docs/UnwatchAddressRequest.md +0 -36
- package/generated/docs/UnwatchOrderBookRequest.md +0 -36
- package/generated/docs/WatchAddressRequest.md +0 -36
- package/generated/docs/WatchOrderBookRequest.md +0 -36
- package/generated/docs/WatchOrderBooksRequest.md +0 -36
- package/generated/docs/WatchTradesRequest.md +0 -36
- package/generated/src/models/UnwatchAddressRequest.ts +0 -81
- package/generated/src/models/UnwatchOrderBookRequest.ts +0 -81
- package/generated/src/models/WatchAddressRequest.ts +0 -81
- package/generated/src/models/WatchOrderBookRequest.ts +0 -81
- package/generated/src/models/WatchOrderBooksRequest.ts +0 -81
- package/generated/src/models/WatchTradesRequest.ts +0 -81
|
@@ -40,12 +40,12 @@ All URIs are relative to *http://localhost:3847*
|
|
|
40
40
|
| [**loadMarkets**](DefaultApi.md#loadmarketsoperation) | **POST** /api/{exchange}/loadMarkets | Load Markets |
|
|
41
41
|
| [**submitOrder**](DefaultApi.md#submitorderoperation) | **POST** /api/{exchange}/submitOrder | Submit Order |
|
|
42
42
|
| [**testDummyMethod**](DefaultApi.md#testdummymethodoperation) | **POST** /api/{exchange}/testDummyMethod | Test Dummy Method |
|
|
43
|
-
| [**unwatchAddress**](DefaultApi.md#
|
|
44
|
-
| [**unwatchOrderBook**](DefaultApi.md#
|
|
45
|
-
| [**watchAddress**](DefaultApi.md#
|
|
46
|
-
| [**watchOrderBook**](DefaultApi.md#
|
|
47
|
-
| [**watchOrderBooks**](DefaultApi.md#
|
|
48
|
-
| [**watchTrades**](DefaultApi.md#
|
|
43
|
+
| [**unwatchAddress**](DefaultApi.md#unwatchaddress) | **POST** /api/{exchange}/unwatchAddress | Unwatch Address |
|
|
44
|
+
| [**unwatchOrderBook**](DefaultApi.md#unwatchorderbook) | **POST** /api/{exchange}/unwatchOrderBook | Unwatch Order Book |
|
|
45
|
+
| [**watchAddress**](DefaultApi.md#watchaddress) | **POST** /api/{exchange}/watchAddress | Watch Address |
|
|
46
|
+
| [**watchOrderBook**](DefaultApi.md#watchorderbook) | **POST** /api/{exchange}/watchOrderBook | Watch Order Book |
|
|
47
|
+
| [**watchOrderBooks**](DefaultApi.md#watchorderbooks) | **POST** /api/{exchange}/watchOrderBooks | Watch Order Books |
|
|
48
|
+
| [**watchTrades**](DefaultApi.md#watchtrades) | **POST** /api/{exchange}/watchTrades | Watch Trades |
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
@@ -2893,9 +2893,9 @@ No authorization required
|
|
|
2893
2893
|
|
|
2894
2894
|
## unwatchAddress
|
|
2895
2895
|
|
|
2896
|
-
> BaseResponse unwatchAddress(exchange
|
|
2896
|
+
> BaseResponse unwatchAddress(exchange)
|
|
2897
2897
|
|
|
2898
|
-
Unwatch Address
|
|
2898
|
+
Unwatch Address
|
|
2899
2899
|
|
|
2900
2900
|
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\" } ```
|
|
2901
2901
|
|
|
@@ -2906,7 +2906,7 @@ import {
|
|
|
2906
2906
|
Configuration,
|
|
2907
2907
|
DefaultApi,
|
|
2908
2908
|
} from 'pmxtjs';
|
|
2909
|
-
import type {
|
|
2909
|
+
import type { UnwatchAddressRequest } from 'pmxtjs';
|
|
2910
2910
|
|
|
2911
2911
|
async function example() {
|
|
2912
2912
|
console.log("🚀 Testing pmxtjs SDK...");
|
|
@@ -2915,9 +2915,7 @@ async function example() {
|
|
|
2915
2915
|
const body = {
|
|
2916
2916
|
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
2917
2917
|
exchange: exchange_example,
|
|
2918
|
-
|
|
2919
|
-
unwatchAddressRequest: ...,
|
|
2920
|
-
} satisfies UnwatchAddressOperationRequest;
|
|
2918
|
+
} satisfies UnwatchAddressRequest;
|
|
2921
2919
|
|
|
2922
2920
|
try {
|
|
2923
2921
|
const data = await api.unwatchAddress(body);
|
|
@@ -2937,7 +2935,6 @@ example().catch(console.error);
|
|
|
2937
2935
|
| Name | Type | Description | Notes |
|
|
2938
2936
|
|------------- | ------------- | ------------- | -------------|
|
|
2939
2937
|
| **exchange** | `polymarket`, `kalshi`, `kalshi-demo`, `limitless`, `probable`, `baozi`, `myriad`, `opinion`, `metaculus`, `smarkets`, `polymarket_us`, `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: polymarket, kalshi, kalshi-demo, limitless, probable, baozi, myriad, opinion, metaculus, smarkets, polymarket_us, router] |
|
|
2940
|
-
| **unwatchAddressRequest** | [UnwatchAddressRequest](UnwatchAddressRequest.md) | | [Optional] |
|
|
2941
2938
|
|
|
2942
2939
|
### Return type
|
|
2943
2940
|
|
|
@@ -2949,23 +2946,23 @@ No authorization required
|
|
|
2949
2946
|
|
|
2950
2947
|
### HTTP request headers
|
|
2951
2948
|
|
|
2952
|
-
- **Content-Type**:
|
|
2949
|
+
- **Content-Type**: Not defined
|
|
2953
2950
|
- **Accept**: `application/json`
|
|
2954
2951
|
|
|
2955
2952
|
|
|
2956
2953
|
### HTTP response details
|
|
2957
2954
|
| Status code | Description | Response headers |
|
|
2958
2955
|
|-------------|-------------|------------------|
|
|
2959
|
-
| **200** | Unwatch Address response
|
|
2956
|
+
| **200** | Unwatch Address response | - |
|
|
2960
2957
|
|
|
2961
2958
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2962
2959
|
|
|
2963
2960
|
|
|
2964
2961
|
## unwatchOrderBook
|
|
2965
2962
|
|
|
2966
|
-
> BaseResponse unwatchOrderBook(exchange
|
|
2963
|
+
> BaseResponse unwatchOrderBook(exchange)
|
|
2967
2964
|
|
|
2968
|
-
Unwatch Order Book
|
|
2965
|
+
Unwatch Order Book
|
|
2969
2966
|
|
|
2970
2967
|
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\" } ```
|
|
2971
2968
|
|
|
@@ -2976,7 +2973,7 @@ import {
|
|
|
2976
2973
|
Configuration,
|
|
2977
2974
|
DefaultApi,
|
|
2978
2975
|
} from 'pmxtjs';
|
|
2979
|
-
import type {
|
|
2976
|
+
import type { UnwatchOrderBookRequest } from 'pmxtjs';
|
|
2980
2977
|
|
|
2981
2978
|
async function example() {
|
|
2982
2979
|
console.log("🚀 Testing pmxtjs SDK...");
|
|
@@ -2985,9 +2982,7 @@ async function example() {
|
|
|
2985
2982
|
const body = {
|
|
2986
2983
|
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
2987
2984
|
exchange: exchange_example,
|
|
2988
|
-
|
|
2989
|
-
unwatchOrderBookRequest: ...,
|
|
2990
|
-
} satisfies UnwatchOrderBookOperationRequest;
|
|
2985
|
+
} satisfies UnwatchOrderBookRequest;
|
|
2991
2986
|
|
|
2992
2987
|
try {
|
|
2993
2988
|
const data = await api.unwatchOrderBook(body);
|
|
@@ -3007,7 +3002,6 @@ example().catch(console.error);
|
|
|
3007
3002
|
| Name | Type | Description | Notes |
|
|
3008
3003
|
|------------- | ------------- | ------------- | -------------|
|
|
3009
3004
|
| **exchange** | `polymarket`, `kalshi`, `kalshi-demo`, `limitless`, `probable`, `baozi`, `myriad`, `opinion`, `metaculus`, `smarkets`, `polymarket_us`, `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: polymarket, kalshi, kalshi-demo, limitless, probable, baozi, myriad, opinion, metaculus, smarkets, polymarket_us, router] |
|
|
3010
|
-
| **unwatchOrderBookRequest** | [UnwatchOrderBookRequest](UnwatchOrderBookRequest.md) | | [Optional] |
|
|
3011
3005
|
|
|
3012
3006
|
### Return type
|
|
3013
3007
|
|
|
@@ -3019,23 +3013,23 @@ No authorization required
|
|
|
3019
3013
|
|
|
3020
3014
|
### HTTP request headers
|
|
3021
3015
|
|
|
3022
|
-
- **Content-Type**:
|
|
3016
|
+
- **Content-Type**: Not defined
|
|
3023
3017
|
- **Accept**: `application/json`
|
|
3024
3018
|
|
|
3025
3019
|
|
|
3026
3020
|
### HTTP response details
|
|
3027
3021
|
| Status code | Description | Response headers |
|
|
3028
3022
|
|-------------|-------------|------------------|
|
|
3029
|
-
| **200** | Unwatch Order Book response
|
|
3023
|
+
| **200** | Unwatch Order Book response | - |
|
|
3030
3024
|
|
|
3031
3025
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3032
3026
|
|
|
3033
3027
|
|
|
3034
3028
|
## watchAddress
|
|
3035
3029
|
|
|
3036
|
-
> WatchAddress200Response watchAddress(exchange
|
|
3030
|
+
> WatchAddress200Response watchAddress(exchange)
|
|
3037
3031
|
|
|
3038
|
-
Watch Address
|
|
3032
|
+
Watch Address
|
|
3039
3033
|
|
|
3040
3034
|
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\" } ```
|
|
3041
3035
|
|
|
@@ -3046,7 +3040,7 @@ import {
|
|
|
3046
3040
|
Configuration,
|
|
3047
3041
|
DefaultApi,
|
|
3048
3042
|
} from 'pmxtjs';
|
|
3049
|
-
import type {
|
|
3043
|
+
import type { WatchAddressRequest } from 'pmxtjs';
|
|
3050
3044
|
|
|
3051
3045
|
async function example() {
|
|
3052
3046
|
console.log("🚀 Testing pmxtjs SDK...");
|
|
@@ -3055,9 +3049,7 @@ async function example() {
|
|
|
3055
3049
|
const body = {
|
|
3056
3050
|
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
3057
3051
|
exchange: exchange_example,
|
|
3058
|
-
|
|
3059
|
-
watchAddressRequest: ...,
|
|
3060
|
-
} satisfies WatchAddressOperationRequest;
|
|
3052
|
+
} satisfies WatchAddressRequest;
|
|
3061
3053
|
|
|
3062
3054
|
try {
|
|
3063
3055
|
const data = await api.watchAddress(body);
|
|
@@ -3077,7 +3069,6 @@ example().catch(console.error);
|
|
|
3077
3069
|
| Name | Type | Description | Notes |
|
|
3078
3070
|
|------------- | ------------- | ------------- | -------------|
|
|
3079
3071
|
| **exchange** | `polymarket`, `kalshi`, `kalshi-demo`, `limitless`, `probable`, `baozi`, `myriad`, `opinion`, `metaculus`, `smarkets`, `polymarket_us`, `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: polymarket, kalshi, kalshi-demo, limitless, probable, baozi, myriad, opinion, metaculus, smarkets, polymarket_us, router] |
|
|
3080
|
-
| **watchAddressRequest** | [WatchAddressRequest](WatchAddressRequest.md) | | [Optional] |
|
|
3081
3072
|
|
|
3082
3073
|
### Return type
|
|
3083
3074
|
|
|
@@ -3089,23 +3080,23 @@ No authorization required
|
|
|
3089
3080
|
|
|
3090
3081
|
### HTTP request headers
|
|
3091
3082
|
|
|
3092
|
-
- **Content-Type**:
|
|
3083
|
+
- **Content-Type**: Not defined
|
|
3093
3084
|
- **Accept**: `application/json`
|
|
3094
3085
|
|
|
3095
3086
|
|
|
3096
3087
|
### HTTP response details
|
|
3097
3088
|
| Status code | Description | Response headers |
|
|
3098
3089
|
|-------------|-------------|------------------|
|
|
3099
|
-
| **200** | Watch Address response
|
|
3090
|
+
| **200** | Watch Address response | - |
|
|
3100
3091
|
|
|
3101
3092
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3102
3093
|
|
|
3103
3094
|
|
|
3104
3095
|
## watchOrderBook
|
|
3105
3096
|
|
|
3106
|
-
> FetchOrderBook200Response watchOrderBook(exchange
|
|
3097
|
+
> FetchOrderBook200Response watchOrderBook(exchange)
|
|
3107
3098
|
|
|
3108
|
-
Watch Order Book
|
|
3099
|
+
Watch Order Book
|
|
3109
3100
|
|
|
3110
3101
|
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\" } ```
|
|
3111
3102
|
|
|
@@ -3116,7 +3107,7 @@ import {
|
|
|
3116
3107
|
Configuration,
|
|
3117
3108
|
DefaultApi,
|
|
3118
3109
|
} from 'pmxtjs';
|
|
3119
|
-
import type {
|
|
3110
|
+
import type { WatchOrderBookRequest } from 'pmxtjs';
|
|
3120
3111
|
|
|
3121
3112
|
async function example() {
|
|
3122
3113
|
console.log("🚀 Testing pmxtjs SDK...");
|
|
@@ -3125,9 +3116,7 @@ async function example() {
|
|
|
3125
3116
|
const body = {
|
|
3126
3117
|
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
3127
3118
|
exchange: exchange_example,
|
|
3128
|
-
|
|
3129
|
-
watchOrderBookRequest: ...,
|
|
3130
|
-
} satisfies WatchOrderBookOperationRequest;
|
|
3119
|
+
} satisfies WatchOrderBookRequest;
|
|
3131
3120
|
|
|
3132
3121
|
try {
|
|
3133
3122
|
const data = await api.watchOrderBook(body);
|
|
@@ -3147,7 +3136,6 @@ example().catch(console.error);
|
|
|
3147
3136
|
| Name | Type | Description | Notes |
|
|
3148
3137
|
|------------- | ------------- | ------------- | -------------|
|
|
3149
3138
|
| **exchange** | `polymarket`, `kalshi`, `kalshi-demo`, `limitless`, `probable`, `baozi`, `myriad`, `opinion`, `metaculus`, `smarkets`, `polymarket_us`, `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: polymarket, kalshi, kalshi-demo, limitless, probable, baozi, myriad, opinion, metaculus, smarkets, polymarket_us, router] |
|
|
3150
|
-
| **watchOrderBookRequest** | [WatchOrderBookRequest](WatchOrderBookRequest.md) | | [Optional] |
|
|
3151
3139
|
|
|
3152
3140
|
### Return type
|
|
3153
3141
|
|
|
@@ -3159,23 +3147,23 @@ No authorization required
|
|
|
3159
3147
|
|
|
3160
3148
|
### HTTP request headers
|
|
3161
3149
|
|
|
3162
|
-
- **Content-Type**:
|
|
3150
|
+
- **Content-Type**: Not defined
|
|
3163
3151
|
- **Accept**: `application/json`
|
|
3164
3152
|
|
|
3165
3153
|
|
|
3166
3154
|
### HTTP response details
|
|
3167
3155
|
| Status code | Description | Response headers |
|
|
3168
3156
|
|-------------|-------------|------------------|
|
|
3169
|
-
| **200** | Watch Order Book response
|
|
3157
|
+
| **200** | Watch Order Book response | - |
|
|
3170
3158
|
|
|
3171
3159
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3172
3160
|
|
|
3173
3161
|
|
|
3174
3162
|
## watchOrderBooks
|
|
3175
3163
|
|
|
3176
|
-
> WatchOrderBooks200Response watchOrderBooks(exchange
|
|
3164
|
+
> WatchOrderBooks200Response watchOrderBooks(exchange)
|
|
3177
3165
|
|
|
3178
|
-
Watch Order Books
|
|
3166
|
+
Watch Order Books
|
|
3179
3167
|
|
|
3180
3168
|
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\" } ```
|
|
3181
3169
|
|
|
@@ -3186,7 +3174,7 @@ import {
|
|
|
3186
3174
|
Configuration,
|
|
3187
3175
|
DefaultApi,
|
|
3188
3176
|
} from 'pmxtjs';
|
|
3189
|
-
import type {
|
|
3177
|
+
import type { WatchOrderBooksRequest } from 'pmxtjs';
|
|
3190
3178
|
|
|
3191
3179
|
async function example() {
|
|
3192
3180
|
console.log("🚀 Testing pmxtjs SDK...");
|
|
@@ -3195,9 +3183,7 @@ async function example() {
|
|
|
3195
3183
|
const body = {
|
|
3196
3184
|
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
3197
3185
|
exchange: exchange_example,
|
|
3198
|
-
|
|
3199
|
-
watchOrderBooksRequest: ...,
|
|
3200
|
-
} satisfies WatchOrderBooksOperationRequest;
|
|
3186
|
+
} satisfies WatchOrderBooksRequest;
|
|
3201
3187
|
|
|
3202
3188
|
try {
|
|
3203
3189
|
const data = await api.watchOrderBooks(body);
|
|
@@ -3217,7 +3203,6 @@ example().catch(console.error);
|
|
|
3217
3203
|
| Name | Type | Description | Notes |
|
|
3218
3204
|
|------------- | ------------- | ------------- | -------------|
|
|
3219
3205
|
| **exchange** | `polymarket`, `kalshi`, `kalshi-demo`, `limitless`, `probable`, `baozi`, `myriad`, `opinion`, `metaculus`, `smarkets`, `polymarket_us`, `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: polymarket, kalshi, kalshi-demo, limitless, probable, baozi, myriad, opinion, metaculus, smarkets, polymarket_us, router] |
|
|
3220
|
-
| **watchOrderBooksRequest** | [WatchOrderBooksRequest](WatchOrderBooksRequest.md) | | [Optional] |
|
|
3221
3206
|
|
|
3222
3207
|
### Return type
|
|
3223
3208
|
|
|
@@ -3229,23 +3214,23 @@ No authorization required
|
|
|
3229
3214
|
|
|
3230
3215
|
### HTTP request headers
|
|
3231
3216
|
|
|
3232
|
-
- **Content-Type**:
|
|
3217
|
+
- **Content-Type**: Not defined
|
|
3233
3218
|
- **Accept**: `application/json`
|
|
3234
3219
|
|
|
3235
3220
|
|
|
3236
3221
|
### HTTP response details
|
|
3237
3222
|
| Status code | Description | Response headers |
|
|
3238
3223
|
|-------------|-------------|------------------|
|
|
3239
|
-
| **200** | Watch Order Books response
|
|
3224
|
+
| **200** | Watch Order Books response | - |
|
|
3240
3225
|
|
|
3241
3226
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3242
3227
|
|
|
3243
3228
|
|
|
3244
3229
|
## watchTrades
|
|
3245
3230
|
|
|
3246
|
-
> FetchTrades200Response watchTrades(exchange
|
|
3231
|
+
> FetchTrades200Response watchTrades(exchange)
|
|
3247
3232
|
|
|
3248
|
-
Watch Trades
|
|
3233
|
+
Watch Trades
|
|
3249
3234
|
|
|
3250
3235
|
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\" } ```
|
|
3251
3236
|
|
|
@@ -3256,7 +3241,7 @@ import {
|
|
|
3256
3241
|
Configuration,
|
|
3257
3242
|
DefaultApi,
|
|
3258
3243
|
} from 'pmxtjs';
|
|
3259
|
-
import type {
|
|
3244
|
+
import type { WatchTradesRequest } from 'pmxtjs';
|
|
3260
3245
|
|
|
3261
3246
|
async function example() {
|
|
3262
3247
|
console.log("🚀 Testing pmxtjs SDK...");
|
|
@@ -3265,9 +3250,7 @@ async function example() {
|
|
|
3265
3250
|
const body = {
|
|
3266
3251
|
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
3267
3252
|
exchange: exchange_example,
|
|
3268
|
-
|
|
3269
|
-
watchTradesRequest: ...,
|
|
3270
|
-
} satisfies WatchTradesOperationRequest;
|
|
3253
|
+
} satisfies WatchTradesRequest;
|
|
3271
3254
|
|
|
3272
3255
|
try {
|
|
3273
3256
|
const data = await api.watchTrades(body);
|
|
@@ -3287,7 +3270,6 @@ example().catch(console.error);
|
|
|
3287
3270
|
| Name | Type | Description | Notes |
|
|
3288
3271
|
|------------- | ------------- | ------------- | -------------|
|
|
3289
3272
|
| **exchange** | `polymarket`, `kalshi`, `kalshi-demo`, `limitless`, `probable`, `baozi`, `myriad`, `opinion`, `metaculus`, `smarkets`, `polymarket_us`, `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: polymarket, kalshi, kalshi-demo, limitless, probable, baozi, myriad, opinion, metaculus, smarkets, polymarket_us, router] |
|
|
3290
|
-
| **watchTradesRequest** | [WatchTradesRequest](WatchTradesRequest.md) | | [Optional] |
|
|
3291
3273
|
|
|
3292
3274
|
### Return type
|
|
3293
3275
|
|
|
@@ -3299,14 +3281,14 @@ No authorization required
|
|
|
3299
3281
|
|
|
3300
3282
|
### HTTP request headers
|
|
3301
3283
|
|
|
3302
|
-
- **Content-Type**:
|
|
3284
|
+
- **Content-Type**: Not defined
|
|
3303
3285
|
- **Accept**: `application/json`
|
|
3304
3286
|
|
|
3305
3287
|
|
|
3306
3288
|
### HTTP response details
|
|
3307
3289
|
| Status code | Description | Response headers |
|
|
3308
3290
|
|-------------|-------------|------------------|
|
|
3309
|
-
| **200** | Watch Trades response
|
|
3291
|
+
| **200** | Watch Trades response | - |
|
|
3310
3292
|
|
|
3311
3293
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3312
3294
|
|