pmxtjs 1.3.4 → 1.4.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 (52) hide show
  1. package/dist/esm/generated/src/apis/DefaultApi.d.ts +41 -1
  2. package/dist/esm/generated/src/apis/DefaultApi.js +71 -1
  3. package/dist/esm/generated/src/models/ExecutionPriceResult.d.ts +44 -0
  4. package/dist/esm/generated/src/models/ExecutionPriceResult.js +45 -0
  5. package/dist/esm/generated/src/models/GetExecutionPrice200Response.d.ts +45 -0
  6. package/dist/esm/generated/src/models/GetExecutionPrice200Response.js +46 -0
  7. package/dist/esm/generated/src/models/GetExecutionPriceDetailed200Response.d.ts +46 -0
  8. package/dist/esm/generated/src/models/GetExecutionPriceDetailed200Response.js +47 -0
  9. package/dist/esm/generated/src/models/GetExecutionPriceRequest.d.ts +40 -0
  10. package/dist/esm/generated/src/models/GetExecutionPriceRequest.js +47 -0
  11. package/dist/esm/generated/src/models/GetExecutionPriceRequestArgsInner.d.ts +22 -0
  12. package/dist/esm/generated/src/models/GetExecutionPriceRequestArgsInner.js +56 -0
  13. package/dist/esm/generated/src/models/index.d.ts +5 -0
  14. package/dist/esm/generated/src/models/index.js +5 -0
  15. package/dist/esm/pmxt/client.d.ts +21 -1
  16. package/dist/esm/pmxt/client.js +52 -0
  17. package/dist/esm/pmxt/models.d.ts +11 -0
  18. package/dist/generated/src/apis/DefaultApi.d.ts +41 -1
  19. package/dist/generated/src/apis/DefaultApi.js +71 -1
  20. package/dist/generated/src/models/ExecutionPriceResult.d.ts +44 -0
  21. package/dist/generated/src/models/ExecutionPriceResult.js +52 -0
  22. package/dist/generated/src/models/GetExecutionPrice200Response.d.ts +45 -0
  23. package/dist/generated/src/models/GetExecutionPrice200Response.js +53 -0
  24. package/dist/generated/src/models/GetExecutionPriceDetailed200Response.d.ts +46 -0
  25. package/dist/generated/src/models/GetExecutionPriceDetailed200Response.js +54 -0
  26. package/dist/generated/src/models/GetExecutionPriceRequest.d.ts +40 -0
  27. package/dist/generated/src/models/GetExecutionPriceRequest.js +54 -0
  28. package/dist/generated/src/models/GetExecutionPriceRequestArgsInner.d.ts +22 -0
  29. package/dist/generated/src/models/GetExecutionPriceRequestArgsInner.js +62 -0
  30. package/dist/generated/src/models/index.d.ts +5 -0
  31. package/dist/generated/src/models/index.js +5 -0
  32. package/dist/pmxt/client.d.ts +21 -1
  33. package/dist/pmxt/client.js +52 -0
  34. package/dist/pmxt/models.d.ts +11 -0
  35. package/generated/.openapi-generator/FILES +10 -0
  36. package/generated/docs/DefaultApi.md +138 -0
  37. package/generated/docs/ExecutionPriceResult.md +38 -0
  38. package/generated/docs/GetExecutionPrice200Response.md +38 -0
  39. package/generated/docs/GetExecutionPriceDetailed200Response.md +38 -0
  40. package/generated/docs/GetExecutionPriceRequest.md +36 -0
  41. package/generated/docs/GetExecutionPriceRequestArgsInner.md +38 -0
  42. package/generated/package.json +1 -1
  43. package/generated/src/apis/DefaultApi.ts +115 -0
  44. package/generated/src/models/ExecutionPriceResult.ts +81 -0
  45. package/generated/src/models/GetExecutionPrice200Response.ts +89 -0
  46. package/generated/src/models/GetExecutionPriceDetailed200Response.ts +96 -0
  47. package/generated/src/models/GetExecutionPriceRequest.ts +89 -0
  48. package/generated/src/models/GetExecutionPriceRequestArgsInner.ts +75 -0
  49. package/generated/src/models/index.ts +5 -0
  50. package/package.json +2 -2
  51. package/pmxt/client.ts +62 -0
  52. package/pmxt/models.ts +14 -0
