pmxtjs 2.43.3 → 2.43.4

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.
@@ -213,6 +213,9 @@ export interface FetchOrderBookRequest {
213
213
  exchange: FetchOrderBookExchangeEnum;
214
214
  outcomeId: string;
215
215
  limit?: number;
216
+ side?: FetchOrderBookSideEnum;
217
+ since?: number;
218
+ until?: number;
216
219
  }
217
220
  export interface FetchOrderBooksOperationRequest {
218
221
  exchange: FetchOrderBooksOperationExchangeEnum;
@@ -1260,6 +1263,14 @@ export declare const FetchOrderBookExchangeEnum: {
1260
1263
  readonly Router: "router";
1261
1264
  };
1262
1265
  export type FetchOrderBookExchangeEnum = typeof FetchOrderBookExchangeEnum[keyof typeof FetchOrderBookExchangeEnum];
1266
+ /**
1267
+ * @export
1268
+ */
1269
+ export declare const FetchOrderBookSideEnum: {
1270
+ readonly Yes: "yes";
1271
+ readonly No: "no";
1272
+ };
1273
+ export type FetchOrderBookSideEnum = typeof FetchOrderBookSideEnum[keyof typeof FetchOrderBookSideEnum];
1263
1274
  /**
1264
1275
  * @export
1265
1276
  */
@@ -1078,6 +1078,15 @@ export class DefaultApi extends runtime.BaseAPI {
1078
1078
  if (requestParameters['limit'] != null) {
1079
1079
  queryParameters['limit'] = requestParameters['limit'];
1080
1080
  }
1081
+ if (requestParameters['side'] != null) {
1082
+ queryParameters['side'] = requestParameters['side'];
1083
+ }
1084
+ if (requestParameters['since'] != null) {
1085
+ queryParameters['since'] = requestParameters['since'];
1086
+ }
1087
+ if (requestParameters['until'] != null) {
1088
+ queryParameters['until'] = requestParameters['until'];
1089
+ }
1081
1090
  const headerParameters = {};
1082
1091
  let urlPath = `/api/{exchange}/fetchOrderBook`;
1083
1092
  urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
@@ -2076,6 +2085,13 @@ export const FetchOrderBookExchangeEnum = {
2076
2085
  Mock: 'mock',
2077
2086
  Router: 'router'
2078
2087
  };
2088
+ /**
2089
+ * @export
2090
+ */
2091
+ export const FetchOrderBookSideEnum = {
2092
+ Yes: 'yes',
2093
+ No: 'no'
2094
+ };
2079
2095
  /**
2080
2096
  * @export
2081
2097
  */
@@ -0,0 +1,52 @@
1
+ /**
2
+ * PMXT Sidecar API
3
+ * 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.
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface FetchOrderBookParams
16
+ */
17
+ export interface FetchOrderBookParams {
18
+ /**
19
+ * Outcome side: 'yes' or 'no'. Required for exchanges like Limitless where the API returns a single orderbook per market.
20
+ * @type {string}
21
+ * @memberof FetchOrderBookParams
22
+ */
23
+ side?: FetchOrderBookParamsSideEnum;
24
+ /**
25
+ * Unix timestamp (ms) — fetch a historical snapshot at or before this time, or the start of a range when combined with `until` (hosted API only).
26
+ * @type {number}
27
+ * @memberof FetchOrderBookParams
28
+ */
29
+ since?: number;
30
+ /**
31
+ * Unix timestamp (ms) — end of a historical range. When combined with `since`, returns an array of reconstructed L2 OrderBook snapshots between `since` and `until` (hosted API only).
32
+ * @type {number}
33
+ * @memberof FetchOrderBookParams
34
+ */
35
+ until?: number;
36
+ }
37
+ /**
38
+ * @export
39
+ */
40
+ export declare const FetchOrderBookParamsSideEnum: {
41
+ readonly Yes: "yes";
42
+ readonly No: "no";
43
+ };
44
+ export type FetchOrderBookParamsSideEnum = typeof FetchOrderBookParamsSideEnum[keyof typeof FetchOrderBookParamsSideEnum];
45
+ /**
46
+ * Check if a given object implements the FetchOrderBookParams interface.
47
+ */
48
+ export declare function instanceOfFetchOrderBookParams(value: object): value is FetchOrderBookParams;
49
+ export declare function FetchOrderBookParamsFromJSON(json: any): FetchOrderBookParams;
50
+ export declare function FetchOrderBookParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): FetchOrderBookParams;
51
+ export declare function FetchOrderBookParamsToJSON(json: any): FetchOrderBookParams;
52
+ export declare function FetchOrderBookParamsToJSONTyped(value?: FetchOrderBookParams | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,52 @@
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
+ * @export
16
+ */
17
+ export const FetchOrderBookParamsSideEnum = {
18
+ Yes: 'yes',
19
+ No: 'no'
20
+ };
21
+ /**
22
+ * Check if a given object implements the FetchOrderBookParams interface.
23
+ */
24
+ export function instanceOfFetchOrderBookParams(value) {
25
+ return true;
26
+ }
27
+ export function FetchOrderBookParamsFromJSON(json) {
28
+ return FetchOrderBookParamsFromJSONTyped(json, false);
29
+ }
30
+ export function FetchOrderBookParamsFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'side': json['side'] == null ? undefined : json['side'],
36
+ 'since': json['since'] == null ? undefined : json['since'],
37
+ 'until': json['until'] == null ? undefined : json['until'],
38
+ };
39
+ }
40
+ export function FetchOrderBookParamsToJSON(json) {
41
+ return FetchOrderBookParamsToJSONTyped(json, false);
42
+ }
43
+ export function FetchOrderBookParamsToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'side': value['side'],
49
+ 'since': value['since'],
50
+ 'until': value['until'],
51
+ };
52
+ }
@@ -54,6 +54,7 @@ export * from './FetchMyTrades200Response.js';
54
54
  export * from './FetchOHLCV200Response.js';
