pmxtjs 1.1.4 → 1.3.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.
Files changed (44) hide show
  1. package/dist/esm/generated/src/apis/DefaultApi.d.ts +23 -1
  2. package/dist/esm/generated/src/apis/DefaultApi.js +38 -1
  3. package/dist/esm/generated/src/models/SearchEvents200Response.d.ts +46 -0
  4. package/dist/esm/generated/src/models/SearchEvents200Response.js +47 -0
  5. package/dist/esm/generated/src/models/SearchEventsRequest.d.ts +40 -0
  6. package/dist/esm/generated/src/models/SearchEventsRequest.js +47 -0
  7. package/dist/esm/generated/src/models/UnifiedEvent.d.ts +81 -0
  8. package/dist/esm/generated/src/models/UnifiedEvent.js +58 -0
  9. package/dist/esm/generated/src/models/UnifiedMarket.d.ts +24 -0
  10. package/dist/esm/generated/src/models/UnifiedMarket.js +8 -0
  11. package/dist/esm/generated/src/models/index.d.ts +3 -0
  12. package/dist/esm/generated/src/models/index.js +3 -0
  13. package/dist/esm/pmxt/client.js +11 -0
  14. package/dist/esm/pmxt/models.d.ts +8 -0
  15. package/dist/generated/src/apis/DefaultApi.d.ts +23 -1
  16. package/dist/generated/src/apis/DefaultApi.js +38 -1
  17. package/dist/generated/src/models/SearchEvents200Response.d.ts +46 -0
  18. package/dist/generated/src/models/SearchEvents200Response.js +54 -0
  19. package/dist/generated/src/models/SearchEventsRequest.d.ts +40 -0
  20. package/dist/generated/src/models/SearchEventsRequest.js +54 -0
  21. package/dist/generated/src/models/UnifiedEvent.d.ts +81 -0
  22. package/dist/generated/src/models/UnifiedEvent.js +65 -0
  23. package/dist/generated/src/models/UnifiedMarket.d.ts +24 -0
  24. package/dist/generated/src/models/UnifiedMarket.js +8 -0
  25. package/dist/generated/src/models/index.d.ts +3 -0
  26. package/dist/generated/src/models/index.js +3 -0
  27. package/dist/pmxt/client.js +11 -0
  28. package/dist/pmxt/models.d.ts +8 -0
  29. package/generated/.openapi-generator/FILES +6 -0
  30. package/generated/docs/DefaultApi.md +71 -0
  31. package/generated/docs/SearchEvents200Response.md +38 -0
  32. package/generated/docs/SearchEventsRequest.md +36 -0
  33. package/generated/docs/UnifiedEvent.md +51 -0
  34. package/generated/docs/UnifiedMarket.md +8 -0
  35. package/generated/package.json +1 -1
  36. package/generated/src/apis/DefaultApi.ts +61 -0
  37. package/generated/src/models/SearchEvents200Response.ts +96 -0
  38. package/generated/src/models/SearchEventsRequest.ts +89 -0
  39. package/generated/src/models/UnifiedEvent.ts +137 -0
  40. package/generated/src/models/UnifiedMarket.ts +32 -0
  41. package/generated/src/models/index.ts +3 -0
  42. package/package.json +2 -2
  43. package/pmxt/client.ts +13 -0
  44. package/pmxt/models.ts +12 -0