@@ -5,7 +5,7 @@
5
5
  * OpenAPI client, matching the Python API exactly.
6
6
  */
7
7
  import { DefaultApi, Configuration, ExchangeCredentials } from "../generated/src/index.js";
8
- import { UnifiedMarket, PriceCandle, OrderBook, Trade, Order, Position, Balance, MarketFilterParams, HistoryFilterParams, CreateOrderParams, UnifiedEvent } from "./models.js";
8
+ import { UnifiedMarket, PriceCandle, OrderBook, Trade, Order, Position, Balance, MarketFilterParams, HistoryFilterParams, CreateOrderParams, UnifiedEvent, ExecutionPriceResult } from "./models.js";
9
9
  import { ServerManager } from "./server-manager.js";
10
10
  /**
11
11
  * Base exchange client options.
@@ -234,6 +234,26 @@ export declare abstract class Exchange {
234
234
  * @returns List of balances (by currency)
235
235
  */
236
236
  fetchBalance(): Promise<Balance[]>;
237
+ /**
238
+ * Calculate the average execution price for a given amount by walking the order book.
239
+ * Uses the sidecar server for calculation to ensure consistency.
240
+ *
241
+ * @param orderBook - The current order book
242
+ * @param side - 'buy' or 'sell'
243
+ * @param amount - The amount to execute
244
+ * @returns The volume-weighted average price, or 0 if insufficient liquidity
245
+ */
246
+ getExecutionPrice(orderBook: OrderBook, side: 'buy' | 'sell', amount: number): Promise<number>;
247
+ /**
248
+ * Calculate detailed execution price information.
249
+ * Uses the sidecar server for calculation to ensure consistency.
250
+ *
251
+ * @param orderBook - The current order book
252
+ * @param side - 'buy' or 'sell'
253
+ * @param amount - The amount to execute
254
+ * @returns Detailed execution result
255
+ */
256
+ getExecutionPriceDetailed(orderBook: OrderBook, side: 'buy' | 'sell', amount: number): Promise<ExecutionPriceResult>;
237
257
  }
238
258
  /**
239
259
  * Polymarket exchange client.
@@ -732,6 +732,58 @@ export class Exchange {
732
732
  throw new Error(`Failed to fetch balance: ${error}`);
733
733
  }
734
734
  }
735
+ /**
736
+ * Calculate the average execution price for a given amount by walking the order book.
737
+ * Uses the sidecar server for calculation to ensure consistency.
738
+ *
739
+ * @param orderBook - The current order book
740
+ * @param side - 'buy' or 'sell'
741
+ * @param amount - The amount to execute
742
+ * @returns The volume-weighted average price, or 0 if insufficient liquidity
743
+ */
744
+ async getExecutionPrice(orderBook, side, amount) {
745
+ const result = await this.getExecutionPriceDetailed(orderBook, side, amount);
746
+ return result.fullyFilled ? result.price : 0;
747
+ }
748
+ /**
749
+ * Calculate detailed execution price information.
750
+ * Uses the sidecar server for calculation to ensure consistency.
751
+ *
752
+ * @param orderBook - The current order book
753
+ * @param side - 'buy' or 'sell'
754
+ * @param amount - The amount to execute
755
+ * @returns Detailed execution result
756
+ */
757
+ async getExecutionPriceDetailed(orderBook, side, amount) {
758
+ await this.initPromise;
759
+ try {
760
+ const body = {
761
+ args: [orderBook, side, amount]
762
+ };
763
+ const credentials = this.getCredentials();
764
+ if (credentials) {
765
+ body.credentials = credentials;
766
+ }
767
+ const url = `${this.config.basePath}/api/${this.exchangeName}/getExecutionPriceDetailed`;
768
+ const response = await fetch(url, {
769
+ method: 'POST',
770
+ headers: {
771
+ 'Content-Type': 'application/json',
772
+ ...this.config.headers
773
+ },
774
+ body: JSON.stringify(body)
775
+ });
776
+ if (!response.ok) {
777
+ const error = await response.json().catch(() => ({}));
778
+ throw new Error(error.error?.message || response.statusText);
779
+ }
780
+ const json = await response.json();
781
+ return this.handleResponse(json);
782
+ }
783
+ catch (error) {
784
+ throw new Error(`Failed to get execution price: ${error}`);
785
+ }
786
+ }
735
787
  }