55
55
  export * from './FetchOpenOrders200Response.js';
56
56
  export * from './FetchOrderBook200Response.js';
57
+ export * from './FetchOrderBookParams.js';
57
58
  export * from './FetchOrderBooks200Response.js';
58
59
  export * from './FetchOrderBooksRequest.js';
59
60
  export * from './FetchPositions200Response.js';
@@ -56,6 +56,7 @@ export * from './FetchMyTrades200Response.js';
56
56
  export * from './FetchOHLCV200Response.js';
57
57
  export * from './FetchOpenOrders200Response.js';
58
58
  export * from './FetchOrderBook200Response.js';
59
+ export * from './FetchOrderBookParams.js';
59
60
  export * from './FetchOrderBooks200Response.js';
60
61
  export * from './FetchOrderBooksRequest.js';
61
62
  export * from './FetchPositions200Response.js';
@@ -213,6 +213,9 @@ export interface FetchOrderBookRequest {
213
213
  exchange: FetchOrderBookExchangeEnum;
214
214
  outcomeId: string;
215
215
  limit?: number;
216
+ side?: FetchOrderBookSideEnum;
217
+ since?: number;
218
+ until?: number;
216
219
  }
217
220
  export interface FetchOrderBooksOperationRequest {
218
221
  exchange: FetchOrderBooksOperationExchangeEnum;
@@ -1260,6 +1263,14 @@ export declare const FetchOrderBookExchangeEnum: {
1260
1263
  readonly Router: "router";
1261
1264
  };
1262
1265
  export type FetchOrderBookExchangeEnum = typeof FetchOrderBookExchangeEnum[keyof typeof FetchOrderBookExchangeEnum];
1266
+ /**
1267
+ * @export
1268
+ */
1269
+ export declare const FetchOrderBookSideEnum: {
1270
+ readonly Yes: "yes";
1271
+ readonly No: "no";
1272
+ };
1273
+ export type FetchOrderBookSideEnum = typeof FetchOrderBookSideEnum[keyof typeof FetchOrderBookSideEnum];
1263
1274
  /**
1264
1275
  * @export
1265
1276
  */
@@ -46,8 +46,8 @@ var __importStar = (this && this.__importStar) || (function () {
46
46
  };
47
47
  })();
48
48
  Object.defineProperty(exports, "__esModule", { value: true });
