pmxtjs 2.41.1 → 2.41.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/generated/src/apis/DefaultApi.d.ts +1 -193
- package/dist/esm/generated/src/apis/DefaultApi.js +1 -283
- package/dist/esm/generated/src/models/index.d.ts +0 -8
- package/dist/esm/generated/src/models/index.js +0 -8
- package/dist/esm/pmxt/client.js +5 -1
- package/dist/generated/src/apis/DefaultApi.d.ts +1 -193
- package/dist/generated/src/apis/DefaultApi.js +1 -283
- package/dist/generated/src/models/index.d.ts +0 -8
- package/dist/generated/src/models/index.js +0 -8
- package/dist/pmxt/client.js +5 -1
- package/generated/.openapi-generator/FILES +0 -16
- package/generated/docs/DefaultApi.md +0 -426
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +0 -414
- package/generated/src/models/index.ts +0 -8
- package/package.json +3 -3
- 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/WatchAddress200Response.d.ts +0 -45
- package/dist/esm/generated/src/models/WatchAddress200Response.js +0 -46
- 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/WatchOrderBooks200Response.d.ts +0 -48
- package/dist/esm/generated/src/models/WatchOrderBooks200Response.js +0 -48
- 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/WatchAddress200Response.d.ts +0 -45
- package/dist/generated/src/models/WatchAddress200Response.js +0 -53
- 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/WatchOrderBooks200Response.d.ts +0 -48
- package/dist/generated/src/models/WatchOrderBooks200Response.js +0 -55
- 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/WatchAddress200Response.md +0 -38
- package/generated/docs/WatchAddressRequest.md +0 -36
- package/generated/docs/WatchOrderBookRequest.md +0 -36
- package/generated/docs/WatchOrderBooks200Response.md +0 -38
- 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/WatchAddress200Response.ts +0 -89
- package/generated/src/models/WatchAddressRequest.ts +0 -81
- package/generated/src/models/WatchOrderBookRequest.ts +0 -81
- package/generated/src/models/WatchOrderBooks200Response.ts +0 -96
- package/generated/src/models/WatchOrderBooksRequest.ts +0 -81
- package/generated/src/models/WatchTradesRequest.ts +0 -81
|
@@ -40,12 +40,6 @@ 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#unwatchaddressoperation) | **POST** /api/{exchange}/unwatchAddress | Unwatch Address (WebSocket) |
|
|
44
|
-
| [**unwatchOrderBook**](DefaultApi.md#unwatchorderbookoperation) | **POST** /api/{exchange}/unwatchOrderBook | Unwatch Order Book (WebSocket) |
|
|
45
|
-
| [**watchAddress**](DefaultApi.md#watchaddressoperation) | **POST** /api/{exchange}/watchAddress | Watch Address (WebSocket) |
|
|
46
|
-
| [**watchOrderBook**](DefaultApi.md#watchorderbookoperation) | **POST** /api/{exchange}/watchOrderBook | Watch Order Book (WebSocket) |
|
|
47
|
-
| [**watchOrderBooks**](DefaultApi.md#watchorderbooksoperation) | **POST** /api/{exchange}/watchOrderBooks | Watch Order Books (WebSocket) |
|
|
48
|
-
| [**watchTrades**](DefaultApi.md#watchtradesoperation) | **POST** /api/{exchange}/watchTrades | Watch Trades (WebSocket) |
|
|
49
43
|
|
|
50
44
|
|
|
51
45
|
|
|
@@ -2890,423 +2884,3 @@ No authorization required
|
|
|
2890
2884
|
|
|
2891
2885
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2892
2886
|
|
|
2893
|
-
|
|
2894
|
-
## unwatchAddress
|
|
2895
|
-
|
|
2896
|
-
> BaseResponse unwatchAddress(exchange, unwatchAddressRequest)
|
|
2897
|
-
|
|
2898
|
-
Unwatch Address (WebSocket)
|
|
2899
|
-
|
|
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
|
-
|
|
2902
|
-
### Example
|
|
2903
|
-
|
|
2904
|
-
```ts
|
|
2905
|
-
import {
|
|
2906
|
-
Configuration,
|
|
2907
|
-
DefaultApi,
|
|
2908
|
-
} from 'pmxtjs';
|
|
2909
|
-
import type { UnwatchAddressOperationRequest } from 'pmxtjs';
|
|
2910
|
-
|
|
2911
|
-
async function example() {
|
|
2912
|
-
console.log("🚀 Testing pmxtjs SDK...");
|
|
2913
|
-
const api = new DefaultApi();
|
|
2914
|
-
|
|
2915
|
-
const body = {
|
|
2916
|
-
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
2917
|
-
exchange: exchange_example,
|
|
2918
|
-
// UnwatchAddressRequest (optional)
|
|
2919
|
-
unwatchAddressRequest: ...,
|
|
2920
|
-
} satisfies UnwatchAddressOperationRequest;
|
|
2921
|
-
|
|
2922
|
-
try {
|
|
2923
|
-
const data = await api.unwatchAddress(body);
|
|
2924
|
-
console.log(data);
|
|
2925
|
-
} catch (error) {
|
|
2926
|
-
console.error(error);
|
|
2927
|
-
}
|
|
2928
|
-
}
|
|
2929
|
-
|
|
2930
|
-
// Run the test
|
|
2931
|
-
example().catch(console.error);
|
|
2932
|
-
```
|
|
2933
|
-
|
|
2934
|
-
### Parameters
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
| Name | Type | Description | Notes |
|
|
2938
|
-
|------------- | ------------- | ------------- | -------------|
|
|
2939
|
-
| **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
|
-
|
|
2942
|
-
### Return type
|
|
2943
|
-
|
|
2944
|
-
[**BaseResponse**](BaseResponse.md)
|
|
2945
|
-
|
|
2946
|
-
### Authorization
|
|
2947
|
-
|
|
2948
|
-
No authorization required
|
|
2949
|
-
|
|
2950
|
-
### HTTP request headers
|
|
2951
|
-
|
|
2952
|
-
- **Content-Type**: `application/json`
|
|
2953
|
-
- **Accept**: `application/json`
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
### HTTP response details
|
|
2957
|
-
| Status code | Description | Response headers |
|
|
2958
|
-
|-------------|-------------|------------------|
|
|
2959
|
-
| **200** | Unwatch Address response (WebSocket data event) | - |
|
|
2960
|
-
|
|
2961
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
## unwatchOrderBook
|
|
2965
|
-
|
|
2966
|
-
> BaseResponse unwatchOrderBook(exchange, unwatchOrderBookRequest)
|
|
2967
|
-
|
|
2968
|
-
Unwatch Order Book (WebSocket)
|
|
2969
|
-
|
|
2970
|
-
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
|
-
|
|
2972
|
-
### Example
|
|
2973
|
-
|
|
2974
|
-
```ts
|
|
2975
|
-
import {
|
|
2976
|
-
Configuration,
|
|
2977
|
-
DefaultApi,
|
|
2978
|
-
} from 'pmxtjs';
|
|
2979
|
-
import type { UnwatchOrderBookOperationRequest } from 'pmxtjs';
|
|
2980
|
-
|
|
2981
|
-
async function example() {
|
|
2982
|
-
console.log("🚀 Testing pmxtjs SDK...");
|
|
2983
|
-
const api = new DefaultApi();
|
|
2984
|
-
|
|
2985
|
-
const body = {
|
|
2986
|
-
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
2987
|
-
exchange: exchange_example,
|
|
2988
|
-
// UnwatchOrderBookRequest (optional)
|
|
2989
|
-
unwatchOrderBookRequest: ...,
|
|
2990
|
-
} satisfies UnwatchOrderBookOperationRequest;
|
|
2991
|
-
|
|
2992
|
-
try {
|
|
2993
|
-
const data = await api.unwatchOrderBook(body);
|
|
2994
|
-
console.log(data);
|
|
2995
|
-
} catch (error) {
|
|
2996
|
-
console.error(error);
|
|
2997
|
-
}
|
|
2998
|
-
}
|
|
2999
|
-
|
|
3000
|
-
// Run the test
|
|
3001
|
-
example().catch(console.error);
|
|
3002
|
-
```
|
|
3003
|
-
|
|
3004
|
-
### Parameters
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
| Name | Type | Description | Notes |
|
|
3008
|
-
|------------- | ------------- | ------------- | -------------|
|
|
3009
|
-
| **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
|
-
|
|
3012
|
-
### Return type
|
|
3013
|
-
|
|
3014
|
-
[**BaseResponse**](BaseResponse.md)
|
|
3015
|
-
|
|
3016
|
-
### Authorization
|
|
3017
|
-
|
|
3018
|
-
No authorization required
|
|
3019
|
-
|
|
3020
|
-
### HTTP request headers
|
|
3021
|
-
|
|
3022
|
-
- **Content-Type**: `application/json`
|
|
3023
|
-
- **Accept**: `application/json`
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
### HTTP response details
|
|
3027
|
-
| Status code | Description | Response headers |
|
|
3028
|
-
|-------------|-------------|------------------|
|
|
3029
|
-
| **200** | Unwatch Order Book response (WebSocket data event) | - |
|
|
3030
|
-
|
|
3031
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
## watchAddress
|
|
3035
|
-
|
|
3036
|
-
> WatchAddress200Response watchAddress(exchange, watchAddressRequest)
|
|
3037
|
-
|
|
3038
|
-
Watch Address (WebSocket)
|
|
3039
|
-
|
|
3040
|
-
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
|
-
|
|
3042
|
-
### Example
|
|
3043
|
-
|
|
3044
|
-
```ts
|
|
3045
|
-
import {
|
|
3046
|
-
Configuration,
|
|
3047
|
-
DefaultApi,
|
|
3048
|
-
} from 'pmxtjs';
|
|
3049
|
-
import type { WatchAddressOperationRequest } from 'pmxtjs';
|
|
3050
|
-
|
|
3051
|
-
async function example() {
|
|
3052
|
-
console.log("🚀 Testing pmxtjs SDK...");
|
|
3053
|
-
const api = new DefaultApi();
|
|
3054
|
-
|
|
3055
|
-
const body = {
|
|
3056
|
-
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
3057
|
-
exchange: exchange_example,
|
|
3058
|
-
// WatchAddressRequest (optional)
|
|
3059
|
-
watchAddressRequest: ...,
|
|
3060
|
-
} satisfies WatchAddressOperationRequest;
|
|
3061
|
-
|
|
3062
|
-
try {
|
|
3063
|
-
const data = await api.watchAddress(body);
|
|
3064
|
-
console.log(data);
|
|
3065
|
-
} catch (error) {
|
|
3066
|
-
console.error(error);
|
|
3067
|
-
}
|
|
3068
|
-
}
|
|
3069
|
-
|
|
3070
|
-
// Run the test
|
|
3071
|
-
example().catch(console.error);
|
|
3072
|
-
```
|
|
3073
|
-
|
|
3074
|
-
### Parameters
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
| Name | Type | Description | Notes |
|
|
3078
|
-
|------------- | ------------- | ------------- | -------------|
|
|
3079
|
-
| **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
|
-
|
|
3082
|
-
### Return type
|
|
3083
|
-
|
|
3084
|
-
[**WatchAddress200Response**](WatchAddress200Response.md)
|
|
3085
|
-
|
|
3086
|
-
### Authorization
|
|
3087
|
-
|
|
3088
|
-
No authorization required
|
|
3089
|
-
|
|
3090
|
-
### HTTP request headers
|
|
3091
|
-
|
|
3092
|
-
- **Content-Type**: `application/json`
|
|
3093
|
-
- **Accept**: `application/json`
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
### HTTP response details
|
|
3097
|
-
| Status code | Description | Response headers |
|
|
3098
|
-
|-------------|-------------|------------------|
|
|
3099
|
-
| **200** | Watch Address response (WebSocket data event) | - |
|
|
3100
|
-
|
|
3101
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
## watchOrderBook
|
|
3105
|
-
|
|
3106
|
-
> FetchOrderBook200Response watchOrderBook(exchange, watchOrderBookRequest)
|
|
3107
|
-
|
|
3108
|
-
Watch Order Book (WebSocket)
|
|
3109
|
-
|
|
3110
|
-
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
|
-
|
|
3112
|
-
### Example
|
|
3113
|
-
|
|
3114
|
-
```ts
|
|
3115
|
-
import {
|
|
3116
|
-
Configuration,
|
|
3117
|
-
DefaultApi,
|
|
3118
|
-
} from 'pmxtjs';
|
|
3119
|
-
import type { WatchOrderBookOperationRequest } from 'pmxtjs';
|
|
3120
|
-
|
|
3121
|
-
async function example() {
|
|
3122
|
-
console.log("🚀 Testing pmxtjs SDK...");
|
|
3123
|
-
const api = new DefaultApi();
|
|
3124
|
-
|
|
3125
|
-
const body = {
|
|
3126
|
-
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
3127
|
-
exchange: exchange_example,
|
|
3128
|
-
// WatchOrderBookRequest (optional)
|
|
3129
|
-
watchOrderBookRequest: ...,
|
|
3130
|
-
} satisfies WatchOrderBookOperationRequest;
|
|
3131
|
-
|
|
3132
|
-
try {
|
|
3133
|
-
const data = await api.watchOrderBook(body);
|
|
3134
|
-
console.log(data);
|
|
3135
|
-
} catch (error) {
|
|
3136
|
-
console.error(error);
|
|
3137
|
-
}
|
|
3138
|
-
}
|
|
3139
|
-
|
|
3140
|
-
// Run the test
|
|
3141
|
-
example().catch(console.error);
|
|
3142
|
-
```
|
|
3143
|
-
|
|
3144
|
-
### Parameters
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
| Name | Type | Description | Notes |
|
|
3148
|
-
|------------- | ------------- | ------------- | -------------|
|
|
3149
|
-
| **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
|
-
|
|
3152
|
-
### Return type
|
|
3153
|
-
|
|
3154
|
-
[**FetchOrderBook200Response**](FetchOrderBook200Response.md)
|
|
3155
|
-
|
|
3156
|
-
### Authorization
|
|
3157
|
-
|
|
3158
|
-
No authorization required
|
|
3159
|
-
|
|
3160
|
-
### HTTP request headers
|
|
3161
|
-
|
|
3162
|
-
- **Content-Type**: `application/json`
|
|
3163
|
-
- **Accept**: `application/json`
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
### HTTP response details
|
|
3167
|
-
| Status code | Description | Response headers |
|
|
3168
|
-
|-------------|-------------|------------------|
|
|
3169
|
-
| **200** | Watch Order Book response (WebSocket data event) | - |
|
|
3170
|
-
|
|
3171
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
## watchOrderBooks
|
|
3175
|
-
|
|
3176
|
-
> WatchOrderBooks200Response watchOrderBooks(exchange, watchOrderBooksRequest)
|
|
3177
|
-
|
|
3178
|
-
Watch Order Books (WebSocket)
|
|
3179
|
-
|
|
3180
|
-
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
|
-
|
|
3182
|
-
### Example
|
|
3183
|
-
|
|
3184
|
-
```ts
|
|
3185
|
-
import {
|
|
3186
|
-
Configuration,
|
|
3187
|
-
DefaultApi,
|
|
3188
|
-
} from 'pmxtjs';
|
|
3189
|
-
import type { WatchOrderBooksOperationRequest } from 'pmxtjs';
|
|
3190
|
-
|
|
3191
|
-
async function example() {
|
|
3192
|
-
console.log("🚀 Testing pmxtjs SDK...");
|
|
3193
|
-
const api = new DefaultApi();
|
|
3194
|
-
|
|
3195
|
-
const body = {
|
|
3196
|
-
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
3197
|
-
exchange: exchange_example,
|
|
3198
|
-
// WatchOrderBooksRequest (optional)
|
|
3199
|
-
watchOrderBooksRequest: ...,
|
|
3200
|
-
} satisfies WatchOrderBooksOperationRequest;
|
|
3201
|
-
|
|
3202
|
-
try {
|
|
3203
|
-
const data = await api.watchOrderBooks(body);
|
|
3204
|
-
console.log(data);
|
|
3205
|
-
} catch (error) {
|
|
3206
|
-
console.error(error);
|
|
3207
|
-
}
|
|
3208
|
-
}
|
|
3209
|
-
|
|
3210
|
-
// Run the test
|
|
3211
|
-
example().catch(console.error);
|
|
3212
|
-
```
|
|
3213
|
-
|
|
3214
|
-
### Parameters
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
| Name | Type | Description | Notes |
|
|
3218
|
-
|------------- | ------------- | ------------- | -------------|
|
|
3219
|
-
| **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
|
-
|
|
3222
|
-
### Return type
|
|
3223
|
-
|
|
3224
|
-
[**WatchOrderBooks200Response**](WatchOrderBooks200Response.md)
|
|
3225
|
-
|
|
3226
|
-
### Authorization
|
|
3227
|
-
|
|
3228
|
-
No authorization required
|
|
3229
|
-
|
|
3230
|
-
### HTTP request headers
|
|
3231
|
-
|
|
3232
|
-
- **Content-Type**: `application/json`
|
|
3233
|
-
- **Accept**: `application/json`
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
### HTTP response details
|
|
3237
|
-
| Status code | Description | Response headers |
|
|
3238
|
-
|-------------|-------------|------------------|
|
|
3239
|
-
| **200** | Watch Order Books response (WebSocket data event) | - |
|
|
3240
|
-
|
|
3241
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
## watchTrades
|
|
3245
|
-
|
|
3246
|
-
> FetchTrades200Response watchTrades(exchange, watchTradesRequest)
|
|
3247
|
-
|
|
3248
|
-
Watch Trades (WebSocket)
|
|
3249
|
-
|
|
3250
|
-
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
|
-
|
|
3252
|
-
### Example
|
|
3253
|
-
|
|
3254
|
-
```ts
|
|
3255
|
-
import {
|
|
3256
|
-
Configuration,
|
|
3257
|
-
DefaultApi,
|
|
3258
|
-
} from 'pmxtjs';
|
|
3259
|
-
import type { WatchTradesOperationRequest } from 'pmxtjs';
|
|
3260
|
-
|
|
3261
|
-
async function example() {
|
|
3262
|
-
console.log("🚀 Testing pmxtjs SDK...");
|
|
3263
|
-
const api = new DefaultApi();
|
|
3264
|
-
|
|
3265
|
-
const body = {
|
|
3266
|
-
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
3267
|
-
exchange: exchange_example,
|
|
3268
|
-
// WatchTradesRequest (optional)
|
|
3269
|
-
watchTradesRequest: ...,
|
|
3270
|
-
} satisfies WatchTradesOperationRequest;
|
|
3271
|
-
|
|
3272
|
-
try {
|
|
3273
|
-
const data = await api.watchTrades(body);
|
|
3274
|
-
console.log(data);
|
|
3275
|
-
} catch (error) {
|
|
3276
|
-
console.error(error);
|
|
3277
|
-
}
|
|
3278
|
-
}
|
|
3279
|
-
|
|
3280
|
-
// Run the test
|
|
3281
|
-
example().catch(console.error);
|
|
3282
|
-
```
|
|
3283
|
-
|
|
3284
|
-
### Parameters
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
| Name | Type | Description | Notes |
|
|
3288
|
-
|------------- | ------------- | ------------- | -------------|
|
|
3289
|
-
| **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
|
-
|
|
3292
|
-
### Return type
|
|
3293
|
-
|
|
3294
|
-
[**FetchTrades200Response**](FetchTrades200Response.md)
|
|
3295
|
-
|
|
3296
|
-
### Authorization
|
|
3297
|
-
|
|
3298
|
-
No authorization required
|
|
3299
|
-
|
|
3300
|
-
### HTTP request headers
|
|
3301
|
-
|
|
3302
|
-
- **Content-Type**: `application/json`
|
|
3303
|
-
- **Accept**: `application/json`
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
### HTTP response details
|
|
3307
|
-
| Status code | Description | Response headers |
|
|
3308
|
-
|-------------|-------------|------------------|
|
|
3309
|
-
| **200** | Watch Trades response (WebSocket data event) | - |
|
|
3310
|
-
|
|
3311
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3312
|
-
|