736
788
  /**
737
789
  * Polymarket exchange client.
@@ -98,6 +98,17 @@ export interface OrderBook {
98
98
  /** Unix timestamp (milliseconds) */
99
99
  timestamp?: number;
100
100
  }
101
+ /**
102
+ * Result of an execution price calculation.
103
+ */
104
+ export interface ExecutionPriceResult {
105
+ /** The volume-weighted average price */
106
+ price: number;
107
+ /** The actual amount that can be filled */
108
+ filledAmount: number;
109
+ /** Whether the full requested amount can be filled */
110
+ fullyFilled: boolean;
111
+ }
101
112
  /**
102
113
  * A historical trade.
103
114
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CancelOrderRequest, CreateOrder200Response, CreateOrderRequest, FetchBalance200Response, FetchMarkets200Response, FetchMarketsRequest, FetchOHLCV200Response, FetchOHLCVRequest, FetchOpenOrders200Response, FetchOpenOrdersRequest, FetchOrderBook200Response, FetchOrderBookRequest, FetchPositions200Response, FetchPositionsRequest, FetchTrades200Response, FetchTradesRequest, GetMarketsBySlugRequest, HealthCheck200Response, SearchEvents200Response, SearchEventsRequest, SearchMarketsRequest, WatchOrderBookRequest, WatchTradesRequest } from '../models/index';
13
+ import type { CancelOrderRequest, CreateOrder200Response, CreateOrderRequest, FetchBalance200Response, FetchMarkets200Response, FetchMarketsRequest, FetchOHLCV200Response, FetchOHLCVRequest, FetchOpenOrders200Response, FetchOpenOrdersRequest, FetchOrderBook200Response, FetchOrderBookRequest, FetchPositions200Response, FetchPositionsRequest, FetchTrades200Response, FetchTradesRequest, GetExecutionPrice200Response, GetExecutionPriceDetailed200Response, GetExecutionPriceRequest, GetMarketsBySlugRequest, HealthCheck200Response, SearchEvents200Response, SearchEventsRequest, SearchMarketsRequest, WatchOrderBookRequest, WatchTradesRequest } from '../models/index';
14
14
  export interface CancelOrderOperationRequest {
15
15
  exchange: CancelOrderOperationExchangeEnum;
16
16
  cancelOrderRequest?: CancelOrderRequest;
@@ -51,6 +51,14 @@ export interface FetchTradesOperationRequest {
51
51
  exchange: FetchTradesOperationExchangeEnum;
52
52
  fetchTradesRequest?: FetchTradesRequest;
53
53
  }
54
+ export interface GetExecutionPriceOperationRequest {
55
+ exchange: GetExecutionPriceOperationExchangeEnum;
56
+ getExecutionPriceRequest?: GetExecutionPriceRequest;
57
+ }
58
+ export interface GetExecutionPriceDetailedRequest {
59
+ exchange: GetExecutionPriceDetailedExchangeEnum;
60
+ getExecutionPriceRequest?: GetExecutionPriceRequest;
61
+ }
54
62
  export interface GetMarketsBySlugOperationRequest {
55
63
  exchange: GetMarketsBySlugOperationExchangeEnum;
56
64
  getMarketsBySlugRequest?: GetMarketsBySlugRequest;
@@ -155,6 +163,22 @@ export declare class DefaultApi extends runtime.BaseAPI {
155
163
  * Fetch Trades
156
164
  */