49
- exports.FetchRelatedMarketsRelationEnum = exports.FetchRelatedMarketsExchangeEnum = exports.FetchPositionsExchangeEnum = exports.FetchOrderBooksOperationExchangeEnum = exports.FetchOrderBookExchangeEnum = exports.FetchOrderExchangeEnum = exports.FetchOpenOrdersExchangeEnum = exports.FetchOHLCVExchangeEnum = exports.FetchMyTradesExchangeEnum = exports.FetchMatchedPricesRelationsEnum = exports.FetchMatchedPricesExchangeEnum = exports.FetchMatchedMarketsRelationsEnum = exports.FetchMatchedMarketsExchangeEnum = exports.FetchMarketsPaginatedExchangeEnum = exports.FetchMarketsSearchInEnum = exports.FetchMarketsStatusEnum = exports.FetchMarketsSortEnum = exports.FetchMarketsExchangeEnum = exports.FetchMarketMatchesSortEnum = exports.FetchMarketMatchesRelationEnum = exports.FetchMarketMatchesExchangeEnum = exports.FetchMarketSearchInEnum = exports.FetchMarketStatusEnum = exports.FetchMarketSortEnum = exports.FetchMarketExchangeEnum = exports.FetchHedgesSortEnum = exports.FetchHedgesRelationEnum = exports.FetchHedgesExchangeEnum = exports.FetchEventsPaginatedExchangeEnum = exports.FetchEventsSearchInEnum = exports.FetchEventsStatusEnum = exports.FetchEventsSortEnum = exports.FetchEventsExchangeEnum = exports.FetchEventMatchesRelationEnum = exports.FetchEventMatchesExchangeEnum = exports.FetchEventSearchInEnum = exports.FetchEventStatusEnum = exports.FetchEventSortEnum = exports.FetchEventExchangeEnum = exports.FetchClosedOrdersExchangeEnum = exports.FetchBalanceExchangeEnum = exports.FetchArbitrageRelationsEnum = exports.FetchArbitrageExchangeEnum = exports.FetchAllOrdersExchangeEnum = exports.CreateOrderOperationExchangeEnum = exports.CompareMarketPricesOperationExchangeEnum = exports.CloseOperationExchangeEnum = exports.CancelOrderOperationExchangeEnum = exports.BuildOrderOperationExchangeEnum = exports.DefaultApi = void 0;
50
- exports.TestDummyMethodOperationExchangeEnum = exports.SubmitOrderOperationExchangeEnum = exports.LoadMarketsOperationExchangeEnum = exports.GetExecutionPriceDetailedOperationExchangeEnum = exports.GetExecutionPriceOperationExchangeEnum = exports.FilterMarketsOperationExchangeEnum = exports.FilterEventsOperationExchangeEnum = exports.FetchTradesExchangeEnum = exports.FetchRelatedMarketsSortEnum = void 0;
49
+ exports.FetchRelatedMarketsExchangeEnum = exports.FetchPositionsExchangeEnum = exports.FetchOrderBooksOperationExchangeEnum = exports.FetchOrderBookSideEnum = exports.FetchOrderBookExchangeEnum = exports.FetchOrderExchangeEnum = exports.FetchOpenOrdersExchangeEnum = exports.FetchOHLCVExchangeEnum = exports.FetchMyTradesExchangeEnum = exports.FetchMatchedPricesRelationsEnum = exports.FetchMatchedPricesExchangeEnum = exports.FetchMatchedMarketsRelationsEnum = exports.FetchMatchedMarketsExchangeEnum = exports.FetchMarketsPaginatedExchangeEnum = exports.FetchMarketsSearchInEnum = exports.FetchMarketsStatusEnum = exports.FetchMarketsSortEnum = exports.FetchMarketsExchangeEnum = exports.FetchMarketMatchesSortEnum = exports.FetchMarketMatchesRelationEnum = exports.FetchMarketMatchesExchangeEnum = exports.FetchMarketSearchInEnum = exports.FetchMarketStatusEnum = exports.FetchMarketSortEnum = exports.FetchMarketExchangeEnum = exports.FetchHedgesSortEnum = exports.FetchHedgesRelationEnum = exports.FetchHedgesExchangeEnum = exports.FetchEventsPaginatedExchangeEnum = exports.FetchEventsSearchInEnum = exports.FetchEventsStatusEnum = exports.FetchEventsSortEnum = exports.FetchEventsExchangeEnum = exports.FetchEventMatchesRelationEnum = exports.FetchEventMatchesExchangeEnum = exports.FetchEventSearchInEnum = exports.FetchEventStatusEnum = exports.FetchEventSortEnum = exports.FetchEventExchangeEnum = exports.FetchClosedOrdersExchangeEnum = exports.FetchBalanceExchangeEnum = exports.FetchArbitrageRelationsEnum = exports.FetchArbitrageExchangeEnum = exports.FetchAllOrdersExchangeEnum = exports.CreateOrderOperationExchangeEnum = exports.CompareMarketPricesOperationExchangeEnum = exports.CloseOperationExchangeEnum = exports.CancelOrderOperationExchangeEnum = exports.BuildOrderOperationExchangeEnum = exports.DefaultApi = void 0;
50
+ exports.TestDummyMethodOperationExchangeEnum = exports.SubmitOrderOperationExchangeEnum = exports.LoadMarketsOperationExchangeEnum = exports.GetExecutionPriceDetailedOperationExchangeEnum = exports.GetExecutionPriceOperationExchangeEnum = exports.FilterMarketsOperationExchangeEnum = exports.FilterEventsOperationExchangeEnum = exports.FetchTradesExchangeEnum = exports.FetchRelatedMarketsSortEnum = exports.FetchRelatedMarketsRelationEnum = void 0;
51
51
  const runtime = __importStar(require("../runtime"));
