pmxtjs 2.47.0 → 2.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/generated/src/apis/DefaultApi.d.ts +38 -1
- package/dist/esm/generated/src/apis/DefaultApi.js +56 -1
- package/dist/esm/generated/src/models/EventFetchParams.d.ts +6 -0
- package/dist/esm/generated/src/models/EventFetchParams.js +2 -0
- package/dist/esm/generated/src/models/FetchSeries200Response.d.ts +46 -0
- package/dist/esm/generated/src/models/FetchSeries200Response.js +47 -0
- package/dist/esm/generated/src/models/UnifiedSeries.d.ts +95 -0
- package/dist/esm/generated/src/models/UnifiedSeries.js +66 -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/index.d.ts +1 -0
- package/dist/esm/pmxt/client.d.ts +2 -1
- package/dist/esm/pmxt/client.js +32 -0
- package/dist/esm/pmxt/models.d.ts +47 -0
- package/dist/generated/src/apis/DefaultApi.d.ts +38 -1
- package/dist/generated/src/apis/DefaultApi.js +56 -1
- package/dist/generated/src/models/EventFetchParams.d.ts +6 -0
- package/dist/generated/src/models/EventFetchParams.js +2 -0
- package/dist/generated/src/models/FetchSeries200Response.d.ts +46 -0
- package/dist/generated/src/models/FetchSeries200Response.js +54 -0
- package/dist/generated/src/models/UnifiedSeries.d.ts +95 -0
- package/dist/generated/src/models/UnifiedSeries.js +73 -0
- package/dist/generated/src/models/index.d.ts +2 -0
- package/dist/generated/src/models/index.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/pmxt/client.d.ts +2 -1
- package/dist/pmxt/client.js +32 -0
- package/dist/pmxt/models.d.ts +47 -0
- package/generated/.openapi-generator/FILES +4 -0
- package/generated/docs/DefaultApi.md +76 -2
- package/generated/docs/EventFetchParams.md +2 -0
- package/generated/docs/FetchSeries200Response.md +38 -0
- package/generated/docs/UnifiedSeries.md +55 -0
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +78 -0
- package/generated/src/models/EventFetchParams.ts +8 -0
- package/generated/src/models/FetchSeries200Response.ts +96 -0
- package/generated/src/models/UnifiedSeries.ts +155 -0
- package/generated/src/models/index.ts +2 -0
- package/index.ts +1 -0
- package/package.json +2 -2
- package/pmxt/client.ts +32 -0
- package/pmxt/models.ts +59 -0
|
@@ -64,6 +64,7 @@ docs/FetchOrderBookParams.md
|
|
|
64
64
|
docs/FetchOrderBooks200Response.md
|
|
65
65
|
docs/FetchOrderBooksRequest.md
|
|
66
66
|
docs/FetchPositions200Response.md
|
|
67
|
+
docs/FetchSeries200Response.md
|
|
67
68
|
docs/FetchTrades200Response.md
|
|
68
69
|
docs/FilterEventsRequest.md
|
|
69
70
|
docs/FilterEventsRequestArgsInner.md
|
|
@@ -105,6 +106,7 @@ docs/Trade.md
|
|
|
105
106
|
docs/TradesParams.md
|
|
106
107
|
docs/UnifiedEvent.md
|
|
107
108
|
docs/UnifiedMarket.md
|
|
109
|
+
docs/UnifiedSeries.md
|
|
108
110
|
docs/UserTrade.md
|
|
109
111
|
package.json
|
|
110
112
|
src/apis/DataFeedsApi.ts
|
|
@@ -171,6 +173,7 @@ src/models/FetchOrderBookParams.ts
|
|
|
171
173
|
src/models/FetchOrderBooks200Response.ts
|
|
172
174
|
src/models/FetchOrderBooksRequest.ts
|
|
173
175
|
src/models/FetchPositions200Response.ts
|
|
176
|
+
src/models/FetchSeries200Response.ts
|
|
174
177
|
src/models/FetchTrades200Response.ts
|
|
175
178
|
src/models/FilterEventsRequest.ts
|
|
176
179
|
src/models/FilterEventsRequestArgsInner.ts
|
|
@@ -212,6 +215,7 @@ src/models/Trade.ts
|
|
|
212
215
|
src/models/TradesParams.ts
|
|
213
216
|
src/models/UnifiedEvent.ts
|
|
214
217
|
src/models/UnifiedMarket.ts
|
|
218
|
+
src/models/UnifiedSeries.ts
|
|
215
219
|
src/models/UserTrade.ts
|
|
216
220
|
src/models/index.ts
|
|
217
221
|
src/runtime.ts
|
|
@@ -32,6 +32,7 @@ All URIs are relative to *http://localhost:3847*
|
|
|
32
32
|
| [**fetchOrderBooks**](DefaultApi.md#fetchorderbooksoperation) | **POST** /api/{exchange}/fetchOrderBooks | Fetch Order Books |
|
|
33
33
|
| [**fetchPositions**](DefaultApi.md#fetchpositions) | **GET** /api/{exchange}/fetchPositions | Fetch Positions |
|
|
34
34
|
| [**fetchRelatedMarkets**](DefaultApi.md#fetchrelatedmarkets) | **GET** /api/{exchange}/fetchRelatedMarkets | Find Related Markets |
|
|
35
|
+
| [**fetchSeries**](DefaultApi.md#fetchseries) | **GET** /api/{exchange}/fetchSeries | Fetch Series |
|
|
35
36
|
| [**fetchTrades**](DefaultApi.md#fetchtrades) | **GET** /api/{exchange}/fetchTrades | Fetch Trades |
|
|
36
37
|
| [**filterEvents**](DefaultApi.md#filtereventsoperation) | **POST** /api/{exchange}/filterEvents | Filter Events |
|
|
37
38
|
| [**filterMarkets**](DefaultApi.md#filtermarketsoperation) | **POST** /api/{exchange}/filterMarkets | Filter Markets |
|
|
@@ -702,7 +703,7 @@ No authorization required
|
|
|
702
703
|
|
|
703
704
|
## fetchEvent
|
|
704
705
|
|
|
705
|
-
> FetchEvent200Response fetchEvent(exchange, query, limit, cursor, offset, sort, status, searchIn, eventId, slug, filter, category, tags)
|
|
706
|
+
> FetchEvent200Response fetchEvent(exchange, query, limit, cursor, offset, sort, status, searchIn, eventId, slug, series, filter, category, tags)
|
|
706
707
|
|
|
707
708
|
Fetch Event
|
|
708
709
|
|
|
@@ -742,6 +743,8 @@ async function example() {
|
|
|
742
743
|
eventId: eventId_example,
|
|
743
744
|
// string | Lookup by event slug (optional)
|
|
744
745
|
slug: slug_example,
|
|
746
|
+
// string | Filter events by their parent series. Accepts the venue-native series id / ticker / slug (e.g. Kalshi `\"KXATPMATCH\"`, Polymarket `\"wta\"`). Passed through to the vendor where supported, otherwise applied to `sourceMetadata` after fetch. (optional)
|
|
747
|
+
series: series_example,
|
|
745
748
|
// EventFilterCriteria | Optional client-side filter applied after fetching (optional)
|
|
746
749
|
filter: ...,
|
|
747
750
|
// string | Filter by category. Each event belongs to a venue-assigned category such as \"Sports\", \"Politics\", \"Crypto\", \"Bitcoin\", \"Soccer\", \"Economic Policy\" (Polymarket) or \"Sports\", \"Mentions\" (Kalshi). (optional)
|
|
@@ -777,6 +780,7 @@ example().catch(console.error);
|
|
|
777
780
|
| **searchIn** | `title`, `description`, `both` | Where to search (default: \'title\') | [Optional] [Defaults to `undefined`] [Enum: title, description, both] |
|
|
778
781
|
| **eventId** | `string` | Direct lookup by event ID | [Optional] [Defaults to `undefined`] |
|
|
779
782
|
| **slug** | `string` | Lookup by event slug | [Optional] [Defaults to `undefined`] |
|
|
783
|
+
| **series** | `string` | Filter events by their parent series. Accepts the venue-native series id / ticker / slug (e.g. Kalshi `\"KXATPMATCH\"`, Polymarket `\"wta\"`). Passed through to the vendor where supported, otherwise applied to `sourceMetadata` after fetch. | [Optional] [Defaults to `undefined`] |
|
|
780
784
|
| **filter** | [](.md) | Optional client-side filter applied after fetching | [Optional] [Defaults to `undefined`] |
|
|
781
785
|
| **category** | `string` | Filter by category. Each event belongs to a venue-assigned category such as \"Sports\", \"Politics\", \"Crypto\", \"Bitcoin\", \"Soccer\", \"Economic Policy\" (Polymarket) or \"Sports\", \"Mentions\" (Kalshi). | [Optional] [Defaults to `undefined`] |
|
|
782
786
|
| **tags** | `Array<string>` | Filter by tags. Returns events matching ANY of the provided tags. Tags are more specific than categories -- for example a \"Politics\" event might carry tags [\"Politics\", \"Geopolitics\", \"Middle East\", \"Iran\"]. Common tags include \"Crypto\", \"Elections\", \"Fed Rates\", \"FIFA World Cup\", \"Trump\". | [Optional] |
|
|
@@ -899,7 +903,7 @@ No authorization required
|
|
|
899
903
|
|
|
900
904
|
## fetchEvents
|
|
901
905
|
|
|
902
|
-
> FetchEvents200Response fetchEvents(exchange, query, limit, cursor, offset, sort, status, searchIn, eventId, slug, filter, category, tags)
|
|
906
|
+
> FetchEvents200Response fetchEvents(exchange, query, limit, cursor, offset, sort, status, searchIn, eventId, slug, series, filter, category, tags)
|
|
903
907
|
|
|
904
908
|
Fetch Events
|
|
905
909
|
|
|
@@ -939,6 +943,8 @@ async function example() {
|
|
|
939
943
|
eventId: eventId_example,
|
|
940
944
|
// string | Lookup by event slug (optional)
|
|
941
945
|
slug: slug_example,
|
|
946
|
+
// string | Filter events by their parent series. Accepts the venue-native series id / ticker / slug (e.g. Kalshi `\"KXATPMATCH\"`, Polymarket `\"wta\"`). Passed through to the vendor where supported, otherwise applied to `sourceMetadata` after fetch. (optional)
|
|
947
|
+
series: series_example,
|
|
942
948
|
// EventFilterCriteria | Optional client-side filter applied after fetching (optional)
|
|
943
949
|
filter: ...,
|
|
944
950
|
// string | Filter by category. Each event belongs to a venue-assigned category such as \"Sports\", \"Politics\", \"Crypto\", \"Bitcoin\", \"Soccer\", \"Economic Policy\" (Polymarket) or \"Sports\", \"Mentions\" (Kalshi). (optional)
|
|
@@ -974,6 +980,7 @@ example().catch(console.error);
|
|
|
974
980
|
| **searchIn** | `title`, `description`, `both` | Where to search (default: \'title\') | [Optional] [Defaults to `undefined`] [Enum: title, description, both] |
|
|
975
981
|
| **eventId** | `string` | Direct lookup by event ID | [Optional] [Defaults to `undefined`] |
|
|
976
982
|
| **slug** | `string` | Lookup by event slug | [Optional] [Defaults to `undefined`] |
|
|
983
|
+
| **series** | `string` | Filter events by their parent series. Accepts the venue-native series id / ticker / slug (e.g. Kalshi `\"KXATPMATCH\"`, Polymarket `\"wta\"`). Passed through to the vendor where supported, otherwise applied to `sourceMetadata` after fetch. | [Optional] [Defaults to `undefined`] |
|
|
977
984
|
| **filter** | [](.md) | Optional client-side filter applied after fetching | [Optional] [Defaults to `undefined`] |
|
|
978
985
|
| **category** | `string` | Filter by category. Each event belongs to a venue-assigned category such as \"Sports\", \"Politics\", \"Crypto\", \"Bitcoin\", \"Soccer\", \"Economic Policy\" (Polymarket) or \"Sports\", \"Mentions\" (Kalshi). | [Optional] [Defaults to `undefined`] |
|
|
979
986
|
| **tags** | `Array<string>` | Filter by tags. Returns events matching ANY of the provided tags. Tags are more specific than categories -- for example a \"Politics\" event might carry tags [\"Politics\", \"Geopolitics\", \"Middle East\", \"Iran\"]. Common tags include \"Crypto\", \"Elections\", \"Fed Rates\", \"FIFA World Cup\", \"Trump\". | [Optional] |
|
|
@@ -2349,6 +2356,73 @@ No authorization required
|
|
|
2349
2356
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2350
2357
|
|
|
2351
2358
|
|
|
2359
|
+
## fetchSeries
|
|
2360
|
+
|
|
2361
|
+
> FetchSeries200Response fetchSeries(exchange)
|
|
2362
|
+
|
|
2363
|
+
Fetch Series
|
|
2364
|
+
|
|
2365
|
+
Fetch the recurring series (fourth tier above Event -> Market -> Outcome) that this venue exposes. Returns an empty array on venues without a series concept (Limitless, Smarkets, Probable, Metaculus, Baozi, Hyperliquid, SuiBets, Polymarket US). - `params.id` -> a single matching series with its events populated where supported. - no params -> the full list, typically without nested events for payload size.
|
|
2366
|
+
|
|
2367
|
+
### Example
|
|
2368
|
+
|
|
2369
|
+
```ts
|
|
2370
|
+
import {
|
|
2371
|
+
Configuration,
|
|
2372
|
+
DefaultApi,
|
|
2373
|
+
} from 'pmxtjs';
|
|
2374
|
+
import type { FetchSeriesRequest } from 'pmxtjs';
|
|
2375
|
+
|
|
2376
|
+
async function example() {
|
|
2377
|
+
console.log("🚀 Testing pmxtjs SDK...");
|
|
2378
|
+
const api = new DefaultApi();
|
|
2379
|
+
|
|
2380
|
+
const body = {
|
|
2381
|
+
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'mock' | 'router' | The prediction market exchange to target.
|
|
2382
|
+
exchange: exchange_example,
|
|
2383
|
+
} satisfies FetchSeriesRequest;
|
|
2384
|
+
|
|
2385
|
+
try {
|
|
2386
|
+
const data = await api.fetchSeries(body);
|
|
2387
|
+
console.log(data);
|
|
2388
|
+
} catch (error) {
|
|
2389
|
+
console.error(error);
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
// Run the test
|
|
2394
|
+
example().catch(console.error);
|
|
2395
|
+
```
|
|
2396
|
+
|
|
2397
|
+
### Parameters
|
|
2398
|
+
|
|
2399
|
+
|
|
2400
|
+
| Name | Type | Description | Notes |
|
|
2401
|
+
|------------- | ------------- | ------------- | -------------|
|
|
2402
|
+
| **exchange** | `polymarket`, `kalshi`, `kalshi-demo`, `limitless`, `probable`, `baozi`, `myriad`, `opinion`, `metaculus`, `smarkets`, `polymarket_us`, `gemini-titan`, `hyperliquid`, `suibets`, `mock`, `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: polymarket, kalshi, kalshi-demo, limitless, probable, baozi, myriad, opinion, metaculus, smarkets, polymarket_us, gemini-titan, hyperliquid, suibets, mock, router] |
|
|
2403
|
+
|
|
2404
|
+
### Return type
|
|
2405
|
+
|
|
2406
|
+
[**FetchSeries200Response**](FetchSeries200Response.md)
|
|
2407
|
+
|
|
2408
|
+
### Authorization
|
|
2409
|
+
|
|
2410
|
+
No authorization required
|
|
2411
|
+
|
|
2412
|
+
### HTTP request headers
|
|
2413
|
+
|
|
2414
|
+
- **Content-Type**: Not defined
|
|
2415
|
+
- **Accept**: `application/json`
|
|
2416
|
+
|
|
2417
|
+
|
|
2418
|
+
### HTTP response details
|
|
2419
|
+
| Status code | Description | Response headers |
|
|
2420
|
+
|-------------|-------------|------------------|
|
|
2421
|
+
| **200** | Fetch Series response | - |
|
|
2422
|
+
|
|
2423
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2424
|
+
|
|
2425
|
+
|
|
2352
2426
|
## fetchTrades
|
|
2353
2427
|
|
|
2354
2428
|
> FetchTrades200Response fetchTrades(exchange, outcomeId, start, end, limit)
|
|
@@ -15,6 +15,7 @@ Name | Type
|
|
|
15
15
|
`searchIn` | string
|
|
16
16
|
`eventId` | string
|
|
17
17
|
`slug` | string
|
|
18
|
+
`series` | string
|
|
18
19
|
`filter` | [EventFilterCriteria](EventFilterCriteria.md)
|
|
19
20
|
`category` | string
|
|
20
21
|
`tags` | Array<string>
|
|
@@ -35,6 +36,7 @@ const example = {
|
|
|
35
36
|
"searchIn": null,
|
|
36
37
|
"eventId": null,
|
|
37
38
|
"slug": null,
|
|
39
|
+
"series": null,
|
|
38
40
|
"filter": null,
|
|
39
41
|
"category": null,
|
|
40
42
|
"tags": null,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# FetchSeries200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`success` | boolean
|
|
10
|
+
`error` | [ErrorDetail](ErrorDetail.md)
|
|
11
|
+
`data` | [Array<UnifiedSeries>](UnifiedSeries.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { FetchSeries200Response } 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 FetchSeries200Response
|
|
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 FetchSeries200Response
|
|
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,55 @@
|
|
|
1
|
+
|
|
2
|
+
# UnifiedSeries
|
|
3
|
+
|
|
4
|
+
A recurring grouping of events on a venue — the fourth tier above Event -> Market -> Outcome. Examples: Kalshi `KXATPMATCH` (every ATP tennis match), Polymarket `wta` (every WTA match), Opinion\'s daily `collection`. Series only exists where the venue exposes a recurring-event concept; venues without one return an empty array from `fetchSeries`.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`ticker` | string
|
|
12
|
+
`slug` | string
|
|
13
|
+
`title` | string
|
|
14
|
+
`description` | string
|
|
15
|
+
`recurrence` | string
|
|
16
|
+
`events` | [Array<UnifiedEvent>](UnifiedEvent.md)
|
|
17
|
+
`url` | string
|
|
18
|
+
`image` | string
|
|
19
|
+
`sourceExchange` | string
|
|
20
|
+
`sourceMetadata` | { [key: string]: any; }
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import type { UnifiedSeries } from 'pmxtjs'
|
|
26
|
+
|
|
27
|
+
// TODO: Update the object below with actual values
|
|
28
|
+
const example = {
|
|
29
|
+
"id": null,
|
|
30
|
+
"ticker": null,
|
|
31
|
+
"slug": null,
|
|
32
|
+
"title": null,
|
|
33
|
+
"description": null,
|
|
34
|
+
"recurrence": null,
|
|
35
|
+
"events": null,
|
|
36
|
+
"url": null,
|
|
37
|
+
"image": null,
|
|
38
|
+
"sourceExchange": null,
|
|
39
|
+
"sourceMetadata": null,
|
|
40
|
+
} satisfies UnifiedSeries
|
|
41
|
+
|
|
42
|
+
console.log(example)
|
|
43
|
+
|
|
44
|
+
// Convert the instance to a JSON string
|
|
45
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
46
|
+
console.log(exampleJSON)
|
|
47
|
+
|
|
48
|
+
// Parse the JSON string back to an object
|
|
49
|
+
const exampleParsed = JSON.parse(exampleJSON) as UnifiedSeries
|
|
50
|
+
console.log(exampleParsed)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
54
|
+
|
|
55
|
+
|
package/generated/package.json
CHANGED
|
@@ -43,6 +43,7 @@ import type {
|
|
|
43
43
|
FetchOrderBooks200Response,
|
|
44
44
|
FetchOrderBooksRequest,
|
|
45
45
|
FetchPositions200Response,
|
|
46
|
+
FetchSeries200Response,
|
|
46
47
|
FetchTrades200Response,
|
|
47
48
|
FilterEventsRequest,
|
|
48
49
|
FilterMarketsRequest,
|
|
@@ -115,6 +116,8 @@ import {
|
|
|
115
116
|
FetchOrderBooksRequestToJSON,
|
|
116
117
|
FetchPositions200ResponseFromJSON,
|
|
117
118
|
FetchPositions200ResponseToJSON,
|
|
119
|
+
FetchSeries200ResponseFromJSON,
|
|
120
|
+
FetchSeries200ResponseToJSON,
|
|
118
121
|
FetchTrades200ResponseFromJSON,
|
|
119
122
|
FetchTrades200ResponseToJSON,
|
|
120
123
|
FilterEventsRequestFromJSON,
|
|
@@ -212,6 +215,7 @@ export interface FetchEventRequest {
|
|
|
212
215
|
searchIn?: FetchEventSearchInEnum;
|
|
213
216
|
eventId?: string;
|
|
214
217
|
slug?: string;
|
|
218
|
+
series?: string;
|
|
215
219
|
filter?: EventFilterCriteria;
|
|
216
220
|
category?: string;
|
|
217
221
|
tags?: Array<string>;
|
|
@@ -241,6 +245,7 @@ export interface FetchEventsRequest {
|
|
|
241
245
|
searchIn?: FetchEventsSearchInEnum;
|
|
242
246
|
eventId?: string;
|
|
243
247
|
slug?: string;
|
|
248
|
+
series?: string;
|
|
244
249
|
filter?: EventFilterCriteria;
|
|
245
250
|
category?: string;
|
|
246
251
|
tags?: Array<string>;
|
|
@@ -405,6 +410,10 @@ export interface FetchRelatedMarketsRequest {
|
|
|
405
410
|
sort?: FetchRelatedMarketsSortEnum;
|
|
406
411
|
}
|
|
407
412
|
|
|
413
|
+
export interface FetchSeriesRequest {
|
|
414
|
+
exchange: FetchSeriesExchangeEnum;
|
|
415
|
+
}
|
|
416
|
+
|
|
408
417
|
export interface FetchTradesRequest {
|
|
409
418
|
exchange: FetchTradesExchangeEnum;
|
|
410
419
|
outcomeId: string;
|
|
@@ -920,6 +929,10 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
920
929
|
queryParameters['slug'] = requestParameters['slug'];
|
|
921
930
|
}
|
|
922
931
|
|
|
932
|
+
if (requestParameters['series'] != null) {
|
|
933
|
+
queryParameters['series'] = requestParameters['series'];
|
|
934
|
+
}
|
|
935
|
+
|
|
923
936
|
if (requestParameters['filter'] != null) {
|
|
924
937
|
queryParameters['filter'] = requestParameters['filter'];
|
|
925
938
|
}
|
|
@@ -1082,6 +1095,10 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1082
1095
|
queryParameters['slug'] = requestParameters['slug'];
|
|
1083
1096
|
}
|
|
1084
1097
|
|
|
1098
|
+
if (requestParameters['series'] != null) {
|
|
1099
|
+
queryParameters['series'] = requestParameters['series'];
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1085
1102
|
if (requestParameters['filter'] != null) {
|
|
1086
1103
|
queryParameters['filter'] = requestParameters['filter'];
|
|
1087
1104
|
}
|
|
@@ -2141,6 +2158,45 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
2141
2158
|
return await response.value();
|
|
2142
2159
|
}
|
|
2143
2160
|
|
|
2161
|
+
/**
|
|
2162
|
+
* Fetch the recurring series (fourth tier above Event -> Market -> Outcome) that this venue exposes. Returns an empty array on venues without a series concept (Limitless, Smarkets, Probable, Metaculus, Baozi, Hyperliquid, SuiBets, Polymarket US). - `params.id` -> a single matching series with its events populated where supported. - no params -> the full list, typically without nested events for payload size.
|
|
2163
|
+
* Fetch Series
|
|
2164
|
+
*/
|
|
2165
|
+
async fetchSeriesRaw(requestParameters: FetchSeriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchSeries200Response>> {
|
|
2166
|
+
if (requestParameters['exchange'] == null) {
|
|
2167
|
+
throw new runtime.RequiredError(
|
|
2168
|
+
'exchange',
|
|
2169
|
+
'Required parameter "exchange" was null or undefined when calling fetchSeries().'
|
|
2170
|
+
);
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
const queryParameters: any = {};
|
|
2174
|
+
|
|
2175
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2176
|
+
|
|
2177
|
+
|
|
2178
|
+
let urlPath = `/api/{exchange}/fetchSeries`;
|
|
2179
|
+
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
2180
|
+
|
|
2181
|
+
const response = await this.request({
|
|
2182
|
+
path: urlPath,
|
|
2183
|
+
method: 'GET',
|
|
2184
|
+
headers: headerParameters,
|
|
2185
|
+
query: queryParameters,
|
|
2186
|
+
}, initOverrides);
|
|
2187
|
+
|
|
2188
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FetchSeries200ResponseFromJSON(jsonValue));
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
/**
|
|
2192
|
+
* Fetch the recurring series (fourth tier above Event -> Market -> Outcome) that this venue exposes. Returns an empty array on venues without a series concept (Limitless, Smarkets, Probable, Metaculus, Baozi, Hyperliquid, SuiBets, Polymarket US). - `params.id` -> a single matching series with its events populated where supported. - no params -> the full list, typically without nested events for payload size.
|
|
2193
|
+
* Fetch Series
|
|
2194
|
+
*/
|
|
2195
|
+
async fetchSeries(requestParameters: FetchSeriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchSeries200Response> {
|
|
2196
|
+
const response = await this.fetchSeriesRaw(requestParameters, initOverrides);
|
|
2197
|
+
return await response.value();
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2144
2200
|
/**
|
|
2145
2201
|
* Fetch raw trade history for a specific outcome.
|
|
2146
2202
|
* Fetch Trades
|
|
@@ -3213,6 +3269,28 @@ export const FetchRelatedMarketsSortEnum = {
|
|
|
3213
3269
|
PriceDifference: 'priceDifference'
|
|
3214
3270
|
} as const;
|
|
3215
3271
|
export type FetchRelatedMarketsSortEnum = typeof FetchRelatedMarketsSortEnum[keyof typeof FetchRelatedMarketsSortEnum];
|
|
3272
|
+
/**
|
|
3273
|
+
* @export
|
|
3274
|
+
*/
|
|
3275
|
+
export const FetchSeriesExchangeEnum = {
|
|
3276
|
+
Polymarket: 'polymarket',
|
|
3277
|
+
Kalshi: 'kalshi',
|
|
3278
|
+
KalshiDemo: 'kalshi-demo',
|
|
3279
|
+
Limitless: 'limitless',
|
|
3280
|
+
Probable: 'probable',
|
|
3281
|
+
Baozi: 'baozi',
|
|
3282
|
+
Myriad: 'myriad',
|
|
3283
|
+
Opinion: 'opinion',
|
|
3284
|
+
Metaculus: 'metaculus',
|
|
3285
|
+
Smarkets: 'smarkets',
|
|
3286
|
+
PolymarketUs: 'polymarket_us',
|
|
3287
|
+
GeminiTitan: 'gemini-titan',
|
|
3288
|
+
Hyperliquid: 'hyperliquid',
|
|
3289
|
+
Suibets: 'suibets',
|
|
3290
|
+
Mock: 'mock',
|
|
3291
|
+
Router: 'router'
|
|
3292
|
+
} as const;
|
|
3293
|
+
export type FetchSeriesExchangeEnum = typeof FetchSeriesExchangeEnum[keyof typeof FetchSeriesExchangeEnum];
|
|
3216
3294
|
/**
|
|
3217
3295
|
* @export
|
|
3218
3296
|
*/
|
|
@@ -81,6 +81,12 @@ export interface EventFetchParams {
|
|
|
81
81
|
* @memberof EventFetchParams
|
|
82
82
|
*/
|
|
83
83
|
slug?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Filter events by their parent series. Accepts the venue-native series id / ticker / slug (e.g. Kalshi `"KXATPMATCH"`, Polymarket `"wta"`). Passed through to the vendor where supported, otherwise applied to `sourceMetadata` after fetch.
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof EventFetchParams
|
|
88
|
+
*/
|
|
89
|
+
series?: string;
|
|
84
90
|
/**
|
|
85
91
|
* Optional client-side filter applied after fetching
|
|
86
92
|
* @type {EventFilterCriteria}
|
|
@@ -160,6 +166,7 @@ export function EventFetchParamsFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
160
166
|
'searchIn': json['searchIn'] == null ? undefined : json['searchIn'],
|
|
161
167
|
'eventId': json['eventId'] == null ? undefined : json['eventId'],
|
|
162
168
|
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
169
|
+
'series': json['series'] == null ? undefined : json['series'],
|
|
163
170
|
'filter': json['filter'] == null ? undefined : EventFilterCriteriaFromJSON(json['filter']),
|
|
164
171
|
'category': json['category'] == null ? undefined : json['category'],
|
|
165
172
|
'tags': json['tags'] == null ? undefined : json['tags'],
|
|
@@ -186,6 +193,7 @@ export function EventFetchParamsToJSONTyped(value?: EventFetchParams | null, ign
|
|
|
186
193
|
'searchIn': value['searchIn'],
|
|
187
194
|
'eventId': value['eventId'],
|
|
188
195
|
'slug': value['slug'],
|
|
196
|
+
'series': value['series'],
|
|
189
197
|
'filter': EventFilterCriteriaToJSON(value['filter']),
|
|
190
198
|
'category': value['category'],
|
|
191
199
|
'tags': value['tags'],
|
|
@@ -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 { UnifiedSeries } from './UnifiedSeries';
|
|
24
|
+
import {
|
|
25
|
+
UnifiedSeriesFromJSON,
|
|
26
|
+
UnifiedSeriesFromJSONTyped,
|
|
27
|
+
UnifiedSeriesToJSON,
|
|
28
|
+
UnifiedSeriesToJSONTyped,
|
|
29
|
+
} from './UnifiedSeries';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface FetchSeries200Response
|
|
35
|
+
*/
|
|
36
|
+
export interface FetchSeries200Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof FetchSeries200Response
|
|
41
|
+
*/
|
|
42
|
+
success?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {ErrorDetail}
|
|
46
|
+
* @memberof FetchSeries200Response
|
|
47
|
+
*/
|
|
48
|
+
error?: ErrorDetail;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {Array<UnifiedSeries>}
|
|
52
|
+
* @memberof FetchSeries200Response
|
|
53
|
+
*/
|
|
54
|
+
data?: Array<UnifiedSeries>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the FetchSeries200Response interface.
|
|
59
|
+
*/
|
|
60
|
+
export function instanceOfFetchSeries200Response(value: object): value is FetchSeries200Response {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function FetchSeries200ResponseFromJSON(json: any): FetchSeries200Response {
|
|
65
|
+
return FetchSeries200ResponseFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function FetchSeries200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FetchSeries200Response {
|
|
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 : ((json['data'] as Array<any>).map(UnifiedSeriesFromJSON)),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function FetchSeries200ResponseToJSON(json: any): FetchSeries200Response {
|
|
81
|
+
return FetchSeries200ResponseToJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function FetchSeries200ResponseToJSONTyped(value?: FetchSeries200Response | 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 : ((value['data'] as Array<any>).map(UnifiedSeriesToJSON)),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|