157
165
  fetchTrades(requestParameters: FetchTradesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchTrades200Response>;
166
+ /**
167
+ * Get Execution Price
168
+ */
169
+ getExecutionPriceRaw(requestParameters: GetExecutionPriceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetExecutionPrice200Response>>;
170
+ /**
171
+ * Get Execution Price
172
+ */
173
+ getExecutionPrice(requestParameters: GetExecutionPriceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetExecutionPrice200Response>;
174
+ /**
175
+ * Get Detailed Execution Price
176
+ */
177
+ getExecutionPriceDetailedRaw(requestParameters: GetExecutionPriceDetailedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetExecutionPriceDetailed200Response>>;
178
+ /**
179
+ * Get Detailed Execution Price
180
+ */
181
+ getExecutionPriceDetailed(requestParameters: GetExecutionPriceDetailedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetExecutionPriceDetailed200Response>;
158
182
  /**
159
183
  * Get Market by Slug
160
184
  */
@@ -292,6 +316,22 @@ export declare const FetchTradesOperationExchangeEnum: {
292
316
  readonly Kalshi: "kalshi";
293
317
  };
294
318
  export type FetchTradesOperationExchangeEnum = typeof FetchTradesOperationExchangeEnum[keyof typeof FetchTradesOperationExchangeEnum];
319
+ /**
320
+ * @export
321
+ */
322
+ export declare const GetExecutionPriceOperationExchangeEnum: {
323
+ readonly Polymarket: "polymarket";
324
+ readonly Kalshi: "kalshi";
325
+ };
326
+ export type GetExecutionPriceOperationExchangeEnum = typeof GetExecutionPriceOperationExchangeEnum[keyof typeof GetExecutionPriceOperationExchangeEnum];
327
+ /**
328
+ * @export
329
+ */
330
+ export declare const GetExecutionPriceDetailedExchangeEnum: {
331
+ readonly Polymarket: "polymarket";
332
+ readonly Kalshi: "kalshi";
333
+ };
334
+ export type GetExecutionPriceDetailedExchangeEnum = typeof GetExecutionPriceDetailedExchangeEnum[keyof typeof GetExecutionPriceDetailedExchangeEnum];
295
335
  /**
296
336
  * @export
297
337
  */
@@ -46,7 +46,7 @@ var __importStar = (this && this.__importStar) || (function () {
46
46
  };
47
47
  })();
48
48
  Object.defineProperty(exports, "__esModule", { value: true });
49
- exports.WatchTradesOperationExchangeEnum = exports.WatchOrderBookOperationExchangeEnum = exports.SearchMarketsOperationExchangeEnum = exports.SearchEventsOperationExchangeEnum = exports.GetMarketsBySlugOperationExchangeEnum = exports.FetchTradesOperationExchangeEnum = exports.FetchPositionsOperationExchangeEnum = exports.FetchOrderBookOperationExchangeEnum = exports.FetchOrderExchangeEnum = exports.FetchOpenOrdersOperationExchangeEnum = exports.FetchOHLCVOperationExchangeEnum = exports.FetchMarketsOperationExchangeEnum = exports.FetchBalanceExchangeEnum = exports.CreateOrderOperationExchangeEnum = exports.CancelOrderOperationExchangeEnum = exports.DefaultApi = void 0;
49
+ exports.WatchTradesOperationExchangeEnum = exports.WatchOrderBookOperationExchangeEnum = exports.SearchMarketsOperationExchangeEnum = exports.SearchEventsOperationExchangeEnum = exports.GetMarketsBySlugOperationExchangeEnum = exports.GetExecutionPriceDetailedExchangeEnum = exports.GetExecutionPriceOperationExchangeEnum = exports.FetchTradesOperationExchangeEnum = exports.FetchPositionsOperationExchangeEnum = exports.FetchOrderBookOperationExchangeEnum = exports.FetchOrderExchangeEnum = exports.FetchOpenOrdersOperationExchangeEnum = exports.FetchOHLCVOperationExchangeEnum = exports.FetchMarketsOperationExchangeEnum = exports.FetchBalanceExchangeEnum = exports.CreateOrderOperationExchangeEnum = exports.CancelOrderOperationExchangeEnum = exports.DefaultApi = void 0;
50
50
  const runtime = __importStar(require("../runtime"));
51
51
  const index_1 = require("../models/index");
52
52
  /**
@@ -333,6 +333,62 @@ class DefaultApi extends runtime.BaseAPI {
333
333
  const response = await this.fetchTradesRaw(requestParameters, initOverrides);
334
334
  return await response.value();
335
335
  }
336
+ /**
337
+ * Get Execution Price
338
+ */
339
+ async getExecutionPriceRaw(requestParameters, initOverrides) {
340
+ if (requestParameters['exchange'] == null) {
341
+ throw new runtime.RequiredError('exchange', 'Required parameter "exchange" was null or undefined when calling getExecutionPrice().');
342
+ }
343
+ const queryParameters = {};
344
+ const headerParameters = {};
345
+ headerParameters['Content-Type'] = 'application/json';
346
+ let urlPath = `/api/{exchange}/getExecutionPrice`;
347
+ urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
348
+ const response = await this.request({
349
+ path: urlPath,
350
+ method: 'POST',
351
+ headers: headerParameters,
352
+ query: queryParameters,
353
+ body: (0, index_1.GetExecutionPriceRequestToJSON)(requestParameters['getExecutionPriceRequest']),
354
+ }, initOverrides);
355
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetExecutionPrice200ResponseFromJSON)(jsonValue));
356
+ }
357
+ /**
358
+ * Get Execution Price
359
+ */
360
+ async getExecutionPrice(requestParameters, initOverrides) {
361
+ const response = await this.getExecutionPriceRaw(requestParameters, initOverrides);
362
+ return await response.value();
363
+ }
364
+ /**
365
+ * Get Detailed Execution Price
366
+ */
367
+ async getExecutionPriceDetailedRaw(requestParameters, initOverrides) {
368
+ if (requestParameters['exchange'] == null) {
369
+ throw new runtime.RequiredError('exchange', 'Required parameter "exchange" was null or undefined when calling getExecutionPriceDetailed().');
370
+ }
371
+ const queryParameters = {};
372
+ const headerParameters = {};
373
+ headerParameters['Content-Type'] = 'application/json';
374
+ let urlPath = `/api/{exchange}/getExecutionPriceDetailed`;
375
+ urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
376
+ const response = await this.request({
377
+ path: urlPath,
378
+ method: 'POST',
379
+ headers: headerParameters,
380
+ query: queryParameters,
381
+ body: (0, index_1.GetExecutionPriceRequestToJSON)(requestParameters['getExecutionPriceRequest']),
382
+ }, initOverrides);
383
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetExecutionPriceDetailed200ResponseFromJSON)(jsonValue));
384
+ }
385
+ /**
386
+ * Get Detailed Execution Price
387
+ */
388
+ async getExecutionPriceDetailed(requestParameters, initOverrides) {
389
+ const response = await this.getExecutionPriceDetailedRaw(requestParameters, initOverrides);
390
+ return await response.value();
391
+ }
336
392
  /**
337
393
  * Get Market by Slug
338
394
  */
