pmxtjs 2.34.2 → 2.35.0
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 +35 -1
- package/dist/esm/generated/src/apis/DefaultApi.js +55 -1
- package/dist/esm/generated/src/models/FetchEventsPaginated200Response.d.ts +46 -0
- package/dist/esm/generated/src/models/FetchEventsPaginated200Response.js +47 -0
- package/dist/esm/generated/src/models/PaginatedEventsResult.d.ts +45 -0
- package/dist/esm/generated/src/models/PaginatedEventsResult.js +50 -0
- package/dist/esm/generated/src/models/index.d.ts +2 -0
- package/dist/esm/generated/src/models/index.js +2 -0
- package/dist/esm/pmxt/client.d.ts +24 -1
- package/dist/esm/pmxt/client.js +418 -88
- package/dist/esm/pmxt/models.d.ts +11 -0
- package/dist/esm/pmxt/server-manager.js +16 -2
- package/dist/generated/src/apis/DefaultApi.d.ts +35 -1
- package/dist/generated/src/apis/DefaultApi.js +56 -2
- package/dist/generated/src/models/FetchEventsPaginated200Response.d.ts +46 -0
- package/dist/generated/src/models/FetchEventsPaginated200Response.js +54 -0
- package/dist/generated/src/models/PaginatedEventsResult.d.ts +45 -0
- package/dist/generated/src/models/PaginatedEventsResult.js +57 -0
- package/dist/generated/src/models/index.d.ts +2 -0
- package/dist/generated/src/models/index.js +2 -0
- package/dist/pmxt/client.d.ts +24 -1
- package/dist/pmxt/client.js +418 -88
- package/dist/pmxt/models.d.ts +11 -0
- package/dist/pmxt/server-manager.js +16 -2
- package/generated/.openapi-generator/FILES +4 -0
- package/generated/docs/DefaultApi.md +77 -0
- package/generated/docs/FetchEventsPaginated200Response.md +38 -0
- package/generated/docs/PaginatedEventsResult.md +39 -0
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +79 -0
- package/generated/src/models/FetchEventsPaginated200Response.ts +96 -0
- package/generated/src/models/PaginatedEventsResult.ts +91 -0
- package/generated/src/models/index.ts +2 -0
- package/package.json +2 -2
- package/pmxt/client.ts +394 -88
- package/pmxt/models.ts +14 -0
- package/pmxt/server-manager.ts +15 -2
package/dist/pmxt/models.d.ts
CHANGED
|
@@ -155,6 +155,17 @@ export interface PaginatedMarketsResult {
|
|
|
155
155
|
/** Cursor for the next page (pass to fetchMarketsPaginated) */
|
|
156
156
|
nextCursor?: string;
|
|
157
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Result of a paginated event fetch.
|
|
160
|
+
*/
|
|
161
|
+
export interface PaginatedEventsResult {
|
|
162
|
+
/** The events for this page */
|
|
163
|
+
data: UnifiedEvent[];
|
|
164
|
+
/** Total number of events (if available) */
|
|
165
|
+
total?: number;
|
|
166
|
+
/** Cursor for the next page (pass to fetchEventsPaginated) */
|
|
167
|
+
nextCursor?: string;
|
|
168
|
+
}
|
|
158
169
|
/**
|
|
159
170
|
* A historical trade.
|
|
160
171
|
*/
|
|
@@ -341,11 +341,25 @@ class ServerManager {
|
|
|
341
341
|
if (info && info.pid) {
|
|
342
342
|
try {
|
|
343
343
|
process.kill(info.pid, 'SIGTERM');
|
|
344
|
-
// Brief wait
|
|
345
344
|
await new Promise(resolve => setTimeout(resolve, 500));
|
|
346
345
|
}
|
|
347
346
|
catch {
|
|
348
|
-
//
|
|
347
|
+
// Process already dead — fall through to lock cleanup
|
|
348
|
+
}
|
|
349
|
+
// Verify the process is actually dead; escalate to SIGKILL if not
|
|
350
|
+
try {
|
|
351
|
+
process.kill(info.pid, 0); // throws if dead
|
|
352
|
+
// Still alive — force kill
|
|
353
|
+
try {
|
|
354
|
+
process.kill(info.pid, 'SIGKILL');
|
|
355
|
+
await new Promise(resolve => setTimeout(resolve, 200));
|
|
356
|
+
}
|
|
357
|
+
catch {
|
|
358
|
+
// Ignore — SIGKILL may race with natural exit
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
catch {
|
|
362
|
+
// Process is dead — good
|
|
349
363
|
}
|
|
350
364
|
}
|
|
351
365
|
// Remove lock file (best effort)
|
|
@@ -34,6 +34,7 @@ docs/FetchEvent200Response.md
|
|
|
34
34
|
docs/FetchEventMatches200Response.md
|
|
35
35
|
docs/FetchEventMatchesParams.md
|
|
36
36
|
docs/FetchEvents200Response.md
|
|
37
|
+
docs/FetchEventsPaginated200Response.md
|
|
37
38
|
docs/FetchMarket200Response.md
|
|
38
39
|
docs/FetchMarketMatches200Response.md
|
|
39
40
|
docs/FetchMarketMatchesParams.md
|
|
@@ -74,6 +75,7 @@ docs/Order.md
|
|
|
74
75
|
docs/OrderBook.md
|
|
75
76
|
docs/OrderHistoryParams.md
|
|
76
77
|
docs/OrderLevel.md
|
|
78
|
+
docs/PaginatedEventsResult.md
|
|
77
79
|
docs/PaginatedMarketsResult.md
|
|
78
80
|
docs/Position.md
|
|
79
81
|
docs/PriceCandle.md
|
|
@@ -127,6 +129,7 @@ src/models/FetchEvent200Response.ts
|
|
|
127
129
|
src/models/FetchEventMatches200Response.ts
|
|
128
130
|
src/models/FetchEventMatchesParams.ts
|
|
129
131
|
src/models/FetchEvents200Response.ts
|
|
132
|
+
src/models/FetchEventsPaginated200Response.ts
|
|
130
133
|
src/models/FetchMarket200Response.ts
|
|
131
134
|
src/models/FetchMarketMatches200Response.ts
|
|
132
135
|
src/models/FetchMarketMatchesParams.ts
|
|
@@ -167,6 +170,7 @@ src/models/Order.ts
|
|
|
167
170
|
src/models/OrderBook.ts
|
|
168
171
|
src/models/OrderHistoryParams.ts
|
|
169
172
|
src/models/OrderLevel.ts
|
|
173
|
+
src/models/PaginatedEventsResult.ts
|
|
170
174
|
src/models/PaginatedMarketsResult.ts
|
|
171
175
|
src/models/Position.ts
|
|
172
176
|
src/models/PriceCandle.ts
|
|
@@ -16,6 +16,7 @@ All URIs are relative to *http://localhost:3847*
|
|
|
16
16
|
| [**fetchEvent**](DefaultApi.md#fetchevent) | **GET** /api/{exchange}/fetchEvent | Fetch Event |
|
|
17
17
|
| [**fetchEventMatches**](DefaultApi.md#fetcheventmatches) | **GET** /api/{exchange}/fetchEventMatches | Find Similar Events |
|
|
18
18
|
| [**fetchEvents**](DefaultApi.md#fetchevents) | **GET** /api/{exchange}/fetchEvents | Fetch Events |
|
|
19
|
+
| [**fetchEventsPaginated**](DefaultApi.md#fetcheventspaginated) | **GET** /api/{exchange}/fetchEventsPaginated | Fetch Events Paginated |
|
|
19
20
|
| [**fetchHedges**](DefaultApi.md#fetchhedges) | **GET** /api/{exchange}/fetchHedges | Find Hedging Opportunities |
|
|
20
21
|
| [**fetchMarket**](DefaultApi.md#fetchmarket) | **GET** /api/{exchange}/fetchMarket | Fetch Market |
|
|
21
22
|
| [**fetchMarketMatches**](DefaultApi.md#fetchmarketmatches) | **GET** /api/{exchange}/fetchMarketMatches | Find Similar Markets |
|
|
@@ -991,6 +992,82 @@ No authorization required
|
|
|
991
992
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
992
993
|
|
|
993
994
|
|
|
995
|
+
## fetchEventsPaginated
|
|
996
|
+
|
|
997
|
+
> FetchEventsPaginated200Response fetchEventsPaginated(exchange, limit, cursor, filter)
|
|
998
|
+
|
|
999
|
+
Fetch Events Paginated
|
|
1000
|
+
|
|
1001
|
+
Paginated variant of {@link fetchEvents}. On the first call (no `cursor`), all events are fetched from the exchange and cached in an in-memory snapshot. A cursor is returned along with the first page. Subsequent calls with that cursor serve additional pages directly from the cached snapshot -- no additional API calls are made. The snapshot is invalidated after `snapshotTTL` ms (configured via `ExchangeOptions` in the constructor). A request using a cursor from an expired snapshot throws `\'Cursor has expired\'`.
|
|
1002
|
+
|
|
1003
|
+
### Example
|
|
1004
|
+
|
|
1005
|
+
```ts
|
|
1006
|
+
import {
|
|
1007
|
+
Configuration,
|
|
1008
|
+
DefaultApi,
|
|
1009
|
+
} from 'pmxtjs';
|
|
1010
|
+
import type { FetchEventsPaginatedRequest } from 'pmxtjs';
|
|
1011
|
+
|
|
1012
|
+
async function example() {
|
|
1013
|
+
console.log("🚀 Testing pmxtjs SDK...");
|
|
1014
|
+
const api = new DefaultApi();
|
|
1015
|
+
|
|
1016
|
+
const body = {
|
|
1017
|
+
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
1018
|
+
exchange: exchange_example,
|
|
1019
|
+
// number (optional)
|
|
1020
|
+
limit: 8.14,
|
|
1021
|
+
// string (optional)
|
|
1022
|
+
cursor: cursor_example,
|
|
1023
|
+
// EventFilterCriteria (optional)
|
|
1024
|
+
filter: ...,
|
|
1025
|
+
} satisfies FetchEventsPaginatedRequest;
|
|
1026
|
+
|
|
1027
|
+
try {
|
|
1028
|
+
const data = await api.fetchEventsPaginated(body);
|
|
1029
|
+
console.log(data);
|
|
1030
|
+
} catch (error) {
|
|
1031
|
+
console.error(error);
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
// Run the test
|
|
1036
|
+
example().catch(console.error);
|
|
1037
|
+
```
|
|
1038
|
+
|
|
1039
|
+
### Parameters
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
| Name | Type | Description | Notes |
|
|
1043
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1044
|
+
| **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] |
|
|
1045
|
+
| **limit** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
1046
|
+
| **cursor** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
1047
|
+
| **filter** | [](.md) | | [Optional] [Defaults to `undefined`] |
|
|
1048
|
+
|
|
1049
|
+
### Return type
|
|
1050
|
+
|
|
1051
|
+
[**FetchEventsPaginated200Response**](FetchEventsPaginated200Response.md)
|
|
1052
|
+
|
|
1053
|
+
### Authorization
|
|
1054
|
+
|
|
1055
|
+
No authorization required
|
|
1056
|
+
|
|
1057
|
+
### HTTP request headers
|
|
1058
|
+
|
|
1059
|
+
- **Content-Type**: Not defined
|
|
1060
|
+
- **Accept**: `application/json`
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
### HTTP response details
|
|
1064
|
+
| Status code | Description | Response headers |
|
|
1065
|
+
|-------------|-------------|------------------|
|
|
1066
|
+
| **200** | Fetch Events Paginated response | - |
|
|
1067
|
+
|
|
1068
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1069
|
+
|
|
1070
|
+
|
|
994
1071
|
## fetchHedges
|
|
995
1072
|
|
|
996
1073
|
> CompareMarketPrices200Response fetchHedges(exchange, market, marketId, slug, url, relation, minConfidence, limit, includePrices)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# FetchEventsPaginated200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`success` | boolean
|
|
10
|
+
`error` | [ErrorDetail](ErrorDetail.md)
|
|
11
|
+
`data` | [PaginatedEventsResult](PaginatedEventsResult.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { FetchEventsPaginated200Response } 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 FetchEventsPaginated200Response
|
|
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 FetchEventsPaginated200Response
|
|
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,39 @@
|
|
|
1
|
+
|
|
2
|
+
# PaginatedEventsResult
|
|
3
|
+
|
|
4
|
+
Shape returned by fetchEventsPaginated
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`data` | [Array<UnifiedEvent>](UnifiedEvent.md)
|
|
11
|
+
`total` | number
|
|
12
|
+
`nextCursor` | string
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { PaginatedEventsResult } from 'pmxtjs'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"data": null,
|
|
22
|
+
"total": null,
|
|
23
|
+
"nextCursor": null,
|
|
24
|
+
} satisfies PaginatedEventsResult
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as PaginatedEventsResult
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
package/generated/package.json
CHANGED
|
@@ -30,6 +30,7 @@ import type {
|
|
|
30
30
|
FetchEvent200Response,
|
|
31
31
|
FetchEventMatches200Response,
|
|
32
32
|
FetchEvents200Response,
|
|
33
|
+
FetchEventsPaginated200Response,
|
|
33
34
|
FetchMarket200Response,
|
|
34
35
|
FetchMarketMatches200Response,
|
|
35
36
|
FetchMarkets200Response,
|
|
@@ -91,6 +92,8 @@ import {
|
|
|
91
92
|
FetchEventMatches200ResponseToJSON,
|
|
92
93
|
FetchEvents200ResponseFromJSON,
|
|
93
94
|
FetchEvents200ResponseToJSON,
|
|
95
|
+
FetchEventsPaginated200ResponseFromJSON,
|
|
96
|
+
FetchEventsPaginated200ResponseToJSON,
|
|
94
97
|
FetchMarket200ResponseFromJSON,
|
|
95
98
|
FetchMarket200ResponseToJSON,
|
|
96
99
|
FetchMarketMatches200ResponseFromJSON,
|
|
@@ -248,6 +251,13 @@ export interface FetchEventsRequest {
|
|
|
248
251
|
tags?: Array<string>;
|
|
249
252
|
}
|
|
250
253
|
|
|
254
|
+
export interface FetchEventsPaginatedRequest {
|
|
255
|
+
exchange: FetchEventsPaginatedExchangeEnum;
|
|
256
|
+
limit?: number;
|
|
257
|
+
cursor?: string;
|
|
258
|
+
filter?: EventFilterCriteria;
|
|
259
|
+
}
|
|
260
|
+
|
|
251
261
|
export interface FetchHedgesRequest {
|
|
252
262
|
exchange: FetchHedgesExchangeEnum;
|
|
253
263
|
market?: UnifiedMarket;
|
|
@@ -1085,6 +1095,57 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1085
1095
|
return await response.value();
|
|
1086
1096
|
}
|
|
1087
1097
|
|
|
1098
|
+
/**
|
|
1099
|
+
* Paginated variant of {@link fetchEvents}. On the first call (no `cursor`), all events are fetched from the exchange and cached in an in-memory snapshot. A cursor is returned along with the first page. Subsequent calls with that cursor serve additional pages directly from the cached snapshot -- no additional API calls are made. The snapshot is invalidated after `snapshotTTL` ms (configured via `ExchangeOptions` in the constructor). A request using a cursor from an expired snapshot throws `\'Cursor has expired\'`.
|
|
1100
|
+
* Fetch Events Paginated
|
|
1101
|
+
*/
|
|
1102
|
+
async fetchEventsPaginatedRaw(requestParameters: FetchEventsPaginatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchEventsPaginated200Response>> {
|
|
1103
|
+
if (requestParameters['exchange'] == null) {
|
|
1104
|
+
throw new runtime.RequiredError(
|
|
1105
|
+
'exchange',
|
|
1106
|
+
'Required parameter "exchange" was null or undefined when calling fetchEventsPaginated().'
|
|
1107
|
+
);
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
const queryParameters: any = {};
|
|
1111
|
+
|
|
1112
|
+
if (requestParameters['limit'] != null) {
|
|
1113
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
if (requestParameters['cursor'] != null) {
|
|
1117
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
if (requestParameters['filter'] != null) {
|
|
1121
|
+
queryParameters['filter'] = requestParameters['filter'];
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
let urlPath = `/api/{exchange}/fetchEventsPaginated`;
|
|
1128
|
+
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
1129
|
+
|
|
1130
|
+
const response = await this.request({
|
|
1131
|
+
path: urlPath,
|
|
1132
|
+
method: 'GET',
|
|
1133
|
+
headers: headerParameters,
|
|
1134
|
+
query: queryParameters,
|
|
1135
|
+
}, initOverrides);
|
|
1136
|
+
|
|
1137
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FetchEventsPaginated200ResponseFromJSON(jsonValue));
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
/**
|
|
1141
|
+
* Paginated variant of {@link fetchEvents}. On the first call (no `cursor`), all events are fetched from the exchange and cached in an in-memory snapshot. A cursor is returned along with the first page. Subsequent calls with that cursor serve additional pages directly from the cached snapshot -- no additional API calls are made. The snapshot is invalidated after `snapshotTTL` ms (configured via `ExchangeOptions` in the constructor). A request using a cursor from an expired snapshot throws `\'Cursor has expired\'`.
|
|
1142
|
+
* Fetch Events Paginated
|
|
1143
|
+
*/
|
|
1144
|
+
async fetchEventsPaginated(requestParameters: FetchEventsPaginatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchEventsPaginated200Response> {
|
|
1145
|
+
const response = await this.fetchEventsPaginatedRaw(requestParameters, initOverrides);
|
|
1146
|
+
return await response.value();
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1088
1149
|
/**
|
|
1089
1150
|
* Find hedging opportunities across venues. Discovers subset/superset market relationships where one market\'s outcome implies another, enabling cross-venue hedging strategies with live prices.
|
|
1090
1151
|
* Find Hedging Opportunities
|
|
@@ -2685,6 +2746,24 @@ export const FetchEventsSearchInEnum = {
|
|
|
2685
2746
|
Both: 'both'
|
|
2686
2747
|
} as const;
|
|
2687
2748
|
export type FetchEventsSearchInEnum = typeof FetchEventsSearchInEnum[keyof typeof FetchEventsSearchInEnum];
|
|
2749
|
+
/**
|
|
2750
|
+
* @export
|
|
2751
|
+
*/
|
|
2752
|
+
export const FetchEventsPaginatedExchangeEnum = {
|
|
2753
|
+
Polymarket: 'polymarket',
|
|
2754
|
+
Kalshi: 'kalshi',
|
|
2755
|
+
KalshiDemo: 'kalshi-demo',
|
|
2756
|
+
Limitless: 'limitless',
|
|
2757
|
+
Probable: 'probable',
|
|
2758
|
+
Baozi: 'baozi',
|
|
2759
|
+
Myriad: 'myriad',
|
|
2760
|
+
Opinion: 'opinion',
|
|
2761
|
+
Metaculus: 'metaculus',
|
|
2762
|
+
Smarkets: 'smarkets',
|
|
2763
|
+
PolymarketUs: 'polymarket_us',
|
|
2764
|
+
Router: 'router'
|
|
2765
|
+
} as const;
|
|
2766
|
+
export type FetchEventsPaginatedExchangeEnum = typeof FetchEventsPaginatedExchangeEnum[keyof typeof FetchEventsPaginatedExchangeEnum];
|
|
2688
2767
|
/**
|
|
2689
2768
|
* @export
|
|
2690
2769
|
*/
|
|
@@ -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 { PaginatedEventsResult } from './PaginatedEventsResult';
|
|
24
|
+
import {
|
|
25
|
+
PaginatedEventsResultFromJSON,
|
|
26
|
+
PaginatedEventsResultFromJSONTyped,
|
|
27
|
+
PaginatedEventsResultToJSON,
|
|
28
|
+
PaginatedEventsResultToJSONTyped,
|
|
29
|
+
} from './PaginatedEventsResult';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface FetchEventsPaginated200Response
|
|
35
|
+
*/
|
|
36
|
+
export interface FetchEventsPaginated200Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof FetchEventsPaginated200Response
|
|
41
|
+
*/
|
|
42
|
+
success?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {ErrorDetail}
|
|
46
|
+
* @memberof FetchEventsPaginated200Response
|
|
47
|
+
*/
|
|
48
|
+
error?: ErrorDetail;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {PaginatedEventsResult}
|
|
52
|
+
* @memberof FetchEventsPaginated200Response
|
|
53
|
+
*/
|
|
54
|
+
data?: PaginatedEventsResult;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the FetchEventsPaginated200Response interface.
|
|
59
|
+
*/
|
|
60
|
+
export function instanceOfFetchEventsPaginated200Response(value: object): value is FetchEventsPaginated200Response {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function FetchEventsPaginated200ResponseFromJSON(json: any): FetchEventsPaginated200Response {
|
|
65
|
+
return FetchEventsPaginated200ResponseFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function FetchEventsPaginated200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FetchEventsPaginated200Response {
|
|
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 : PaginatedEventsResultFromJSON(json['data']),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function FetchEventsPaginated200ResponseToJSON(json: any): FetchEventsPaginated200Response {
|
|
81
|
+
return FetchEventsPaginated200ResponseToJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function FetchEventsPaginated200ResponseToJSONTyped(value?: FetchEventsPaginated200Response | 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': PaginatedEventsResultToJSON(value['data']),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
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 { UnifiedEvent } from './UnifiedEvent';
|
|
17
|
+
import {
|
|
18
|
+
UnifiedEventFromJSON,
|
|
19
|
+
UnifiedEventFromJSONTyped,
|
|
20
|
+
UnifiedEventToJSON,
|
|
21
|
+
UnifiedEventToJSONTyped,
|
|
22
|
+
} from './UnifiedEvent';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Shape returned by fetchEventsPaginated
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PaginatedEventsResult
|
|
28
|
+
*/
|
|
29
|
+
export interface PaginatedEventsResult {
|
|
30
|
+
/**
|
|
31
|
+
* The page of unified events
|
|
32
|
+
* @type {Array<UnifiedEvent>}
|
|
33
|
+
* @memberof PaginatedEventsResult
|
|
34
|
+
*/
|
|
35
|
+
data: Array<UnifiedEvent>;
|
|
36
|
+
/**
|
|
37
|
+
* Total number of events in the snapshot
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof PaginatedEventsResult
|
|
40
|
+
*/
|
|
41
|
+
total: number;
|
|
42
|
+
/**
|
|
43
|
+
* Cursor to pass to the next call, or undefined if this is the last page
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof PaginatedEventsResult
|
|
46
|
+
*/
|
|
47
|
+
nextCursor?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the PaginatedEventsResult interface.
|
|
52
|
+
*/
|
|
53
|
+
export function instanceOfPaginatedEventsResult(value: object): value is PaginatedEventsResult {
|
|
54
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
55
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function PaginatedEventsResultFromJSON(json: any): PaginatedEventsResult {
|
|
60
|
+
return PaginatedEventsResultFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function PaginatedEventsResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEventsResult {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'data': ((json['data'] as Array<any>).map(UnifiedEventFromJSON)),
|
|
70
|
+
'total': json['total'],
|
|
71
|
+
'nextCursor': json['nextCursor'] == null ? undefined : json['nextCursor'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function PaginatedEventsResultToJSON(json: any): PaginatedEventsResult {
|
|
76
|
+
return PaginatedEventsResultToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function PaginatedEventsResultToJSONTyped(value?: PaginatedEventsResult | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'data': ((value['data'] as Array<any>).map(UnifiedEventToJSON)),
|
|
87
|
+
'total': value['total'],
|
|
88
|
+
'nextCursor': value['nextCursor'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
@@ -31,6 +31,7 @@ export * from './FetchEvent200Response';
|
|
|
31
31
|
export * from './FetchEventMatches200Response';
|
|
32
32
|
export * from './FetchEventMatchesParams';
|
|
33
33
|
export * from './FetchEvents200Response';
|
|
34
|
+
export * from './FetchEventsPaginated200Response';
|
|
34
35
|
export * from './FetchMarket200Response';
|
|
35
36
|
export * from './FetchMarketMatches200Response';
|
|
36
37
|
export * from './FetchMarketMatchesParams';
|
|
@@ -71,6 +72,7 @@ export * from './Order';
|
|
|
71
72
|
export * from './OrderBook';
|
|
72
73
|
export * from './OrderHistoryParams';
|
|
73
74
|
export * from './OrderLevel';
|
|
75
|
+
export * from './PaginatedEventsResult';
|
|
74
76
|
export * from './PaginatedMarketsResult';
|
|
75
77
|
export * from './Position';
|
|
76
78
|
export * from './PriceCandle';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmxtjs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.35.0",
|
|
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.
|
|
46
|
+
"pmxt-core": "2.35.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/jest": "^30.0.0",
|