@@ -0,0 +1,46 @@
1
+ /**
2
+ * PMXT Sidecar API
3
+ * A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
4
+ *
5
+ * The version of the OpenAPI document: 0.4.4
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { ErrorDetail } from './ErrorDetail';
13
+ import type { UnifiedEvent } from './UnifiedEvent';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface SearchEvents200Response
18
+ */
19
+ export interface SearchEvents200Response {
20
+ /**
21
+ *
22
+ * @type {boolean}
23
+ * @memberof SearchEvents200Response
24
+ */
25
+ success?: boolean;
26
+ /**
27
+ *
28
+ * @type {ErrorDetail}
29
+ * @memberof SearchEvents200Response
30
+ */
31
+ error?: ErrorDetail;
32
+ /**
33
+ *
34
+ * @type {Array<UnifiedEvent>}
35
+ * @memberof SearchEvents200Response
36
+ */
37
+ data?: Array<UnifiedEvent>;
38
+ }
39
+ /**
40
+ * Check if a given object implements the SearchEvents200Response interface.
41
+ */
42
+ export declare function instanceOfSearchEvents200Response(value: object): value is SearchEvents200Response;
43
+ export declare function SearchEvents200ResponseFromJSON(json: any): SearchEvents200Response;
44
+ export declare function SearchEvents200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchEvents200Response;
45
+ export declare function SearchEvents200ResponseToJSON(json: any): SearchEvents200Response;
46
+ export declare function SearchEvents200ResponseToJSONTyped(value?: SearchEvents200Response | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * PMXT Sidecar API
6
+ * A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
7
+ *
8
+ * The version of the OpenAPI document: 0.4.4
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfSearchEvents200Response = instanceOfSearchEvents200Response;
17
+ exports.SearchEvents200ResponseFromJSON = SearchEvents200ResponseFromJSON;
18
+ exports.SearchEvents200ResponseFromJSONTyped = SearchEvents200ResponseFromJSONTyped;
19
+ exports.SearchEvents200ResponseToJSON = SearchEvents200ResponseToJSON;
20
+ exports.SearchEvents200ResponseToJSONTyped = SearchEvents200ResponseToJSONTyped;
21
+ const ErrorDetail_1 = require("./ErrorDetail");
22
+ const UnifiedEvent_1 = require("./UnifiedEvent");
23
+ /**
24
+ * Check if a given object implements the SearchEvents200Response interface.
25
+ */
26
+ function instanceOfSearchEvents200Response(value) {
27
+ return true;
28
+ }
29
+ function SearchEvents200ResponseFromJSON(json) {
30
+ return SearchEvents200ResponseFromJSONTyped(json, false);
31
+ }
32
+ function SearchEvents200ResponseFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'success': json['success'] == null ? undefined : json['success'],
38
+ 'error': json['error'] == null ? undefined : (0, ErrorDetail_1.ErrorDetailFromJSON)(json['error']),
39
+ 'data': json['data'] == null ? undefined : (json['data'].map(UnifiedEvent_1.UnifiedEventFromJSON)),
40
+ };
41
+ }
42
+ function SearchEvents200ResponseToJSON(json) {
43
+ return SearchEvents200ResponseToJSONTyped(json, false);
44
+ }
45
+ function SearchEvents200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'success': value['success'],
51
+ 'error': (0, ErrorDetail_1.ErrorDetailToJSON)(value['error']),
52
+ 'data': value['data'] == null ? undefined : (value['data'].map(UnifiedEvent_1.UnifiedEventToJSON)),
53
+ };
54
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * PMXT Sidecar API
3
+ * A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
4
+ *
5
+ * The version of the OpenAPI document: 0.4.4
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { ExchangeCredentials } from './ExchangeCredentials';
13
+ import type { SearchMarketsRequestArgsInner } from './SearchMarketsRequestArgsInner';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface SearchEventsRequest
18
+ */
19
+ export interface SearchEventsRequest {
20
+ /**
21
+ * [query, params?]
22
+ * @type {Array<SearchMarketsRequestArgsInner>}
23
+ * @memberof SearchEventsRequest
24
+ */
25
+ args: Array<SearchMarketsRequestArgsInner>;
26
+ /**
27
+ *
28
+ * @type {ExchangeCredentials}
29
+ * @memberof SearchEventsRequest
30
+ */
31
+ credentials?: ExchangeCredentials;
32
+ }
33
+ /**
34
+ * Check if a given object implements the SearchEventsRequest interface.
35
+ */
36
+ export declare function instanceOfSearchEventsRequest(value: object): value is SearchEventsRequest;
37
+ export declare function SearchEventsRequestFromJSON(json: any): SearchEventsRequest;
38
+ export declare function SearchEventsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchEventsRequest;
39
+ export declare function SearchEventsRequestToJSON(json: any): SearchEventsRequest;
40
+ export declare function SearchEventsRequestToJSONTyped(value?: SearchEventsRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * PMXT Sidecar API
6
+ * A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
7
+ *
8
+ * The version of the OpenAPI document: 0.4.4
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfSearchEventsRequest = instanceOfSearchEventsRequest;
17
+ exports.SearchEventsRequestFromJSON = SearchEventsRequestFromJSON;
18
+ exports.SearchEventsRequestFromJSONTyped = SearchEventsRequestFromJSONTyped;
19
+ exports.SearchEventsRequestToJSON = SearchEventsRequestToJSON;
20
+ exports.SearchEventsRequestToJSONTyped = SearchEventsRequestToJSONTyped;
21
+ const ExchangeCredentials_1 = require("./ExchangeCredentials");
22
+ const SearchMarketsRequestArgsInner_1 = require("./SearchMarketsRequestArgsInner");
23
+ /**
24
+ * Check if a given object implements the SearchEventsRequest interface.
25
+ */
26
+ function instanceOfSearchEventsRequest(value) {
27
+ if (!('args' in value) || value['args'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function SearchEventsRequestFromJSON(json) {
32
+ return SearchEventsRequestFromJSONTyped(json, false);
33
+ }
34
+ function SearchEventsRequestFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'args': (json['args'].map(SearchMarketsRequestArgsInner_1.SearchMarketsRequestArgsInnerFromJSON)),
40
+ 'credentials': json['credentials'] == null ? undefined : (0, ExchangeCredentials_1.ExchangeCredentialsFromJSON)(json['credentials']),
41
+ };
42
+ }
43
+ function SearchEventsRequestToJSON(json) {
44
+ return SearchEventsRequestToJSONTyped(json, false);
45
+ }
46
+ function SearchEventsRequestToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'args': (value['args'].map(SearchMarketsRequestArgsInner_1.SearchMarketsRequestArgsInnerToJSON)),
52
+ 'credentials': (0, ExchangeCredentials_1.ExchangeCredentialsToJSON)(value['credentials']),
53
+ };
54
+ }
@@ -0,0 +1,81 @@
1
+ /**
2
+ * PMXT Sidecar API
3
+ * A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
4
+ *
5
+ * The version of the OpenAPI document: 0.4.4
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { UnifiedMarket } from './UnifiedMarket';
13
+ /**
14
+ * A grouped collection of related markets (e.g., "Who will be Fed Chair?" contains multiple candidate markets)
15
+ * @export
16
+ * @interface UnifiedEvent
17
+ */
18
+ export interface UnifiedEvent {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof UnifiedEvent
23
+ */
24
+ id?: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof UnifiedEvent
29
+ */
30
+ title?: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof UnifiedEvent
35
+ */
36
+ description?: string;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof UnifiedEvent
41
+ */
42
+ slug?: string;
43
+ /**
44
+ *
45
+ * @type {Array<UnifiedMarket>}
46
+ * @memberof UnifiedEvent
47
+ */
48
+ markets?: Array<UnifiedMarket>;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof UnifiedEvent
53
+ */
54
+ url?: string;
55
+ /**
56
+ *
57
+ * @type {string}
58
+ * @memberof UnifiedEvent
59
+ */
60
+ image?: string;
61
+ /**
62
+ *
63
+ * @type {string}
64
+ * @memberof UnifiedEvent
65
+ */
66
+ category?: string;
67
+ /**
68
+ *
69
+ * @type {Array<string>}
70
+ * @memberof UnifiedEvent
71
+ */
72
+ tags?: Array<string>;
73
+ }
74
+ /**
75
+ * Check if a given object implements the UnifiedEvent interface.
76
+ */
77
+ export declare function instanceOfUnifiedEvent(value: object): value is UnifiedEvent;
78
+ export declare function UnifiedEventFromJSON(json: any): UnifiedEvent;
79
+ export declare function UnifiedEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnifiedEvent;
80
+ export declare function UnifiedEventToJSON(json: any): UnifiedEvent;
81
+ export declare function UnifiedEventToJSONTyped(value?: UnifiedEvent | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * PMXT Sidecar API
6
+ * A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
7
+ *
8
+ * The version of the OpenAPI document: 0.4.4
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfUnifiedEvent = instanceOfUnifiedEvent;
17
+ exports.UnifiedEventFromJSON = UnifiedEventFromJSON;
18
+ exports.UnifiedEventFromJSONTyped = UnifiedEventFromJSONTyped;
19
+ exports.UnifiedEventToJSON = UnifiedEventToJSON;
20
+ exports.UnifiedEventToJSONTyped = UnifiedEventToJSONTyped;
21
+ const UnifiedMarket_1 = require("./UnifiedMarket");
22
+ /**
23
+ * Check if a given object implements the UnifiedEvent interface.
24
+ */
25
+ function instanceOfUnifiedEvent(value) {
26
+ return true;
27
+ }
28
+ function UnifiedEventFromJSON(json) {
29
+ return UnifiedEventFromJSONTyped(json, false);
30
+ }
31
+ function UnifiedEventFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'id': json['id'] == null ? undefined : json['id'],
37
+ 'title': json['title'] == null ? undefined : json['title'],
38
+ 'description': json['description'] == null ? undefined : json['description'],
39
+ 'slug': json['slug'] == null ? undefined : json['slug'],
40
+ 'markets': json['markets'] == null ? undefined : (json['markets'].map(UnifiedMarket_1.UnifiedMarketFromJSON)),
41
+ 'url': json['url'] == null ? undefined : json['url'],
42
+ 'image': json['image'] == null ? undefined : json['image'],
43
+ 'category': json['category'] == null ? undefined : json['category'],
44
+ 'tags': json['tags'] == null ? undefined : json['tags'],
45
+ };
46
+ }
47
+ function UnifiedEventToJSON(json) {
48
+ return UnifiedEventToJSONTyped(json, false);
49
+ }
50
+ function UnifiedEventToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'id': value['id'],
56
+ 'title': value['title'],
57
+ 'description': value['description'],
58
+ 'slug': value['slug'],
59
+ 'markets': value['markets'] == null ? undefined : (value['markets'].map(UnifiedMarket_1.UnifiedMarketToJSON)),
60
+ 'url': value['url'],
61
+ 'image': value['image'],
62
+ 'category': value['category'],
63
+ 'tags': value['tags'],
64
+ };
65
+ }
@@ -94,6 +94,30 @@ export interface UnifiedMarket {
94
94
  * @memberof UnifiedMarket
95
95
  */
96
96
  tags?: Array<string>;
97
+ /**
98
+ *
99
+ * @type {MarketOutcome}
100
+ * @memberof UnifiedMarket
101
+ */
102
+ yes?: MarketOutcome;
103
+ /**
104
+ *
105
+ * @type {MarketOutcome}
106
+ * @memberof UnifiedMarket
107
+ */
108
+ no?: MarketOutcome;
109
+ /**
110
+ *
111
+ * @type {MarketOutcome}
112
+ * @memberof UnifiedMarket
113
+ */
114
+ up?: MarketOutcome;
115
+ /**
116
+ *
117
+ * @type {MarketOutcome}
118
+ * @memberof UnifiedMarket
119
+ */
120
+ down?: MarketOutcome;
97
121
  }