@@ -575,6 +631,20 @@ exports.FetchTradesOperationExchangeEnum = {
575
631
  Polymarket: 'polymarket',
576
632
  Kalshi: 'kalshi'
577
633
  };
634
+ /**
635
+ * @export
636
+ */
637
+ exports.GetExecutionPriceOperationExchangeEnum = {
638
+ Polymarket: 'polymarket',
639
+ Kalshi: 'kalshi'
640
+ };
641
+ /**
642
+ * @export
643
+ */
644
+ exports.GetExecutionPriceDetailedExchangeEnum = {
645
+ Polymarket: 'polymarket',
646
+ Kalshi: 'kalshi'
647
+ };
578
648
  /**
579
649
  * @export
580
650
  */
@@ -0,0 +1,44 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface ExecutionPriceResult
16
+ */
17
+ export interface ExecutionPriceResult {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof ExecutionPriceResult
22
+ */
23
+ price?: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof ExecutionPriceResult
28
+ */
29
+ filledAmount?: number;
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof ExecutionPriceResult
34
+ */
35
+ fullyFilled?: boolean;
36
+ }
37
+ /**
38
+ * Check if a given object implements the ExecutionPriceResult interface.
39
+ */
40
+ export declare function instanceOfExecutionPriceResult(value: object): value is ExecutionPriceResult;
41
+ export declare function ExecutionPriceResultFromJSON(json: any): ExecutionPriceResult;
42
+ export declare function ExecutionPriceResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExecutionPriceResult;
43
+ export declare function ExecutionPriceResultToJSON(json: any): ExecutionPriceResult;
44
+ export declare function ExecutionPriceResultToJSONTyped(value?: ExecutionPriceResult | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,52 @@
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.instanceOfExecutionPriceResult = instanceOfExecutionPriceResult;
17
+ exports.ExecutionPriceResultFromJSON = ExecutionPriceResultFromJSON;
18
+ exports.ExecutionPriceResultFromJSONTyped = ExecutionPriceResultFromJSONTyped;
19
+ exports.ExecutionPriceResultToJSON = ExecutionPriceResultToJSON;
20
+ exports.ExecutionPriceResultToJSONTyped = ExecutionPriceResultToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ExecutionPriceResult interface.
23
+ */
24
+ function instanceOfExecutionPriceResult(value) {
25
+ return true;
26
+ }
27
+ function ExecutionPriceResultFromJSON(json) {
28
+ return ExecutionPriceResultFromJSONTyped(json, false);
29
+ }
30
+ function ExecutionPriceResultFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'price': json['price'] == null ? undefined : json['price'],
36
+ 'filledAmount': json['filledAmount'] == null ? undefined : json['filledAmount'],
37
+ 'fullyFilled': json['fullyFilled'] == null ? undefined : json['fullyFilled'],
38
+ };
39
+ }
40
+ function ExecutionPriceResultToJSON(json) {
41
+ return ExecutionPriceResultToJSONTyped(json, false);
42
+ }
43
+ function ExecutionPriceResultToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'price': value['price'],
49
+ 'filledAmount': value['filledAmount'],
50
+ 'fullyFilled': value['fullyFilled'],
51
+ };
52
+ }
@@ -0,0 +1,45 @@
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
+ /**
14
+ *
15
+ * @export
16
+ * @interface GetExecutionPrice200Response
17
+ */
18
+ export interface GetExecutionPrice200Response {
19
+ /**
20
+ *
21
+ * @type {boolean}
22
+ * @memberof GetExecutionPrice200Response
23
+ */
24
+ success?: boolean;
25
+ /**
26
+ *
27
+ * @type {ErrorDetail}
28
+ * @memberof GetExecutionPrice200Response
29
+ */
30
+ error?: ErrorDetail;
31
+ /**
32
+ *
33
+ * @type {number}
34
+ * @memberof GetExecutionPrice200Response
35
+ */
36
+ data?: number;
37
+ }
38
+ /**
39
+ * Check if a given object implements the GetExecutionPrice200Response interface.
40
+ */
41
+ export declare function instanceOfGetExecutionPrice200Response(value: object): value is GetExecutionPrice200Response;
42
+ export declare function GetExecutionPrice200ResponseFromJSON(json: any): GetExecutionPrice200Response;
43
+ export declare function GetExecutionPrice200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetExecutionPrice200Response;
44
+ export declare function GetExecutionPrice200ResponseToJSON(json: any): GetExecutionPrice200Response;
45
+ export declare function GetExecutionPrice200ResponseToJSONTyped(value?: GetExecutionPrice200Response | null, ignoreDiscriminator?: boolean): any;
@@ -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). 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.instanceOfGetExecutionPrice200Response = instanceOfGetExecutionPrice200Response;
17
+ exports.GetExecutionPrice200ResponseFromJSON = GetExecutionPrice200ResponseFromJSON;
18
+ exports.GetExecutionPrice200ResponseFromJSONTyped = GetExecutionPrice200ResponseFromJSONTyped;
19
+ exports.GetExecutionPrice200ResponseToJSON = GetExecutionPrice200ResponseToJSON;
20
+ exports.GetExecutionPrice200ResponseToJSONTyped = GetExecutionPrice200ResponseToJSONTyped;
21
+ const ErrorDetail_1 = require("./ErrorDetail");
22
+ /**
23
+ * Check if a given object implements the GetExecutionPrice200Response interface.
24
+ */
25
+ function instanceOfGetExecutionPrice200Response(value) {
26
+ return true;
27
+ }
28
+ function GetExecutionPrice200ResponseFromJSON(json) {
29
+ return GetExecutionPrice200ResponseFromJSONTyped(json, false);
30
+ }
31
+ function GetExecutionPrice200ResponseFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'success': json['success'] == null ? undefined : json['success'],
37
+ 'error': json['error'] == null ? undefined : (0, ErrorDetail_1.ErrorDetailFromJSON)(json['error']),
38
+ 'data': json['data'] == null ? undefined : json['data'],
39
+ };
40
+ }
41
+ function GetExecutionPrice200ResponseToJSON(json) {
42
+ return GetExecutionPrice200ResponseToJSONTyped(json, false);
43
+ }
44
+ function GetExecutionPrice200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'success': value['success'],
50
+ 'error': (0, ErrorDetail_1.ErrorDetailToJSON)(value['error']),
51
+ 'data': value['data'],
52
+ };
53
+ }
@@ -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 { ExecutionPriceResult } from './ExecutionPriceResult';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface GetExecutionPriceDetailed200Response
18
+ */
19
+ export interface GetExecutionPriceDetailed200Response {
20
+ /**
21
+ *
22
+ * @type {boolean}
23
+ * @memberof GetExecutionPriceDetailed200Response
24
+ */
25
+ success?: boolean;
26
+ /**
27
+ *
28
+ * @type {ErrorDetail}
29
+ * @memberof GetExecutionPriceDetailed200Response
30
+ */
31
+ error?: ErrorDetail;
32
+ /**
33
+ *
34
+ * @type {ExecutionPriceResult}
35
+ * @memberof GetExecutionPriceDetailed200Response
36
+ */
37
+ data?: ExecutionPriceResult;
38
+ }
39
+ /**
40
+ * Check if a given object implements the GetExecutionPriceDetailed200Response interface.
41
+ */
42
+ export declare function instanceOfGetExecutionPriceDetailed200Response(value: object): value is GetExecutionPriceDetailed200Response;
43
+ export declare function GetExecutionPriceDetailed200ResponseFromJSON(json: any): GetExecutionPriceDetailed200Response;
44
+ export declare function GetExecutionPriceDetailed200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetExecutionPriceDetailed200Response;
45
+ export declare function GetExecutionPriceDetailed200ResponseToJSON(json: any): GetExecutionPriceDetailed200Response;
46
+ export declare function GetExecutionPriceDetailed200ResponseToJSONTyped(value?: GetExecutionPriceDetailed200Response | 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.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,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 { GetExecutionPriceRequestArgsInner } from './GetExecutionPriceRequestArgsInner';
13
+ import type { ExchangeCredentials } from './ExchangeCredentials';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface GetExecutionPriceRequest
18
+ */
19
+ export interface GetExecutionPriceRequest {
20
+ /**
21
+ * [orderBook, side, amount]
22
+ * @type {Array<GetExecutionPriceRequestArgsInner>}
23
+ * @memberof GetExecutionPriceRequest
24
+ */
25
+ args: Array<GetExecutionPriceRequestArgsInner>;
26
+ /**
27
+ *
28
+ * @type {ExchangeCredentials}
29
+ * @memberof GetExecutionPriceRequest
30
+ */
31
+ credentials?: ExchangeCredentials;
32
+ }
33
+ /**
34
+ * Check if a given object implements the GetExecutionPriceRequest interface.
35
+ */
36
+ export declare function instanceOfGetExecutionPriceRequest(value: object): value is GetExecutionPriceRequest;
37
+ export declare function GetExecutionPriceRequestFromJSON(json: any): GetExecutionPriceRequest;
38
+ export declare function GetExecutionPriceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetExecutionPriceRequest;
39
+ export declare function GetExecutionPriceRequestToJSON(json: any): GetExecutionPriceRequest;
40
+ export declare function GetExecutionPriceRequestToJSONTyped(value?: GetExecutionPriceRequest | 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.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
+ }