pmxtjs 1.2.0 → 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.
- package/dist/esm/generated/src/apis/DefaultApi.d.ts +23 -1
- package/dist/esm/generated/src/apis/DefaultApi.js +38 -1
- package/dist/esm/generated/src/models/SearchEvents200Response.d.ts +46 -0
- package/dist/esm/generated/src/models/SearchEvents200Response.js +47 -0
- package/dist/esm/generated/src/models/SearchEventsRequest.d.ts +40 -0
- package/dist/esm/generated/src/models/SearchEventsRequest.js +47 -0
- package/dist/esm/generated/src/models/UnifiedEvent.d.ts +81 -0
- package/dist/esm/generated/src/models/UnifiedEvent.js +58 -0
- package/dist/esm/generated/src/models/index.d.ts +3 -0
- package/dist/esm/generated/src/models/index.js +3 -0
- package/dist/generated/src/apis/DefaultApi.d.ts +23 -1
- package/dist/generated/src/apis/DefaultApi.js +38 -1
- package/dist/generated/src/models/SearchEvents200Response.d.ts +46 -0
- package/dist/generated/src/models/SearchEvents200Response.js +54 -0
- package/dist/generated/src/models/SearchEventsRequest.d.ts +40 -0
- package/dist/generated/src/models/SearchEventsRequest.js +54 -0
- package/dist/generated/src/models/UnifiedEvent.d.ts +81 -0
- package/dist/generated/src/models/UnifiedEvent.js +65 -0
- package/dist/generated/src/models/index.d.ts +3 -0
- package/dist/generated/src/models/index.js +3 -0
- package/generated/.openapi-generator/FILES +6 -0
- package/generated/docs/DefaultApi.md +71 -0
- package/generated/docs/SearchEvents200Response.md +38 -0
- package/generated/docs/SearchEventsRequest.md +36 -0
- package/generated/docs/UnifiedEvent.md +51 -0
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +61 -0
- package/generated/src/models/SearchEvents200Response.ts +96 -0
- package/generated/src/models/SearchEventsRequest.ts +89 -0
- package/generated/src/models/UnifiedEvent.ts +137 -0
- package/generated/src/models/index.ts +3 -0
- package/package.json +2 -2
|
@@ -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
|
+
}
|
|
@@ -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);
|
|
@@ -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<UnifiedEvent>](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<SearchMarketsRequestArgsInner>](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
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
# UnifiedEvent
|
|
3
|
+
|
|
4
|
+
A grouped collection of related markets (e.g., \"Who will be Fed Chair?\" contains multiple candidate markets)
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`title` | string
|
|
12
|
+
`description` | string
|
|
13
|
+
`slug` | string
|
|
14
|
+
`markets` | [Array<UnifiedMarket>](UnifiedMarket.md)
|
|
15
|
+
`url` | string
|
|
16
|
+
`image` | string
|
|
17
|
+
`category` | string
|
|
18
|
+
`tags` | Array<string>
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import type { UnifiedEvent } from 'pmxtjs'
|
|
24
|
+
|
|
25
|
+
// TODO: Update the object below with actual values
|
|
26
|
+
const example = {
|
|
27
|
+
"id": null,
|
|
28
|
+
"title": null,
|
|
29
|
+
"description": null,
|
|
30
|
+
"slug": null,
|
|
31
|
+
"markets": null,
|
|
32
|
+
"url": null,
|
|
33
|
+
"image": null,
|
|
34
|
+
"category": null,
|
|
35
|
+
"tags": null,
|
|
36
|
+
} satisfies UnifiedEvent
|
|
37
|
+
|
|
38
|
+
console.log(example)
|
|
39
|
+
|
|
40
|
+
// Convert the instance to a JSON string
|
|
41
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
42
|
+
console.log(exampleJSON)
|
|
43
|
+
|
|
44
|
+
// Parse the JSON string back to an object
|
|
45
|
+
const exampleParsed = JSON.parse(exampleJSON) as UnifiedEvent
|
|
46
|
+
console.log(exampleParsed)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
50
|
+
|
|
51
|
+
|
package/generated/package.json
CHANGED
|
@@ -33,6 +33,8 @@ import type {
|
|
|
33
33
|
FetchTradesRequest,
|
|
34
34
|
GetMarketsBySlugRequest,
|
|
35
35
|
HealthCheck200Response,
|
|
36
|
+
SearchEvents200Response,
|
|
37
|
+
SearchEventsRequest,
|
|
36
38
|
SearchMarketsRequest,
|
|
37
39
|
WatchOrderBookRequest,
|
|
38
40
|
WatchTradesRequest,
|
|
@@ -74,6 +76,10 @@ import {
|
|
|
74
76
|
GetMarketsBySlugRequestToJSON,
|
|
75
77
|
HealthCheck200ResponseFromJSON,
|
|
76
78
|
HealthCheck200ResponseToJSON,
|
|
79
|
+
SearchEvents200ResponseFromJSON,
|
|
80
|
+
SearchEvents200ResponseToJSON,
|
|
81
|
+
SearchEventsRequestFromJSON,
|
|
82
|
+
SearchEventsRequestToJSON,
|
|
77
83
|
SearchMarketsRequestFromJSON,
|
|
78
84
|
SearchMarketsRequestToJSON,
|
|
79
85
|
WatchOrderBookRequestFromJSON,
|
|
@@ -137,6 +143,11 @@ export interface GetMarketsBySlugOperationRequest {
|
|
|
137
143
|
getMarketsBySlugRequest?: GetMarketsBySlugRequest;
|
|
138
144
|
}
|
|
139
145
|
|
|
146
|
+
export interface SearchEventsOperationRequest {
|
|
147
|
+
exchange: SearchEventsOperationExchangeEnum;
|
|
148
|
+
searchEventsRequest?: SearchEventsRequest;
|
|
149
|
+
}
|
|
150
|
+
|
|
140
151
|
export interface SearchMarketsOperationRequest {
|
|
141
152
|
exchange: SearchMarketsOperationExchangeEnum;
|
|
142
153
|
searchMarketsRequest?: SearchMarketsRequest;
|
|
@@ -626,6 +637,48 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
626
637
|
return await response.value();
|
|
627
638
|
}
|
|
628
639
|
|
|
640
|
+
/**
|
|
641
|
+
* Search for events (groups of related markets) by title or description.
|
|
642
|
+
* Search Events
|
|
643
|
+
*/
|
|
644
|
+
async searchEventsRaw(requestParameters: SearchEventsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SearchEvents200Response>> {
|
|
645
|
+
if (requestParameters['exchange'] == null) {
|
|
646
|
+
throw new runtime.RequiredError(
|
|
647
|
+
'exchange',
|
|
648
|
+
'Required parameter "exchange" was null or undefined when calling searchEvents().'
|
|
649
|
+
);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
const queryParameters: any = {};
|
|
653
|
+
|
|
654
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
655
|
+
|
|
656
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
let urlPath = `/api/{exchange}/searchEvents`;
|
|
660
|
+
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
661
|
+
|
|
662
|
+
const response = await this.request({
|
|
663
|
+
path: urlPath,
|
|
664
|
+
method: 'POST',
|
|
665
|
+
headers: headerParameters,
|
|
666
|
+
query: queryParameters,
|
|
667
|
+
body: SearchEventsRequestToJSON(requestParameters['searchEventsRequest']),
|
|
668
|
+
}, initOverrides);
|
|
669
|
+
|
|
670
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SearchEvents200ResponseFromJSON(jsonValue));
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* Search for events (groups of related markets) by title or description.
|
|
675
|
+
* Search Events
|
|
676
|
+
*/
|
|
677
|
+
async searchEvents(requestParameters: SearchEventsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SearchEvents200Response> {
|
|
678
|
+
const response = await this.searchEventsRaw(requestParameters, initOverrides);
|
|
679
|
+
return await response.value();
|
|
680
|
+
}
|
|
681
|
+
|
|
629
682
|
/**
|
|
630
683
|
* Search for markets by title or description.
|
|
631
684
|
* Search Markets
|
|
@@ -842,6 +895,14 @@ export const GetMarketsBySlugOperationExchangeEnum = {
|
|
|
842
895
|
Kalshi: 'kalshi'
|
|
843
896
|
} as const;
|
|
844
897
|
export type GetMarketsBySlugOperationExchangeEnum = typeof GetMarketsBySlugOperationExchangeEnum[keyof typeof GetMarketsBySlugOperationExchangeEnum];
|
|
898
|
+
/**
|
|
899
|
+
* @export
|
|
900
|
+
*/
|
|
901
|
+
export const SearchEventsOperationExchangeEnum = {
|
|
902
|
+
Polymarket: 'polymarket',
|
|
903
|
+
Kalshi: 'kalshi'
|
|
904
|
+
} as const;
|
|
905
|
+
export type SearchEventsOperationExchangeEnum = typeof SearchEventsOperationExchangeEnum[keyof typeof SearchEventsOperationExchangeEnum];
|
|
845
906
|
/**
|
|
846
907
|
* @export
|
|
847
908
|
*/
|