98
122
  /**
99
123
  * Check if a given object implements the UnifiedMarket interface.
@@ -46,6 +46,10 @@ function UnifiedMarketFromJSONTyped(json, ignoreDiscriminator) {
46
46
  'image': json['image'] == null ? undefined : json['image'],
47
47
  'category': json['category'] == null ? undefined : json['category'],
48
48
  'tags': json['tags'] == null ? undefined : json['tags'],
49
+ 'yes': json['yes'] == null ? undefined : (0, MarketOutcome_1.MarketOutcomeFromJSON)(json['yes']),
50
+ 'no': json['no'] == null ? undefined : (0, MarketOutcome_1.MarketOutcomeFromJSON)(json['no']),
51
+ 'up': json['up'] == null ? undefined : (0, MarketOutcome_1.MarketOutcomeFromJSON)(json['up']),
52
+ 'down': json['down'] == null ? undefined : (0, MarketOutcome_1.MarketOutcomeFromJSON)(json['down']),
49
53
  };
50
54
  }
51
55
  function UnifiedMarketToJSON(json) {
@@ -69,5 +73,9 @@ function UnifiedMarketToJSONTyped(value, ignoreDiscriminator = false) {
69
73
  'image': value['image'],
70
74
  'category': value['category'],
71
75
  'tags': value['tags'],
76
+ 'yes': (0, MarketOutcome_1.MarketOutcomeToJSON)(value['yes']),
77
+ 'no': (0, MarketOutcome_1.MarketOutcomeToJSON)(value['no']),
78
+ 'up': (0, MarketOutcome_1.MarketOutcomeToJSON)(value['up']),
79
+ 'down': (0, MarketOutcome_1.MarketOutcomeToJSON)(value['down']),
72
80
  };
73
81
  }
@@ -32,9 +32,12 @@ export * from './OrderBook';
32
32
  export * from './OrderLevel';
33
33
  export * from './Position';
34
34
  export * from './PriceCandle';
35
+ export * from './SearchEvents200Response';
36
+ export * from './SearchEventsRequest';
35
37
  export * from './SearchMarketsRequest';
36
38
  export * from './SearchMarketsRequestArgsInner';
37
39
  export * from './Trade';
40
+ export * from './UnifiedEvent';
38
41
  export * from './UnifiedMarket';
39
42
  export * from './WatchOrderBookRequest';
40
43
  export * from './WatchOrderBookRequestArgsInner';
@@ -50,9 +50,12 @@ __exportStar(require("./OrderBook"), exports);
50
50
  __exportStar(require("./OrderLevel"), exports);
51
51
  __exportStar(require("./Position"), exports);
52
52
  __exportStar(require("./PriceCandle"), exports);
53
+ __exportStar(require("./SearchEvents200Response"), exports);
54
+ __exportStar(require("./SearchEventsRequest"), exports);
53
55
  __exportStar(require("./SearchMarketsRequest"), exports);
54
56
  __exportStar(require("./SearchMarketsRequestArgsInner"), exports);
55
57
  __exportStar(require("./Trade"), exports);
58
+ __exportStar(require("./UnifiedEvent"), exports);
56
59
  __exportStar(require("./UnifiedMarket"), exports);
57
60
  __exportStar(require("./WatchOrderBookRequest"), exports);
58
61
  __exportStar(require("./WatchOrderBookRequestArgsInner"), exports);
@@ -18,6 +18,13 @@ function convertMarket(raw) {
18
18
  priceChange24h: o.priceChange24h,
19
19
  metadata: o.metadata,
20
20
  }));
21
+ const convertOutcome = (o) => o ? ({
22
+ id: o.id,
23
+ label: o.label,
24
+ price: o.price,
25
+ priceChange24h: o.priceChange24h,
26
+ metadata: o.metadata,
27
+ }) : undefined;
21
28
  return {
22
29
  id: raw.id,
23
30
  title: raw.title,
@@ -32,6 +39,10 @@ function convertMarket(raw) {
32
39
  image: raw.image,
33
40
  category: raw.category,
34
41
  tags: raw.tags,
42
+ yes: convertOutcome(raw.yes),
43
+ no: convertOutcome(raw.no),
44
+ up: convertOutcome(raw.up),
45
+ down: convertOutcome(raw.down),
35
46
  };
36
47
  }
37
48
  function convertCandle(raw) {
@@ -52,6 +52,14 @@ export interface UnifiedMarket {
52
52
  category?: string;
53
53
  /** Market tags */