52
52
  const index_1 = require("../models/index");
53
53
  /**
@@ -1115,6 +1115,15 @@ class DefaultApi extends runtime.BaseAPI {
1115
1115
  if (requestParameters['limit'] != null) {
1116
1116
  queryParameters['limit'] = requestParameters['limit'];
1117
1117
  }
1118
+ if (requestParameters['side'] != null) {
1119
+ queryParameters['side'] = requestParameters['side'];
1120
+ }
1121
+ if (requestParameters['since'] != null) {
1122
+ queryParameters['since'] = requestParameters['since'];
1123
+ }
1124
+ if (requestParameters['until'] != null) {
1125
+ queryParameters['until'] = requestParameters['until'];
1126
+ }
1118
1127
  const headerParameters = {};
1119
1128
  let urlPath = `/api/{exchange}/fetchOrderBook`;
1120
1129
  urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
@@ -2114,6 +2123,13 @@ exports.FetchOrderBookExchangeEnum = {
2114
2123
  Mock: 'mock',
2115
2124
  Router: 'router'
2116
2125
  };
2126
+ /**
2127
+ * @export
2128
+ */
2129
+ exports.FetchOrderBookSideEnum = {
2130
+ Yes: 'yes',
2131
+ No: 'no'
2132
+ };
2117
2133
  /**
2118
2134
  * @export
2119
2135
  */
