pmxtjs 2.1.3 → 2.2.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.
Files changed (78) hide show
  1. package/dist/esm/index.d.ts +3 -0
  2. package/dist/esm/index.js +1 -0
  3. package/dist/esm/pmxt/client.js +2 -1
  4. package/dist/esm/pmxt/models.d.ts +16 -1
  5. package/dist/esm/pmxt/models.js +56 -1
  6. package/dist/index.d.ts +3 -0
  7. package/dist/index.js +3 -1
  8. package/dist/pmxt/client.js +2 -1
  9. package/dist/pmxt/models.d.ts +16 -1
  10. package/dist/pmxt/models.js +58 -0
  11. package/generated/package.json +1 -1
  12. package/generated/src/apis/DefaultApi.js +812 -0
  13. package/generated/src/apis/index.js +19 -0
  14. package/generated/src/index.js +21 -0
  15. package/generated/src/models/Balance.js +54 -0
  16. package/generated/src/models/BaseRequest.js +49 -0
  17. package/generated/src/models/BaseResponse.js +51 -0
  18. package/generated/src/models/CancelOrderRequest.js +53 -0
  19. package/generated/src/models/CreateOrder200Response.js +54 -0
  20. package/generated/src/models/CreateOrderParams.js +85 -0
  21. package/generated/src/models/CreateOrderRequest.js +54 -0
  22. package/generated/src/models/ErrorDetail.js +48 -0
  23. package/generated/src/models/ErrorResponse.js +51 -0
  24. package/generated/src/models/EventFetchParams.js +63 -0
  25. package/generated/src/models/ExchangeCredentials.js +59 -0
  26. package/generated/src/models/ExchangeCredentialsSignatureType.js +49 -0
  27. package/generated/src/models/ExecutionPriceResult.js +52 -0
  28. package/generated/src/models/FetchBalance200Response.js +54 -0
  29. package/generated/src/models/FetchEvents200Response.js +54 -0
  30. package/generated/src/models/FetchEventsRequest.js +52 -0
  31. package/generated/src/models/FetchMarkets200Response.js +54 -0
  32. package/generated/src/models/FetchMarketsRequest.js +52 -0
  33. package/generated/src/models/FetchOHLCV200Response.js +54 -0
  34. package/generated/src/models/FetchOHLCVRequest.js +54 -0
  35. package/generated/src/models/FetchOHLCVRequestArgsInner.js +56 -0
  36. package/generated/src/models/FetchOpenOrders200Response.js +54 -0
  37. package/generated/src/models/FetchOpenOrdersRequest.js +51 -0
  38. package/generated/src/models/FetchOrderBook200Response.js +54 -0
  39. package/generated/src/models/FetchOrderBookRequest.js +53 -0
  40. package/generated/src/models/FetchPositions200Response.js +54 -0
  41. package/generated/src/models/FetchPositionsRequest.js +51 -0
  42. package/generated/src/models/FetchTrades200Response.js +54 -0
  43. package/generated/src/models/FetchTradesRequest.js +54 -0
  44. package/generated/src/models/FilterEventsRequest.js +54 -0
  45. package/generated/src/models/FilterEventsRequestArgsInner.js +67 -0
  46. package/generated/src/models/FilterMarketsRequest.js +54 -0
  47. package/generated/src/models/FilterMarketsRequestArgsInner.js +67 -0
  48. package/generated/src/models/FilterMarketsRequestArgsInnerOneOf.js +47 -0
  49. package/generated/src/models/GetExecutionPrice200Response.js +53 -0
  50. package/generated/src/models/GetExecutionPriceDetailed200Response.js +54 -0
  51. package/generated/src/models/GetExecutionPriceRequest.js +54 -0
  52. package/generated/src/models/GetExecutionPriceRequestArgsInner.js +62 -0
  53. package/generated/src/models/HealthCheck200Response.js +50 -0
  54. package/generated/src/models/HistoryFilterParams.js +68 -0
  55. package/generated/src/models/MarketFilterParams.js +79 -0
  56. package/generated/src/models/MarketOutcome.js +56 -0
  57. package/generated/src/models/Order.js +95 -0
  58. package/generated/src/models/OrderBook.js +53 -0
  59. package/generated/src/models/OrderLevel.js +50 -0
  60. package/generated/src/models/Position.js +62 -0
  61. package/generated/src/models/PriceCandle.js +58 -0
  62. package/generated/src/models/Trade.js +65 -0
  63. package/generated/src/models/UnifiedEvent.js +65 -0
  64. package/generated/src/models/UnifiedMarket.js +81 -0
  65. package/generated/src/models/WatchOrderBookRequest.js +54 -0
  66. package/generated/src/models/WatchOrderBookRequestArgsInner.js +49 -0
  67. package/generated/src/models/WatchPricesRequest.js +53 -0
  68. package/generated/src/models/WatchTradesRequest.js +54 -0
  69. package/generated/src/models/WatchUserPositionsRequest.js +49 -0
  70. package/generated/src/models/index.js +73 -0
  71. package/generated/src/runtime.js +338 -0
  72. package/index.ts +1 -0
  73. package/package.json +2 -2
  74. package/pmxt/client.js +957 -0
  75. package/pmxt/client.ts +2 -1
  76. package/pmxt/models.js +60 -0
  77. package/pmxt/models.ts +60 -1
  78. package/pmxt/server-manager.js +204 -0