54
54
  tags?: string[];
55
+ /** Convenience access to the Yes outcome for binary markets. */
56
+ yes?: MarketOutcome;
57
+ /** Convenience access to the No outcome for binary markets. */
58
+ no?: MarketOutcome;
59
+ /** Convenience access to the Up outcome for binary markets. */
60
+ up?: MarketOutcome;
61
+ /** Convenience access to the Down outcome for binary markets. */
62
+ down?: MarketOutcome;
55
63
  }
56
64
  /**
57
65
  * OHLCV price candle.
@@ -36,9 +36,12 @@ docs/OrderBook.md
36
36
  docs/OrderLevel.md
37
37
  docs/Position.md
38
38
  docs/PriceCandle.md
39
+ docs/SearchEvents200Response.md
40
+ docs/SearchEventsRequest.md
39
41
  docs/SearchMarketsRequest.md
40
42
  docs/SearchMarketsRequestArgsInner.md
41
43
  docs/Trade.md
44
+ docs/UnifiedEvent.md
42
45
  docs/UnifiedMarket.md
43
46
  docs/WatchOrderBookRequest.md
44
47
  docs/WatchOrderBookRequestArgsInner.md
@@ -81,9 +84,12 @@ src/models/OrderBook.ts
81
84
  src/models/OrderLevel.ts
82
85
  src/models/Position.ts
83
86
  src/models/PriceCandle.ts
87
+ src/models/SearchEvents200Response.ts
88
+ src/models/SearchEventsRequest.ts
84
89
  src/models/SearchMarketsRequest.ts
85
90
  src/models/SearchMarketsRequestArgsInner.ts
86
91
  src/models/Trade.ts
92
+ src/models/UnifiedEvent.ts
87
93
  src/models/UnifiedMarket.ts
88
94
  src/models/WatchOrderBookRequest.ts
89
95
  src/models/WatchOrderBookRequestArgsInner.ts
@@ -16,6 +16,7 @@ All URIs are relative to *http://localhost:3847*
16
16
  | [**fetchTrades**](DefaultApi.md#fetchtradesoperation) | **POST** /api/{exchange}/fetchTrades | Fetch Trades |
17
17
  | [**getMarketsBySlug**](DefaultApi.md#getmarketsbyslugoperation) | **POST** /api/{exchange}/getMarketsBySlug | Get Market by Slug |
18
18
  | [**healthCheck**](DefaultApi.md#healthcheck) | **GET** /health | Server Health Check |
19
+ | [**searchEvents**](DefaultApi.md#searcheventsoperation) | **POST** /api/{exchange}/searchEvents | Search Events |
19
20
  | [**searchMarkets**](DefaultApi.md#searchmarketsoperation) | **POST** /api/{exchange}/searchMarkets | Search Markets |
20
21
  | [**watchOrderBook**](DefaultApi.md#watchorderbookoperation) | **POST** /api/{exchange}/watchOrderBook | Watch Order Book (WebSocket Stream) |
21
22
  | [**watchTrades**](DefaultApi.md#watchtradesoperation) | **POST** /api/{exchange}/watchTrades | Watch Trades (WebSocket Stream) |
@@ -827,6 +828,76 @@ No authorization required
827
828
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
828
829
 
829
830
 
831
+ ## searchEvents
832
+
833
+ > SearchEvents200Response searchEvents(exchange, searchEventsRequest)
834
+
835
+ Search Events
836
+
837
+ Search for events (groups of related markets) by title or description.
838
+
839
+ ### Example
840
+
841
+ ```ts
842
+ import {
843
+ Configuration,
844
+ DefaultApi,
845
+ } from 'pmxtjs';
846
+ import type { SearchEventsOperationRequest } from 'pmxtjs';
847
+
848
+ async function example() {
849
+ console.log("🚀 Testing pmxtjs SDK...");
850
+ const api = new DefaultApi();
851
+
852
+ const body = {
853
+ // 'polymarket' | 'kalshi' | The prediction market exchange to target.
854
+ exchange: exchange_example,
855
+ // SearchEventsRequest (optional)
856
+ searchEventsRequest: ...,
857
+ } satisfies SearchEventsOperationRequest;
858
+
859
+ try {
860
+ const data = await api.searchEvents(body);
861
+ console.log(data);
862
+ } catch (error) {
863
+ console.error(error);
864
+ }
865
+ }
866
+
867
+ // Run the test
868
+ example().catch(console.error);
869
+ ```
870
+
871
+ ### Parameters
872
+
873
+
874
+ | Name | Type | Description | Notes |
875
+ |------------- | ------------- | ------------- | -------------|
876
+ | **exchange** | `polymarket`, `kalshi` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: polymarket, kalshi] |
877
+ | **searchEventsRequest** | [SearchEventsRequest](SearchEventsRequest.md) | | [Optional] |
878
+
879
+ ### Return type
880
+
881
+ [**SearchEvents200Response**](SearchEvents200Response.md)
882
+
883
+ ### Authorization
884
+
885
+ No authorization required
886
+
887
+ ### HTTP request headers
888
+
889
+ - **Content-Type**: `application/json`
890
+ - **Accept**: `application/json`
891
+
892
+
893
+ ### HTTP response details
894
+ | Status code | Description | Response headers |
895
+ |-------------|-------------|------------------|
896
+ | **200** | Search results | - |
897
+
898
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
899
+
900
+
830
901
  ## searchMarkets
831
902
 
832
903
  > FetchMarkets200Response searchMarkets(exchange, searchMarketsRequest)
@@ -0,0 +1,38 @@
1
+
2
+ # SearchEvents200Response
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `success` | boolean
10
+ `error` | [ErrorDetail](ErrorDetail.md)
11
+ `data` | [Array&lt;UnifiedEvent&gt;](UnifiedEvent.md)
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { SearchEvents200Response } 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 SearchEvents200Response
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 SearchEvents200Response
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
+ # SearchEventsRequest
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `args` | [Array&lt;SearchMarketsRequestArgsInner&gt;](SearchMarketsRequestArgsInner.md)
10
+ `credentials` | [ExchangeCredentials](ExchangeCredentials.md)
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { SearchEventsRequest } from 'pmxtjs'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "args": ["Fed Chair",{"limit":5}],
20
+ "credentials": null,
21
+ } satisfies SearchEventsRequest
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 SearchEventsRequest
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
+