@@ -0,0 +1,52 @@
1
+ /**
2
+ * PMXT Sidecar API
3
+ * 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.
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface FetchOrderBookParams
16
+ */
17
+ export interface FetchOrderBookParams {
18
+ /**
19
+ * Outcome side: 'yes' or 'no'. Required for exchanges like Limitless where the API returns a single orderbook per market.
20
+ * @type {string}
21
+ * @memberof FetchOrderBookParams
22
+ */
23
+ side?: FetchOrderBookParamsSideEnum;
24
+ /**
25
+ * Unix timestamp (ms) — fetch a historical snapshot at or before this time, or the start of a range when combined with `until` (hosted API only).
26
+ * @type {number}
27
+ * @memberof FetchOrderBookParams
28
+ */
29
+ since?: number;
30
+ /**
31
+ * Unix timestamp (ms) — end of a historical range. When combined with `since`, returns an array of reconstructed L2 OrderBook snapshots between `since` and `until` (hosted API only).
32
+ * @type {number}
33
+ * @memberof FetchOrderBookParams
34
+ */
35
+ until?: number;
36
+ }
37
+ /**
38
+ * @export
39
+ */
40
+ export declare const FetchOrderBookParamsSideEnum: {
41
+ readonly Yes: "yes";
42
+ readonly No: "no";
43
+ };
44
+ export type FetchOrderBookParamsSideEnum = typeof FetchOrderBookParamsSideEnum[keyof typeof FetchOrderBookParamsSideEnum];
45
+ /**
46
+ * Check if a given object implements the FetchOrderBookParams interface.
47
+ */
48
+ export declare function instanceOfFetchOrderBookParams(value: object): value is FetchOrderBookParams;
49
+ export declare function FetchOrderBookParamsFromJSON(json: any): FetchOrderBookParams;
50
+ export declare function FetchOrderBookParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): FetchOrderBookParams;
51
+ export declare function FetchOrderBookParamsToJSON(json: any): FetchOrderBookParams;
52
+ export declare function FetchOrderBookParamsToJSONTyped(value?: FetchOrderBookParams | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
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.FetchOrderBookParamsSideEnum = void 0;
17
+ exports.instanceOfFetchOrderBookParams = instanceOfFetchOrderBookParams;
18
+ exports.FetchOrderBookParamsFromJSON = FetchOrderBookParamsFromJSON;
19
+ exports.FetchOrderBookParamsFromJSONTyped = FetchOrderBookParamsFromJSONTyped;
20
+ exports.FetchOrderBookParamsToJSON = FetchOrderBookParamsToJSON;
21
+ exports.FetchOrderBookParamsToJSONTyped = FetchOrderBookParamsToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.FetchOrderBookParamsSideEnum = {
26
+ Yes: 'yes',
27
+ No: 'no'
28
+ };
29
+ /**
30
+ * Check if a given object implements the FetchOrderBookParams interface.
31
+ */
32
+ function instanceOfFetchOrderBookParams(value) {
33
+ return true;
34
+ }
35
+ function FetchOrderBookParamsFromJSON(json) {
36
+ return FetchOrderBookParamsFromJSONTyped(json, false);
37
+ }
38
+ function FetchOrderBookParamsFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'side': json['side'] == null ? undefined : json['side'],
44
+ 'since': json['since'] == null ? undefined : json['since'],
45
+ 'until': json['until'] == null ? undefined : json['until'],
46
+ };
47
+ }
48
+ function FetchOrderBookParamsToJSON(json) {
49
+ return FetchOrderBookParamsToJSONTyped(json, false);
50
+ }
51
+ function FetchOrderBookParamsToJSONTyped(value, ignoreDiscriminator = false) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'side': value['side'],
57
+ 'since': value['since'],
58
+ 'until': value['until'],
59
+ };
60
+ }
@@ -54,6 +54,7 @@ export * from './FetchMyTrades200Response';
54
54
  export * from './FetchOHLCV200Response';
55
55
  export * from './FetchOpenOrders200Response';
56
56
  export * from './FetchOrderBook200Response';
57
+ export * from './FetchOrderBookParams';
57
58
  export * from './FetchOrderBooks200Response';
58
59
  export * from './FetchOrderBooksRequest';
59
60
  export * from './FetchPositions200Response';
@@ -72,6 +72,7 @@ __exportStar(require("./FetchMyTrades200Response"), exports);
72
72
  __exportStar(require("./FetchOHLCV200Response"), exports);
73
73
  __exportStar(require("./FetchOpenOrders200Response"), exports);
74
74
  __exportStar(require("./FetchOrderBook200Response"), exports);
75
+ __exportStar(require("./FetchOrderBookParams"), exports);
75
76
  __exportStar(require("./FetchOrderBooks200Response"), exports);
76
77
  __exportStar(require("./FetchOrderBooksRequest"), exports);
77
78
  __exportStar(require("./FetchPositions200Response"), exports);
@@ -60,6 +60,7 @@ docs/FetchMyTrades200Response.md
60
60
  docs/FetchOHLCV200Response.md
61
61
  docs/FetchOpenOrders200Response.md
62
62
  docs/FetchOrderBook200Response.md
63
+ docs/FetchOrderBookParams.md
63
64
  docs/FetchOrderBooks200Response.md
64
65
  docs/FetchOrderBooksRequest.md
65
66
  docs/FetchPositions200Response.md
@@ -168,6 +169,7 @@ src/models/FetchMyTrades200Response.ts
168
169
  src/models/FetchOHLCV200Response.ts
169
170
  src/models/FetchOpenOrders200Response.ts
170
171
  src/models/FetchOrderBook200Response.ts
172
+ src/models/FetchOrderBookParams.ts
171
173
  src/models/FetchOrderBooks200Response.ts
172
174
  src/models/FetchOrderBooksRequest.ts
173
175
  src/models/FetchPositions200Response.ts
@@ -2016,7 +2016,7 @@ No authorization required
2016
2016
 
