pmxtjs 2.35.30 → 2.35.32
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 +33 -1
- package/dist/esm/generated/src/apis/DefaultApi.js +48 -1
- package/dist/esm/generated/src/models/WatchOrderBooks200Response.d.ts +48 -0
- package/dist/esm/generated/src/models/WatchOrderBooks200Response.js +48 -0
- package/dist/esm/generated/src/models/WatchOrderBooksRequest.d.ts +40 -0
- package/dist/esm/generated/src/models/WatchOrderBooksRequest.js +47 -0
- package/dist/esm/generated/src/models/WatchOrderBooksRequestArgsInner.d.ts +21 -0
- package/dist/esm/generated/src/models/WatchOrderBooksRequestArgsInner.js +47 -0
- package/dist/esm/generated/src/models/index.d.ts +3 -0
- package/dist/esm/generated/src/models/index.js +3 -0
- package/dist/esm/pmxt/client.d.ts +42 -0
- package/dist/esm/pmxt/client.js +149 -4
- package/dist/esm/pmxt/ws-client.d.ts +37 -0
- package/dist/esm/pmxt/ws-client.js +272 -0
- package/dist/generated/src/apis/DefaultApi.d.ts +33 -1
- package/dist/generated/src/apis/DefaultApi.js +48 -1
- package/dist/generated/src/models/WatchOrderBooks200Response.d.ts +48 -0
- package/dist/generated/src/models/WatchOrderBooks200Response.js +55 -0
- package/dist/generated/src/models/WatchOrderBooksRequest.d.ts +40 -0
- package/dist/generated/src/models/WatchOrderBooksRequest.js +54 -0
- package/dist/generated/src/models/WatchOrderBooksRequestArgsInner.d.ts +21 -0
- package/dist/generated/src/models/WatchOrderBooksRequestArgsInner.js +53 -0
- package/dist/generated/src/models/index.d.ts +3 -0
- package/dist/generated/src/models/index.js +3 -0
- package/dist/pmxt/client.d.ts +42 -0
- package/dist/pmxt/client.js +149 -4
- package/dist/pmxt/ws-client.d.ts +37 -0
- package/dist/pmxt/ws-client.js +276 -0
- package/generated/.openapi-generator/FILES +6 -0
- package/generated/docs/DefaultApi.md +71 -0
- package/generated/docs/WatchOrderBooks200Response.md +38 -0
- package/generated/docs/WatchOrderBooksRequest.md +36 -0
- package/generated/docs/WatchOrderBooksRequestArgsInner.md +32 -0
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +71 -0
- package/generated/src/models/WatchOrderBooks200Response.ts +96 -0
- package/generated/src/models/WatchOrderBooksRequest.ts +89 -0
- package/generated/src/models/WatchOrderBooksRequestArgsInner.ts +59 -0
- package/generated/src/models/index.ts +3 -0
- package/package.json +2 -2
- package/pmxt/client.ts +181 -8
- package/pmxt/ws-client.ts +347 -0
|
@@ -43,6 +43,7 @@ All URIs are relative to *http://localhost:3847*
|
|
|
43
43
|
| [**unwatchOrderBook**](DefaultApi.md#unwatchorderbookoperation) | **POST** /api/{exchange}/unwatchOrderBook | Unwatch Order Book |
|
|
44
44
|
| [**watchAddress**](DefaultApi.md#watchaddressoperation) | **POST** /api/{exchange}/watchAddress | Watch Address |
|
|
45
45
|
| [**watchOrderBook**](DefaultApi.md#watchorderbookoperation) | **POST** /api/{exchange}/watchOrderBook | Watch Order Book |
|
|
46
|
+
| [**watchOrderBooks**](DefaultApi.md#watchorderbooksoperation) | **POST** /api/{exchange}/watchOrderBooks | Watch Order Books |
|
|
46
47
|
| [**watchTrades**](DefaultApi.md#watchtradesoperation) | **POST** /api/{exchange}/watchTrades | Watch Trades |
|
|
47
48
|
|
|
48
49
|
|
|
@@ -3098,6 +3099,76 @@ No authorization required
|
|
|
3098
3099
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3099
3100
|
|
|
3100
3101
|
|
|
3102
|
+
## watchOrderBooks
|
|
3103
|
+
|
|
3104
|
+
> WatchOrderBooks200Response watchOrderBooks(exchange, watchOrderBooksRequest)
|
|
3105
|
+
|
|
3106
|
+
Watch Order Books
|
|
3107
|
+
|
|
3108
|
+
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.
|
|
3109
|
+
|
|
3110
|
+
### Example
|
|
3111
|
+
|
|
3112
|
+
```ts
|
|
3113
|
+
import {
|
|
3114
|
+
Configuration,
|
|
3115
|
+
DefaultApi,
|
|
3116
|
+
} from 'pmxtjs';
|
|
3117
|
+
import type { WatchOrderBooksOperationRequest } from 'pmxtjs';
|
|
3118
|
+
|
|
3119
|
+
async function example() {
|
|
3120
|
+
console.log("🚀 Testing pmxtjs SDK...");
|
|
3121
|
+
const api = new DefaultApi();
|
|
3122
|
+
|
|
3123
|
+
const body = {
|
|
3124
|
+
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
3125
|
+
exchange: exchange_example,
|
|
3126
|
+
// WatchOrderBooksRequest (optional)
|
|
3127
|
+
watchOrderBooksRequest: ...,
|
|
3128
|
+
} satisfies WatchOrderBooksOperationRequest;
|
|
3129
|
+
|
|
3130
|
+
try {
|
|
3131
|
+
const data = await api.watchOrderBooks(body);
|
|
3132
|
+
console.log(data);
|
|
3133
|
+
} catch (error) {
|
|
3134
|
+
console.error(error);
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
|
|
3138
|
+
// Run the test
|
|
3139
|
+
example().catch(console.error);
|
|
3140
|
+
```
|
|
3141
|
+
|
|
3142
|
+
### Parameters
|
|
3143
|
+
|
|
3144
|
+
|
|
3145
|
+
| Name | Type | Description | Notes |
|
|
3146
|
+
|------------- | ------------- | ------------- | -------------|
|
|
3147
|
+
| **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] |
|
|
3148
|
+
| **watchOrderBooksRequest** | [WatchOrderBooksRequest](WatchOrderBooksRequest.md) | | [Optional] |
|
|
3149
|
+
|
|
3150
|
+
### Return type
|
|
3151
|
+
|
|
3152
|
+
[**WatchOrderBooks200Response**](WatchOrderBooks200Response.md)
|
|
3153
|
+
|
|
3154
|
+
### Authorization
|
|
3155
|
+
|
|
3156
|
+
No authorization required
|
|
3157
|
+
|
|
3158
|
+
### HTTP request headers
|
|
3159
|
+
|
|
3160
|
+
- **Content-Type**: `application/json`
|
|
3161
|
+
- **Accept**: `application/json`
|
|
3162
|
+
|
|
3163
|
+
|
|
3164
|
+
### HTTP response details
|
|
3165
|
+
| Status code | Description | Response headers |
|
|
3166
|
+
|-------------|-------------|------------------|
|
|
3167
|
+
| **200** | Watch Order Books response | - |
|
|
3168
|
+
|
|
3169
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3170
|
+
|
|
3171
|
+
|
|
3101
3172
|
## watchTrades
|
|
3102
3173
|
|
|
3103
3174
|
> FetchTrades200Response watchTrades(exchange, watchTradesRequest)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# WatchOrderBooks200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`success` | boolean
|
|
10
|
+
`error` | [ErrorDetail](ErrorDetail.md)
|
|
11
|
+
`data` | [{ [key: string]: OrderBook; }](OrderBook.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { WatchOrderBooks200Response } from 'pmxtjs'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"success": true,
|
|
21
|
+
"error": null,
|
|
22
|
+
"data": null,
|
|
23
|
+
} satisfies WatchOrderBooks200Response
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as WatchOrderBooks200Response
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# WatchOrderBooksRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`args` | [Array<WatchOrderBooksRequestArgsInner>](WatchOrderBooksRequestArgsInner.md)
|
|
10
|
+
`credentials` | [ExchangeCredentials](ExchangeCredentials.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { WatchOrderBooksRequest } from 'pmxtjs'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"args": null,
|
|
20
|
+
"credentials": null,
|
|
21
|
+
} satisfies WatchOrderBooksRequest
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as WatchOrderBooksRequest
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
# WatchOrderBooksRequestArgsInner
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import type { WatchOrderBooksRequestArgsInner } from 'pmxtjs'
|
|
14
|
+
|
|
15
|
+
// TODO: Update the object below with actual values
|
|
16
|
+
const example = {
|
|
17
|
+
} satisfies WatchOrderBooksRequestArgsInner
|
|
18
|
+
|
|
19
|
+
console.log(example)
|
|
20
|
+
|
|
21
|
+
// Convert the instance to a JSON string
|
|
22
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
23
|
+
console.log(exampleJSON)
|
|
24
|
+
|
|
25
|
+
// Parse the JSON string back to an object
|
|
26
|
+
const exampleParsed = JSON.parse(exampleJSON) as WatchOrderBooksRequestArgsInner
|
|
27
|
+
console.log(exampleParsed)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
31
|
+
|
|
32
|
+
|
package/generated/package.json
CHANGED
|
@@ -60,6 +60,8 @@ import type {
|
|
|
60
60
|
WatchAddress200Response,
|
|
61
61
|
WatchAddressRequest,
|
|
62
62
|
WatchOrderBookRequest,
|
|
63
|
+
WatchOrderBooks200Response,
|
|
64
|
+
WatchOrderBooksRequest,
|
|
63
65
|
WatchTradesRequest,
|
|
64
66
|
} from '../models/index';
|
|
65
67
|
import {
|
|
@@ -153,6 +155,10 @@ import {
|
|
|
153
155
|
WatchAddressRequestToJSON,
|
|
154
156
|
WatchOrderBookRequestFromJSON,
|
|
155
157
|
WatchOrderBookRequestToJSON,
|
|
158
|
+
WatchOrderBooks200ResponseFromJSON,
|
|
159
|
+
WatchOrderBooks200ResponseToJSON,
|
|
160
|
+
WatchOrderBooksRequestFromJSON,
|
|
161
|
+
WatchOrderBooksRequestToJSON,
|
|
156
162
|
WatchTradesRequestFromJSON,
|
|
157
163
|
WatchTradesRequestToJSON,
|
|
158
164
|
} from '../models/index';
|
|
@@ -463,6 +469,11 @@ export interface WatchOrderBookOperationRequest {
|
|
|
463
469
|
watchOrderBookRequest?: WatchOrderBookRequest;
|
|
464
470
|
}
|
|
465
471
|
|
|
472
|
+
export interface WatchOrderBooksOperationRequest {
|
|
473
|
+
exchange: WatchOrderBooksOperationExchangeEnum;
|
|
474
|
+
watchOrderBooksRequest?: WatchOrderBooksRequest;
|
|
475
|
+
}
|
|
476
|
+
|
|
466
477
|
export interface WatchTradesOperationRequest {
|
|
467
478
|
exchange: WatchTradesOperationExchangeEnum;
|
|
468
479
|
watchTradesRequest?: WatchTradesRequest;
|
|
@@ -2607,6 +2618,48 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
2607
2618
|
return await response.value();
|
|
2608
2619
|
}
|
|
2609
2620
|
|
|
2621
|
+
/**
|
|
2622
|
+
* 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.
|
|
2623
|
+
* Watch Order Books
|
|
2624
|
+
*/
|
|
2625
|
+
async watchOrderBooksRaw(requestParameters: WatchOrderBooksOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WatchOrderBooks200Response>> {
|
|
2626
|
+
if (requestParameters['exchange'] == null) {
|
|
2627
|
+
throw new runtime.RequiredError(
|
|
2628
|
+
'exchange',
|
|
2629
|
+
'Required parameter "exchange" was null or undefined when calling watchOrderBooks().'
|
|
2630
|
+
);
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
const queryParameters: any = {};
|
|
2634
|
+
|
|
2635
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2636
|
+
|
|
2637
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2638
|
+
|
|
2639
|
+
|
|
2640
|
+
let urlPath = `/api/{exchange}/watchOrderBooks`;
|
|
2641
|
+
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
2642
|
+
|
|
2643
|
+
const response = await this.request({
|
|
2644
|
+
path: urlPath,
|
|
2645
|
+
method: 'POST',
|
|
2646
|
+
headers: headerParameters,
|
|
2647
|
+
query: queryParameters,
|
|
2648
|
+
body: WatchOrderBooksRequestToJSON(requestParameters['watchOrderBooksRequest']),
|
|
2649
|
+
}, initOverrides);
|
|
2650
|
+
|
|
2651
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WatchOrderBooks200ResponseFromJSON(jsonValue));
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
/**
|
|
2655
|
+
* 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.
|
|
2656
|
+
* Watch Order Books
|
|
2657
|
+
*/
|
|
2658
|
+
async watchOrderBooks(requestParameters: WatchOrderBooksOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WatchOrderBooks200Response> {
|
|
2659
|
+
const response = await this.watchOrderBooksRaw(requestParameters, initOverrides);
|
|
2660
|
+
return await response.value();
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2610
2663
|
/**
|
|
2611
2664
|
* 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).
|
|
2612
2665
|
* Watch Trades
|
|
@@ -3551,6 +3604,24 @@ export const WatchOrderBookOperationExchangeEnum = {
|
|
|
3551
3604
|
Router: 'router'
|
|
3552
3605
|
} as const;
|
|
3553
3606
|
export type WatchOrderBookOperationExchangeEnum = typeof WatchOrderBookOperationExchangeEnum[keyof typeof WatchOrderBookOperationExchangeEnum];
|
|
3607
|
+
/**
|
|
3608
|
+
* @export
|
|
3609
|
+
*/
|
|
3610
|
+
export const WatchOrderBooksOperationExchangeEnum = {
|
|
3611
|
+
Polymarket: 'polymarket',
|
|
3612
|
+
Kalshi: 'kalshi',
|
|
3613
|
+
KalshiDemo: 'kalshi-demo',
|
|
3614
|
+
Limitless: 'limitless',
|
|
3615
|
+
Probable: 'probable',
|
|
3616
|
+
Baozi: 'baozi',
|
|
3617
|
+
Myriad: 'myriad',
|
|
3618
|
+
Opinion: 'opinion',
|
|
3619
|
+
Metaculus: 'metaculus',
|
|
3620
|
+
Smarkets: 'smarkets',
|
|
3621
|
+
PolymarketUs: 'polymarket_us',
|
|
3622
|
+
Router: 'router'
|
|
3623
|
+
} as const;
|
|
3624
|
+
export type WatchOrderBooksOperationExchangeEnum = typeof WatchOrderBooksOperationExchangeEnum[keyof typeof WatchOrderBooksOperationExchangeEnum];
|
|
3554
3625
|
/**
|
|
3555
3626
|
* @export
|
|
3556
3627
|
*/
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* PMXT Sidecar API
|
|
5
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.4.4
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ErrorDetail } from './ErrorDetail';
|
|
17
|
+
import {
|
|
18
|
+
ErrorDetailFromJSON,
|
|
19
|
+
ErrorDetailFromJSONTyped,
|
|
20
|
+
ErrorDetailToJSON,
|
|
21
|
+
ErrorDetailToJSONTyped,
|
|
22
|
+
} from './ErrorDetail';
|
|
23
|
+
import type { OrderBook } from './OrderBook';
|
|
24
|
+
import {
|
|
25
|
+
OrderBookFromJSON,
|
|
26
|
+
OrderBookFromJSONTyped,
|
|
27
|
+
OrderBookToJSON,
|
|
28
|
+
OrderBookToJSONTyped,
|
|
29
|
+
} from './OrderBook';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface WatchOrderBooks200Response
|
|
35
|
+
*/
|
|
36
|
+
export interface WatchOrderBooks200Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof WatchOrderBooks200Response
|
|
41
|
+
*/
|
|
42
|
+
success?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {ErrorDetail}
|
|
46
|
+
* @memberof WatchOrderBooks200Response
|
|
47
|
+
*/
|
|
48
|
+
error?: ErrorDetail;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {{ [key: string]: OrderBook; }}
|
|
52
|
+
* @memberof WatchOrderBooks200Response
|
|
53
|
+
*/
|
|
54
|
+
data?: { [key: string]: OrderBook; };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the WatchOrderBooks200Response interface.
|
|
59
|
+
*/
|
|
60
|
+
export function instanceOfWatchOrderBooks200Response(value: object): value is WatchOrderBooks200Response {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function WatchOrderBooks200ResponseFromJSON(json: any): WatchOrderBooks200Response {
|
|
65
|
+
return WatchOrderBooks200ResponseFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function WatchOrderBooks200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchOrderBooks200Response {
|
|
69
|
+
if (json == null) {
|
|
70
|
+
return json;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'success': json['success'] == null ? undefined : json['success'],
|
|
75
|
+
'error': json['error'] == null ? undefined : ErrorDetailFromJSON(json['error']),
|
|
76
|
+
'data': json['data'] == null ? undefined : (mapValues(json['data'], OrderBookFromJSON)),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function WatchOrderBooks200ResponseToJSON(json: any): WatchOrderBooks200Response {
|
|
81
|
+
return WatchOrderBooks200ResponseToJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function WatchOrderBooks200ResponseToJSONTyped(value?: WatchOrderBooks200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
|
|
91
|
+
'success': value['success'],
|
|
92
|
+
'error': ErrorDetailToJSON(value['error']),
|
|
93
|
+
'data': value['data'] == null ? undefined : (mapValues(value['data'], OrderBookToJSON)),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* PMXT Sidecar API
|
|
5
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.4.4
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ExchangeCredentials } from './ExchangeCredentials';
|
|
17
|
+
import {
|
|
18
|
+
ExchangeCredentialsFromJSON,
|
|
19
|
+
ExchangeCredentialsFromJSONTyped,
|
|
20
|
+
ExchangeCredentialsToJSON,
|
|
21
|
+
ExchangeCredentialsToJSONTyped,
|
|
22
|
+
} from './ExchangeCredentials';
|
|
23
|
+
import type { WatchOrderBooksRequestArgsInner } from './WatchOrderBooksRequestArgsInner';
|
|
24
|
+
import {
|
|
25
|
+
WatchOrderBooksRequestArgsInnerFromJSON,
|
|
26
|
+
WatchOrderBooksRequestArgsInnerFromJSONTyped,
|
|
27
|
+
WatchOrderBooksRequestArgsInnerToJSON,
|
|
28
|
+
WatchOrderBooksRequestArgsInnerToJSONTyped,
|
|
29
|
+
} from './WatchOrderBooksRequestArgsInner';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface WatchOrderBooksRequest
|
|
35
|
+
*/
|
|
36
|
+
export interface WatchOrderBooksRequest {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<WatchOrderBooksRequestArgsInner>}
|
|
40
|
+
* @memberof WatchOrderBooksRequest
|
|
41
|
+
*/
|
|
42
|
+
args: Array<WatchOrderBooksRequestArgsInner>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {ExchangeCredentials}
|
|
46
|
+
* @memberof WatchOrderBooksRequest
|
|
47
|
+
*/
|
|
48
|
+
credentials?: ExchangeCredentials;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the WatchOrderBooksRequest interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfWatchOrderBooksRequest(value: object): value is WatchOrderBooksRequest {
|
|
55
|
+
if (!('args' in value) || value['args'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function WatchOrderBooksRequestFromJSON(json: any): WatchOrderBooksRequest {
|
|
60
|
+
return WatchOrderBooksRequestFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function WatchOrderBooksRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchOrderBooksRequest {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'args': ((json['args'] as Array<any>).map(WatchOrderBooksRequestArgsInnerFromJSON)),
|
|
70
|
+
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function WatchOrderBooksRequestToJSON(json: any): WatchOrderBooksRequest {
|
|
75
|
+
return WatchOrderBooksRequestToJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function WatchOrderBooksRequestToJSONTyped(value?: WatchOrderBooksRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
79
|
+
if (value == null) {
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
|
|
85
|
+
'args': ((value['args'] as Array<any>).map(WatchOrderBooksRequestArgsInnerToJSON)),
|
|
86
|
+
'credentials': ExchangeCredentialsToJSON(value['credentials']),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* PMXT Sidecar API
|
|
5
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.4.4
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @type WatchOrderBooksRequestArgsInner
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export type WatchOrderBooksRequestArgsInner = Array<string> | number;
|
|
21
|
+
|
|
22
|
+
export function WatchOrderBooksRequestArgsInnerFromJSON(json: any): WatchOrderBooksRequestArgsInner {
|
|
23
|
+
return WatchOrderBooksRequestArgsInnerFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function WatchOrderBooksRequestArgsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchOrderBooksRequestArgsInner {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
if (typeof json === 'number') {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
if (Array.isArray(json)) {
|
|
34
|
+
if (json.every(item => typeof item === 'string')) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return {} as any;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function WatchOrderBooksRequestArgsInnerToJSON(json: any): any {
|
|
42
|
+
return WatchOrderBooksRequestArgsInnerToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function WatchOrderBooksRequestArgsInnerToJSONTyped(value?: WatchOrderBooksRequestArgsInner | null, ignoreDiscriminator: boolean = false): any {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
if (typeof value === 'number') {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
if (Array.isArray(value)) {
|
|
53
|
+
if (value.every(item => typeof item === 'string')) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return {};
|
|
58
|
+
}
|
|
59
|
+
|
|
@@ -93,4 +93,7 @@ export * from './WatchAddressRequest';
|
|
|
93
93
|
export * from './WatchAddressRequestArgsInner';
|
|
94
94
|
export * from './WatchOrderBookRequest';
|
|
95
95
|
export * from './WatchOrderBookRequestArgsInner';
|
|
96
|
+
export * from './WatchOrderBooks200Response';
|
|
97
|
+
export * from './WatchOrderBooksRequest';
|
|
98
|
+
export * from './WatchOrderBooksRequestArgsInner';
|
|
96
99
|
export * from './WatchTradesRequest';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmxtjs",
|
|
3
|
-
"version": "2.35.
|
|
3
|
+
"version": "2.35.32",
|
|
4
4
|
"description": "Unified prediction market data API - The ccxt for prediction markets",
|
|
5
5
|
"author": "PMXT Contributors",
|
|
6
6
|
"repository": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"unified"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"pmxt-core": "2.35.
|
|
46
|
+
"pmxt-core": "2.35.32"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/jest": "^30.0.0",
|