@@ -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, Limitless). 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.instanceOfGetExecutionPriceDetailed200Response = instanceOfGetExecutionPriceDetailed200Response;
17
+ exports.GetExecutionPriceDetailed200ResponseFromJSON = GetExecutionPriceDetailed200ResponseFromJSON;
18
+ exports.GetExecutionPriceDetailed200ResponseFromJSONTyped = GetExecutionPriceDetailed200ResponseFromJSONTyped;
19
+ exports.GetExecutionPriceDetailed200ResponseToJSON = GetExecutionPriceDetailed200ResponseToJSON;
20
+ exports.GetExecutionPriceDetailed200ResponseToJSONTyped = GetExecutionPriceDetailed200ResponseToJSONTyped;
21
+ const ErrorDetail_1 = require("./ErrorDetail");
22
+ const ExecutionPriceResult_1 = require("./ExecutionPriceResult");
23
+ /**
24
+ * Check if a given object implements the GetExecutionPriceDetailed200Response interface.
25
+ */
26
+ function instanceOfGetExecutionPriceDetailed200Response(value) {
27
+ return true;
28
+ }
29
+ function GetExecutionPriceDetailed200ResponseFromJSON(json) {
30
+ return GetExecutionPriceDetailed200ResponseFromJSONTyped(json, false);
31
+ }
32
+ function GetExecutionPriceDetailed200ResponseFromJSONTyped(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 : (0, ExecutionPriceResult_1.ExecutionPriceResultFromJSON)(json['data']),
40
+ };
41
+ }
42
+ function GetExecutionPriceDetailed200ResponseToJSON(json) {
43
+ return GetExecutionPriceDetailed200ResponseToJSONTyped(json, false);
44
+ }
45
+ function GetExecutionPriceDetailed200ResponseToJSONTyped(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': (0, ExecutionPriceResult_1.ExecutionPriceResultToJSON)(value['data']),
53
+ };
54
+ }
@@ -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, Limitless). 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.instanceOfGetExecutionPriceRequest = instanceOfGetExecutionPriceRequest;
17
+ exports.GetExecutionPriceRequestFromJSON = GetExecutionPriceRequestFromJSON;
18
+ exports.GetExecutionPriceRequestFromJSONTyped = GetExecutionPriceRequestFromJSONTyped;
19
+ exports.GetExecutionPriceRequestToJSON = GetExecutionPriceRequestToJSON;
20
+ exports.GetExecutionPriceRequestToJSONTyped = GetExecutionPriceRequestToJSONTyped;
21
+ const GetExecutionPriceRequestArgsInner_1 = require("./GetExecutionPriceRequestArgsInner");
22
+ const ExchangeCredentials_1 = require("./ExchangeCredentials");
23
+ /**
24
+ * Check if a given object implements the GetExecutionPriceRequest interface.
25
+ */
26
+ function instanceOfGetExecutionPriceRequest(value) {
27
+ if (!('args' in value) || value['args'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function GetExecutionPriceRequestFromJSON(json) {
32
+ return GetExecutionPriceRequestFromJSONTyped(json, false);
33
+ }
34
+ function GetExecutionPriceRequestFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'args': (json['args'].map(GetExecutionPriceRequestArgsInner_1.GetExecutionPriceRequestArgsInnerFromJSON)),
40
+ 'credentials': json['credentials'] == null ? undefined : (0, ExchangeCredentials_1.ExchangeCredentialsFromJSON)(json['credentials']),
41
+ };
42
+ }
43
+ function GetExecutionPriceRequestToJSON(json) {
44
+ return GetExecutionPriceRequestToJSONTyped(json, false);
45
+ }
46
+ function GetExecutionPriceRequestToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'args': (value['args'].map(GetExecutionPriceRequestArgsInner_1.GetExecutionPriceRequestArgsInnerToJSON)),
52
+ 'credentials': (0, ExchangeCredentials_1.ExchangeCredentialsToJSON)(value['credentials']),
53
+ };
54
+ }
@@ -0,0 +1,62 @@
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, Limitless). 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.GetExecutionPriceRequestArgsInnerFromJSON = GetExecutionPriceRequestArgsInnerFromJSON;
17
+ exports.GetExecutionPriceRequestArgsInnerFromJSONTyped = GetExecutionPriceRequestArgsInnerFromJSONTyped;
18
+ exports.GetExecutionPriceRequestArgsInnerToJSON = GetExecutionPriceRequestArgsInnerToJSON;
19
+ exports.GetExecutionPriceRequestArgsInnerToJSONTyped = GetExecutionPriceRequestArgsInnerToJSONTyped;
20
+ const OrderBook_1 = require("./OrderBook");
21
+ function GetExecutionPriceRequestArgsInnerFromJSON(json) {
22
+ return GetExecutionPriceRequestArgsInnerFromJSONTyped(json, false);
23
+ }
24
+ function GetExecutionPriceRequestArgsInnerFromJSONTyped(json, ignoreDiscriminator) {
25
+ if (json == null) {
26
+ return json;
27
+ }
28
+ if (typeof json !== 'object') {
29
+ return json;
30
+ }
31
+ if ((0, OrderBook_1.instanceOfOrderBook)(json)) {
32
+ return (0, OrderBook_1.OrderBookFromJSONTyped)(json, true);
33
+ }
34
+ if (typeof json === 'number') {
35
+ return json;
36
+ }
37
+ if (typeof json === 'string' && (json === 'buy' || json === 'sell')) {
38
+ return json;
39
+ }
40
+ return {};
41
+ }
42
+ function GetExecutionPriceRequestArgsInnerToJSON(json) {
43
+ return GetExecutionPriceRequestArgsInnerToJSONTyped(json, false);
44
+ }
45
+ function GetExecutionPriceRequestArgsInnerToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ if (typeof value !== 'object') {
50
+ return value;
51
+ }
52
+ if ((0, OrderBook_1.instanceOfOrderBook)(value)) {
53
+ return (0, OrderBook_1.OrderBookToJSON)(value);
54
+ }
55
+ if (typeof value === 'number') {
56
+ return value;
57
+ }
58
+ if (typeof value === 'string' && (value === 'buy' || value === 'sell')) {
59
+ return value;
60
+ }
61
+ return {};
62
+ }
@@ -0,0 +1,50 @@
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, Limitless). 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.instanceOfHealthCheck200Response = instanceOfHealthCheck200Response;
17
+ exports.HealthCheck200ResponseFromJSON = HealthCheck200ResponseFromJSON;
18
+ exports.HealthCheck200ResponseFromJSONTyped = HealthCheck200ResponseFromJSONTyped;
19
+ exports.HealthCheck200ResponseToJSON = HealthCheck200ResponseToJSON;
20
+ exports.HealthCheck200ResponseToJSONTyped = HealthCheck200ResponseToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the HealthCheck200Response interface.
23
+ */
24
+ function instanceOfHealthCheck200Response(value) {
25
+ return true;
26
+ }
27
+ function HealthCheck200ResponseFromJSON(json) {
28
+ return HealthCheck200ResponseFromJSONTyped(json, false);
29
+ }
30
+ function HealthCheck200ResponseFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'status': json['status'] == null ? undefined : json['status'],
36
+ 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'],
37
+ };
38
+ }
39
+ function HealthCheck200ResponseToJSON(json) {
40
+ return HealthCheck200ResponseToJSONTyped(json, false);
41
+ }
42
+ function HealthCheck200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'status': value['status'],
48
+ 'timestamp': value['timestamp'],
49
+ };
50
+ }
@@ -0,0 +1,68 @@
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, Limitless). 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.HistoryFilterParamsResolutionEnum = void 0;
17
+ exports.instanceOfHistoryFilterParams = instanceOfHistoryFilterParams;
18
+ exports.HistoryFilterParamsFromJSON = HistoryFilterParamsFromJSON;
19
+ exports.HistoryFilterParamsFromJSONTyped = HistoryFilterParamsFromJSONTyped;
20
+ exports.HistoryFilterParamsToJSON = HistoryFilterParamsToJSON;
21
+ exports.HistoryFilterParamsToJSONTyped = HistoryFilterParamsToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.HistoryFilterParamsResolutionEnum = {
26
+ _1m: '1m',
27
+ _5m: '5m',
28
+ _15m: '15m',
29
+ _1h: '1h',
30
+ _6h: '6h',
31
+ _1d: '1d'
32
+ };
33
+ /**
34
+ * Check if a given object implements the HistoryFilterParams interface.
35
+ */
36
+ function instanceOfHistoryFilterParams(value) {
37
+ if (!('resolution' in value) || value['resolution'] === undefined)
38
+ return false;
39
+ return true;
40
+ }
41
+ function HistoryFilterParamsFromJSON(json) {
42
+ return HistoryFilterParamsFromJSONTyped(json, false);
43
+ }
44
+ function HistoryFilterParamsFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ 'resolution': json['resolution'],
50
+ 'start': json['start'] == null ? undefined : (new Date(json['start'])),
51
+ 'end': json['end'] == null ? undefined : (new Date(json['end'])),
52
+ 'limit': json['limit'] == null ? undefined : json['limit'],
53
+ };
54
+ }
55
+ function HistoryFilterParamsToJSON(json) {
56
+ return HistoryFilterParamsToJSONTyped(json, false);
57
+ }
58
+ function HistoryFilterParamsToJSONTyped(value, ignoreDiscriminator = false) {
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+ return {
63
+ 'resolution': value['resolution'],
64
+ 'start': value['start'] == null ? value['start'] : value['start'].toISOString(),
65
+ 'end': value['end'] == null ? value['end'] : value['end'].toISOString(),
66
+ 'limit': value['limit'],
67
+ };
68
+ }
@@ -0,0 +1,79 @@
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, Limitless). 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.MarketFilterParamsSearchInEnum = exports.MarketFilterParamsSortEnum = void 0;
17
+ exports.instanceOfMarketFilterParams = instanceOfMarketFilterParams;
18
+ exports.MarketFilterParamsFromJSON = MarketFilterParamsFromJSON;
19
+ exports.MarketFilterParamsFromJSONTyped = MarketFilterParamsFromJSONTyped;
20
+ exports.MarketFilterParamsToJSON = MarketFilterParamsToJSON;
21
+ exports.MarketFilterParamsToJSONTyped = MarketFilterParamsToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.MarketFilterParamsSortEnum = {
26
+ Volume: 'volume',
27
+ Liquidity: 'liquidity',
28
+ Newest: 'newest'
29
+ };
30
+ /**
31
+ * @export
32
+ */
33
+ exports.MarketFilterParamsSearchInEnum = {
34
+ Title: 'title',
35
+ Description: 'description',
36
+ Both: 'both'
37
+ };
38
+ /**
39
+ * Check if a given object implements the MarketFilterParams interface.
40
+ */
41
+ function instanceOfMarketFilterParams(value) {
42
+ return true;
43
+ }
44
+ function MarketFilterParamsFromJSON(json) {
45
+ return MarketFilterParamsFromJSONTyped(json, false);
46
+ }
47
+ function MarketFilterParamsFromJSONTyped(json, ignoreDiscriminator) {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+ 'limit': json['limit'] == null ? undefined : json['limit'],
53
+ 'offset': json['offset'] == null ? undefined : json['offset'],
54
+ 'sort': json['sort'] == null ? undefined : json['sort'],
55
+ 'searchIn': json['searchIn'] == null ? undefined : json['searchIn'],
56
+ 'query': json['query'] == null ? undefined : json['query'],
57
+ 'slug': json['slug'] == null ? undefined : json['slug'],
58
+ 'page': json['page'] == null ? undefined : json['page'],
59
+ 'similarityThreshold': json['similarityThreshold'] == null ? undefined : json['similarityThreshold'],
60
+ };
61
+ }
62
+ function MarketFilterParamsToJSON(json) {
63
+ return MarketFilterParamsToJSONTyped(json, false);
64
+ }
65
+ function MarketFilterParamsToJSONTyped(value, ignoreDiscriminator = false) {
66
+ if (value == null) {
67
+ return value;
68
+ }
69
+ return {
70
+ 'limit': value['limit'],
71
+ 'offset': value['offset'],
72
+ 'sort': value['sort'],
73
+ 'searchIn': value['searchIn'],
74
+ 'query': value['query'],
75
+ 'slug': value['slug'],
76
+ 'page': value['page'],
77
+ 'similarityThreshold': value['similarityThreshold'],
78
+ };
79
+ }
@@ -0,0 +1,56 @@
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, Limitless). 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.instanceOfMarketOutcome = instanceOfMarketOutcome;
17
+ exports.MarketOutcomeFromJSON = MarketOutcomeFromJSON;
18
+ exports.MarketOutcomeFromJSONTyped = MarketOutcomeFromJSONTyped;
19
+ exports.MarketOutcomeToJSON = MarketOutcomeToJSON;
20
+ exports.MarketOutcomeToJSONTyped = MarketOutcomeToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the MarketOutcome interface.
23
+ */
24
+ function instanceOfMarketOutcome(value) {
25
+ return true;
26
+ }
27
+ function MarketOutcomeFromJSON(json) {
28
+ return MarketOutcomeFromJSONTyped(json, false);
29
+ }
30
+ function MarketOutcomeFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'outcomeId': json['outcomeId'] == null ? undefined : json['outcomeId'],
36
+ 'label': json['label'] == null ? undefined : json['label'],
37
+ 'price': json['price'] == null ? undefined : json['price'],
38
+ 'priceChange24h': json['priceChange24h'] == null ? undefined : json['priceChange24h'],
39
+ 'metadata': json['metadata'] == null ? undefined : json['metadata'],
40
+ };
41
+ }
42
+ function MarketOutcomeToJSON(json) {
43
+ return MarketOutcomeToJSONTyped(json, false);
44
+ }
45
+ function MarketOutcomeToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'outcomeId': value['outcomeId'],
51
+ 'label': value['label'],
52
+ 'price': value['price'],
53
+ 'priceChange24h': value['priceChange24h'],
54
+ 'metadata': value['metadata'],
55
+ };
56
+ }
@@ -0,0 +1,95 @@
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, Limitless). 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.OrderStatusEnum = exports.OrderTypeEnum = exports.OrderSideEnum = void 0;
17
+ exports.instanceOfOrder = instanceOfOrder;
18
+ exports.OrderFromJSON = OrderFromJSON;
19
+ exports.OrderFromJSONTyped = OrderFromJSONTyped;
20
+ exports.OrderToJSON = OrderToJSON;
21
+ exports.OrderToJSONTyped = OrderToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.OrderSideEnum = {
26
+ Buy: 'buy',
27
+ Sell: 'sell'
28
+ };
29
+ /**
30
+ * @export
31
+ */
32
+ exports.OrderTypeEnum = {
33
+ Limit: 'limit',
34
+ Market: 'market'
35
+ };
36
+ /**
37
+ * @export
38
+ */
39
+ exports.OrderStatusEnum = {
40
+ Pending: 'pending',
41
+ Open: 'open',
42
+ Filled: 'filled',
43
+ Cancelled: 'cancelled',
44
+ Rejected: 'rejected'
45
+ };
46
+ /**
47
+ * Check if a given object implements the Order interface.
48
+ */
49
+ function instanceOfOrder(value) {
50
+ return true;
51
+ }
52
+ function OrderFromJSON(json) {
53
+ return OrderFromJSONTyped(json, false);
54
+ }
55
+ function OrderFromJSONTyped(json, ignoreDiscriminator) {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+ 'id': json['id'] == null ? undefined : json['id'],
61
+ 'marketId': json['marketId'] == null ? undefined : json['marketId'],
62
+ 'outcomeId': json['outcomeId'] == null ? undefined : json['outcomeId'],
63
+ 'side': json['side'] == null ? undefined : json['side'],
64
+ 'type': json['type'] == null ? undefined : json['type'],
65
+ 'price': json['price'] == null ? undefined : json['price'],
66
+ 'amount': json['amount'] == null ? undefined : json['amount'],
67
+ 'status': json['status'] == null ? undefined : json['status'],
68
+ 'filled': json['filled'] == null ? undefined : json['filled'],
69
+ 'remaining': json['remaining'] == null ? undefined : json['remaining'],
70
+ 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'],
71
+ 'fee': json['fee'] == null ? undefined : json['fee'],
72
+ };
73
+ }
74
+ function OrderToJSON(json) {
75
+ return OrderToJSONTyped(json, false);
76
+ }
77
+ function OrderToJSONTyped(value, ignoreDiscriminator = false) {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+ return {
82
+ 'id': value['id'],
83
+ 'marketId': value['marketId'],
84
+ 'outcomeId': value['outcomeId'],
85
+ 'side': value['side'],
86
+ 'type': value['type'],
87
+ 'price': value['price'],
88
+ 'amount': value['amount'],
89
+ 'status': value['status'],
90
+ 'filled': value['filled'],
91
+ 'remaining': value['remaining'],
92
+ 'timestamp': value['timestamp'],
93
+ 'fee': value['fee'],
94
+ };
95
+ }
@@ -0,0 +1,53 @@
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, Limitless). 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.instanceOfOrderBook = instanceOfOrderBook;
17
+ exports.OrderBookFromJSON = OrderBookFromJSON;
18
+ exports.OrderBookFromJSONTyped = OrderBookFromJSONTyped;
19
+ exports.OrderBookToJSON = OrderBookToJSON;
20
+ exports.OrderBookToJSONTyped = OrderBookToJSONTyped;
21
+ const OrderLevel_1 = require("./OrderLevel");
22
+ /**
23
+ * Check if a given object implements the OrderBook interface.
24
+ */
25
+ function instanceOfOrderBook(value) {
26
+ return true;
27
+ }
28
+ function OrderBookFromJSON(json) {
29
+ return OrderBookFromJSONTyped(json, false);
30
+ }
31
+ function OrderBookFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'bids': json['bids'] == null ? undefined : (json['bids'].map(OrderLevel_1.OrderLevelFromJSON)),
37
+ 'asks': json['asks'] == null ? undefined : (json['asks'].map(OrderLevel_1.OrderLevelFromJSON)),
38
+ 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'],
39
+ };
40
+ }
41
+ function OrderBookToJSON(json) {
42
+ return OrderBookToJSONTyped(json, false);
43
+ }
44
+ function OrderBookToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'bids': value['bids'] == null ? undefined : (value['bids'].map(OrderLevel_1.OrderLevelToJSON)),
50
+ 'asks': value['asks'] == null ? undefined : (value['asks'].map(OrderLevel_1.OrderLevelToJSON)),
51
+ 'timestamp': value['timestamp'],
52
+ };
53
+ }
@@ -0,0 +1,50 @@
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, Limitless). 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.instanceOfOrderLevel = instanceOfOrderLevel;
17
+ exports.OrderLevelFromJSON = OrderLevelFromJSON;
18
+ exports.OrderLevelFromJSONTyped = OrderLevelFromJSONTyped;
19
+ exports.OrderLevelToJSON = OrderLevelToJSON;
20
+ exports.OrderLevelToJSONTyped = OrderLevelToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the OrderLevel interface.
23
+ */
24
+ function instanceOfOrderLevel(value) {
25
+ return true;
26
+ }
27
+ function OrderLevelFromJSON(json) {
28
+ return OrderLevelFromJSONTyped(json, false);
29
+ }
30
+ function OrderLevelFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'price': json['price'] == null ? undefined : json['price'],
36
+ 'size': json['size'] == null ? undefined : json['size'],
37
+ };
38
+ }
39
+ function OrderLevelToJSON(json) {
40
+ return OrderLevelToJSONTyped(json, false);
41
+ }
42
+ function OrderLevelToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'price': value['price'],
48
+ 'size': value['size'],
49
+ };
50
+ }