2017
2017
  ## fetchOrderBook
2018
2018
 
2019
- > FetchOrderBook200Response fetchOrderBook(exchange, outcomeId, limit)
2019
+ > FetchOrderBook200Response fetchOrderBook(exchange, outcomeId, limit, side, since, until)
2020
2020
 
2021
2021
  Fetch Order Book
2022
2022
 
@@ -2042,6 +2042,12 @@ async function example() {
2042
2042
  outcomeId: outcomeId_example,
2043
2043
  // number (optional)
2044
2044
  limit: 8.14,
2045
+ // 'yes' | 'no' | Outcome side: \'yes\' or \'no\'. Required for exchanges like Limitless where the API returns a single orderbook per market. (optional)
2046
+ side: side_example,
2047
+ // number | Unix timestamp (ms) — fetch a historical snapshot at or before this time, or the start of a range when combined with `until` (hosted API only). (optional)
2048
+ since: 8.14,
2049
+ // number | Unix timestamp (ms) — end of a historical range. When combined with `since`, returns an array of reconstructed L2 OrderBook snapshots between `since` and `until` (hosted API only). (optional)
2050
+ until: 8.14,
2045
2051
  } satisfies FetchOrderBookRequest;
2046
2052
 
2047
2053
  try {
@@ -2064,6 +2070,9 @@ example().catch(console.error);
2064
2070
  | **exchange** | `polymarket`, `kalshi`, `kalshi-demo`, `limitless`, `probable`, `baozi`, `myriad`, `opinion`, `metaculus`, `smarkets`, `polymarket_us`, `gemini-titan`, `hyperliquid`, `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, mock, router] |
2065
2071
  | **outcomeId** | `string` | | [Defaults to `undefined`] |
2066
2072
  | **limit** | `number` | | [Optional] [Defaults to `undefined`] |
2073
+ | **side** | `yes`, `no` | Outcome side: \'yes\' or \'no\'. Required for exchanges like Limitless where the API returns a single orderbook per market. | [Optional] [Defaults to `undefined`] [Enum: yes, no] |
2074
+ | **since** | `number` | Unix timestamp (ms) — fetch a historical snapshot at or before this time, or the start of a range when combined with `until` (hosted API only). | [Optional] [Defaults to `undefined`] |
2075
+ | **until** | `number` | Unix timestamp (ms) — end of a historical range. When combined with `since`, returns an array of reconstructed L2 OrderBook snapshots between `since` and `until` (hosted API only). | [Optional] [Defaults to `undefined`] |
2067
2076
 
2068
2077
  ### Return type
2069
2078
 
@@ -0,0 +1,38 @@
1
+
2
+ # FetchOrderBookParams
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `side` | string
10
+ `since` | number
11
+ `until` | number
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { FetchOrderBookParams } from 'pmxtjs'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "side": null,
21
+ "since": null,
22
+ "until": null,
23
+ } satisfies FetchOrderBookParams
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 FetchOrderBookParams
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
+
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmxtjs",
3
- "version": "2.43.3",
3
+ "version": "2.43.4",
4
4
  "description": "OpenAPI client for pmxtjs",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -377,6 +377,9 @@ export interface FetchOrderBookRequest {
377
377
  exchange: FetchOrderBookExchangeEnum;
378
378
  outcomeId: string;
379
379
  limit?: number;
380
+ side?: FetchOrderBookSideEnum;
381
+ since?: number;
382
+ until?: number;
380
383
  }
381
384
 
382
385
  export interface FetchOrderBooksOperationRequest {
@@ -1923,6 +1926,18 @@ export class DefaultApi extends runtime.BaseAPI {
1923
1926
  queryParameters['limit'] = requestParameters['limit'];
1924
1927
  }
1925
1928
 
1929
+ if (requestParameters['side'] != null) {
1930
+ queryParameters['side'] = requestParameters['side'];
1931
+ }
1932
+
1933
+ if (requestParameters['since'] != null) {
1934
+ queryParameters['since'] = requestParameters['since'];
1935
+ }
1936
+
1937
+ if (requestParameters['until'] != null) {
1938
+ queryParameters['until'] = requestParameters['until'];
1939
+ }
1940
+
1926
1941
  const headerParameters: runtime.HTTPHeaders = {};
1927
1942
 
1928
1943
 
@@ -3130,6 +3145,14 @@ export const FetchOrderBookExchangeEnum = {
3130
3145
  Router: 'router'
3131
3146
  } as const;
3132
3147
  export type FetchOrderBookExchangeEnum = typeof FetchOrderBookExchangeEnum[keyof typeof FetchOrderBookExchangeEnum];
3148
+ /**
3149
+ * @export
3150
+ */
3151
+ export const FetchOrderBookSideEnum = {
3152
+ Yes: 'yes',
3153
+ No: 'no'
3154
+ } as const;
3155
+ export type FetchOrderBookSideEnum = typeof FetchOrderBookSideEnum[keyof typeof FetchOrderBookSideEnum];
3133
3156
  /**
3134
3157
  * @export
3135
3158
  */
@@ -0,0 +1,92 @@
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface FetchOrderBookParams
20
+ */
21
+ export interface FetchOrderBookParams {
22
+ /**
23
+ * Outcome side: 'yes' or 'no'. Required for exchanges like Limitless where the API returns a single orderbook per market.
24
+ * @type {string}
25
+ * @memberof FetchOrderBookParams
26
+ */
27
+ side?: FetchOrderBookParamsSideEnum;
28
+ /**
29
+ * Unix timestamp (ms) — fetch a historical snapshot at or before this time, or the start of a range when combined with `until` (hosted API only).
30
+ * @type {number}
31
+ * @memberof FetchOrderBookParams
32
+ */
33
+ since?: number;
34
+ /**
35
+ * Unix timestamp (ms) — end of a historical range. When combined with `since`, returns an array of reconstructed L2 OrderBook snapshots between `since` and `until` (hosted API only).
36
+ * @type {number}
37
+ * @memberof FetchOrderBookParams
38
+ */
39
+ until?: number;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const FetchOrderBookParamsSideEnum = {
47
+ Yes: 'yes',
48
+ No: 'no'
49
+ } as const;
50
+ export type FetchOrderBookParamsSideEnum = typeof FetchOrderBookParamsSideEnum[keyof typeof FetchOrderBookParamsSideEnum];
51
+
52
+
53
+ /**
54
+ * Check if a given object implements the FetchOrderBookParams interface.
55
+ */
56
+ export function instanceOfFetchOrderBookParams(value: object): value is FetchOrderBookParams {
57
+ return true;
58
+ }
59
+
60
+ export function FetchOrderBookParamsFromJSON(json: any): FetchOrderBookParams {
61
+ return FetchOrderBookParamsFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function FetchOrderBookParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): FetchOrderBookParams {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'side': json['side'] == null ? undefined : json['side'],
71
+ 'since': json['since'] == null ? undefined : json['since'],
72
+ 'until': json['until'] == null ? undefined : json['until'],
73
+ };
74
+ }
75
+
76
+ export function FetchOrderBookParamsToJSON(json: any): FetchOrderBookParams {
77
+ return FetchOrderBookParamsToJSONTyped(json, false);
78
+ }
79
+
80
+ export function FetchOrderBookParamsToJSONTyped(value?: FetchOrderBookParams | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'side': value['side'],
88
+ 'since': value['since'],
89
+ 'until': value['until'],
90
+ };
91
+ }
92
+
@@ -56,6 +56,7 @@ export * from './FetchMyTrades200Response';
56
56
  export * from './FetchOHLCV200Response';
57
57
  export * from './FetchOpenOrders200Response';
58
58
  export * from './FetchOrderBook200Response';
59
+ export * from './FetchOrderBookParams';
59
60
  export * from './FetchOrderBooks200Response';
60
61
  export * from './FetchOrderBooksRequest';
61
62
  export * from './FetchPositions200Response';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmxtjs",
3
- "version": "2.43.3",
3
+ "version": "2.43.4",
4
4
  "description": "Unified prediction market data API - The ccxt for prediction markets",
5
5
  "author": "PMXT Contributors",
6
6
  "repository": {
@@ -43,7 +43,7 @@
43
43
  "unified"
44
44
  ],
45
45
  "dependencies": {
46
- "pmxt-core": "2.43.3",
46
+ "pmxt-core": "2.43.4",
47
47
  "ws": "^8.18.0"
48
48
  },
49
49
  "devDependencies": {