pmxtjs 2.5.0 → 2.7.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.
- package/dist/esm/generated/src/apis/DefaultApi.d.ts +8 -8
- package/dist/esm/generated/src/apis/DefaultApi.js +3 -3
- package/dist/esm/generated/src/models/FetchMarketRequest.d.ts +40 -0
- package/dist/esm/generated/src/models/FetchMarketRequest.js +45 -0
- package/dist/esm/generated/src/models/FetchMarketsRequest.d.ts +6 -0
- package/dist/esm/generated/src/models/FetchMarketsRequest.js +2 -0
- package/dist/esm/generated/src/models/index.d.ts +1 -0
- package/dist/esm/generated/src/models/index.js +1 -0
- package/dist/generated/src/apis/DefaultApi.d.ts +8 -8
- package/dist/generated/src/apis/DefaultApi.js +3 -3
- package/dist/generated/src/models/FetchMarketRequest.d.ts +40 -0
- package/dist/generated/src/models/FetchMarketRequest.js +52 -0
- package/dist/generated/src/models/FetchMarketsRequest.d.ts +6 -0
- package/dist/generated/src/models/FetchMarketsRequest.js +2 -0
- package/dist/generated/src/models/index.d.ts +1 -0
- package/dist/generated/src/models/index.js +1 -0
- package/generated/.openapi-generator/FILES +2 -0
- package/generated/docs/DefaultApi.md +7 -7
- package/generated/docs/FetchMarketRequest.md +36 -0
- package/generated/docs/FetchMarketsRequest.md +2 -0
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +11 -8
- package/generated/src/models/FetchMarketRequest.ts +88 -0
- package/generated/src/models/FetchMarketsRequest.ts +8 -0
- package/generated/src/models/index.ts +1 -0
- package/package.json +2 -2
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
|
-
import type { BaseResponse, CancelOrderRequest, CreateOrder200Response, CreateOrderRequest, FetchBalance200Response, FetchEvent200Response, FetchEvents200Response, FetchEventsRequest, FetchMarket200Response, FetchMarkets200Response, FetchMarketsRequest, FetchOHLCV200Response, FetchOHLCVRequest, FetchOpenOrders200Response, FetchOpenOrdersRequest, FetchOrderBook200Response, FetchOrderBookRequest, FetchPositions200Response, FetchPositionsRequest, FetchTrades200Response, FetchTradesRequest, FilterEventsRequest, FilterMarketsRequest, GetExecutionPrice200Response, GetExecutionPriceDetailed200Response, GetExecutionPriceRequest, HealthCheck200Response, WatchOrderBookRequest, WatchPricesRequest, WatchTradesRequest, WatchUserPositionsRequest } from '../models/index.js';
|
|
13
|
+
import type { BaseResponse, CancelOrderRequest, CreateOrder200Response, CreateOrderRequest, FetchBalance200Response, FetchEvent200Response, FetchEvents200Response, FetchEventsRequest, FetchMarket200Response, FetchMarketRequest, FetchMarkets200Response, FetchMarketsRequest, FetchOHLCV200Response, FetchOHLCVRequest, FetchOpenOrders200Response, FetchOpenOrdersRequest, FetchOrderBook200Response, FetchOrderBookRequest, FetchPositions200Response, FetchPositionsRequest, FetchTrades200Response, FetchTradesRequest, FilterEventsRequest, FilterMarketsRequest, GetExecutionPrice200Response, GetExecutionPriceDetailed200Response, GetExecutionPriceRequest, HealthCheck200Response, WatchOrderBookRequest, WatchPricesRequest, WatchTradesRequest, WatchUserPositionsRequest } from '../models/index.js';
|
|
14
14
|
export interface CancelOrderOperationRequest {
|
|
15
15
|
exchange: CancelOrderOperationExchangeEnum;
|
|
16
16
|
cancelOrderRequest?: CancelOrderRequest;
|
|
@@ -35,9 +35,9 @@ export interface FetchEventsOperationRequest {
|
|
|
35
35
|
exchange: FetchEventsOperationExchangeEnum;
|
|
36
36
|
fetchEventsRequest?: FetchEventsRequest;
|
|
37
37
|
}
|
|
38
|
-
export interface
|
|
39
|
-
exchange:
|
|
40
|
-
|
|
38
|
+
export interface FetchMarketOperationRequest {
|
|
39
|
+
exchange: FetchMarketOperationExchangeEnum;
|
|
40
|
+
fetchMarketRequest?: FetchMarketRequest;
|
|
41
41
|
}
|
|
42
42
|
export interface FetchMarketsOperationRequest {
|
|
43
43
|
exchange: FetchMarketsOperationExchangeEnum;
|
|
@@ -163,12 +163,12 @@ export declare class DefaultApi extends runtime.BaseAPI {
|
|
|
163
163
|
* Fetch a single market by lookup parameters. Returns the first matching market or a 404 error if no market is found. Convenience wrapper around fetchMarkets.
|
|
164
164
|
* Fetch Single Market
|
|
165
165
|
*/
|
|
166
|
-
fetchMarketRaw(requestParameters:
|
|
166
|
+
fetchMarketRaw(requestParameters: FetchMarketOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchMarket200Response>>;
|
|
167
167
|
/**
|
|
168
168
|
* Fetch a single market by lookup parameters. Returns the first matching market or a 404 error if no market is found. Convenience wrapper around fetchMarkets.
|
|
169
169
|
* Fetch Single Market
|
|
170
170
|
*/
|
|
171
|
-
fetchMarket(requestParameters:
|
|
171
|
+
fetchMarket(requestParameters: FetchMarketOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchMarket200Response>;
|
|
172
172
|
/**
|
|
173
173
|
* Fetch Markets
|
|
174
174
|
*/
|
|
@@ -389,7 +389,7 @@ export type FetchEventsOperationExchangeEnum = typeof FetchEventsOperationExchan
|
|
|
389
389
|
/**
|
|
390
390
|
* @export
|
|
391
391
|
*/
|
|
392
|
-
export declare const
|
|
392
|
+
export declare const FetchMarketOperationExchangeEnum: {
|
|
393
393
|
readonly Polymarket: "polymarket";
|
|
394
394
|
readonly Kalshi: "kalshi";
|
|
395
395
|
readonly Limitless: "limitless";
|
|
@@ -397,7 +397,7 @@ export declare const FetchMarketExchangeEnum: {
|
|
|
397
397
|
readonly Baozi: "baozi";
|
|
398
398
|
readonly Myriad: "myriad";
|
|
399
399
|
};
|
|
400
|
-
export type
|
|
400
|
+
export type FetchMarketOperationExchangeEnum = typeof FetchMarketOperationExchangeEnum[keyof typeof FetchMarketOperationExchangeEnum];
|
|
401
401
|
/**
|
|
402
402
|
* @export
|
|
403
403
|
*/
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import * as runtime from '../runtime.js';
|
|
15
|
-
import { BaseResponseFromJSON, CancelOrderRequestToJSON, CreateOrder200ResponseFromJSON, CreateOrderRequestToJSON, FetchBalance200ResponseFromJSON, FetchEvent200ResponseFromJSON, FetchEvents200ResponseFromJSON, FetchEventsRequestToJSON, FetchMarket200ResponseFromJSON, FetchMarkets200ResponseFromJSON, FetchMarketsRequestToJSON, FetchOHLCV200ResponseFromJSON, FetchOHLCVRequestToJSON, FetchOpenOrders200ResponseFromJSON, FetchOpenOrdersRequestToJSON, FetchOrderBook200ResponseFromJSON, FetchOrderBookRequestToJSON, FetchPositions200ResponseFromJSON, FetchPositionsRequestToJSON, FetchTrades200ResponseFromJSON, FetchTradesRequestToJSON, FilterEventsRequestToJSON, FilterMarketsRequestToJSON, GetExecutionPrice200ResponseFromJSON, GetExecutionPriceDetailed200ResponseFromJSON, GetExecutionPriceRequestToJSON, HealthCheck200ResponseFromJSON, WatchOrderBookRequestToJSON, WatchPricesRequestToJSON, WatchTradesRequestToJSON, WatchUserPositionsRequestToJSON, } from '../models/index.js';
|
|
15
|
+
import { BaseResponseFromJSON, CancelOrderRequestToJSON, CreateOrder200ResponseFromJSON, CreateOrderRequestToJSON, FetchBalance200ResponseFromJSON, FetchEvent200ResponseFromJSON, FetchEvents200ResponseFromJSON, FetchEventsRequestToJSON, FetchMarket200ResponseFromJSON, FetchMarketRequestToJSON, FetchMarkets200ResponseFromJSON, FetchMarketsRequestToJSON, FetchOHLCV200ResponseFromJSON, FetchOHLCVRequestToJSON, FetchOpenOrders200ResponseFromJSON, FetchOpenOrdersRequestToJSON, FetchOrderBook200ResponseFromJSON, FetchOrderBookRequestToJSON, FetchPositions200ResponseFromJSON, FetchPositionsRequestToJSON, FetchTrades200ResponseFromJSON, FetchTradesRequestToJSON, FilterEventsRequestToJSON, FilterMarketsRequestToJSON, GetExecutionPrice200ResponseFromJSON, GetExecutionPriceDetailed200ResponseFromJSON, GetExecutionPriceRequestToJSON, HealthCheck200ResponseFromJSON, WatchOrderBookRequestToJSON, WatchPricesRequestToJSON, WatchTradesRequestToJSON, WatchUserPositionsRequestToJSON, } from '../models/index.js';
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
@@ -207,7 +207,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
207
207
|
method: 'POST',
|
|
208
208
|
headers: headerParameters,
|
|
209
209
|
query: queryParameters,
|
|
210
|
-
body:
|
|
210
|
+
body: FetchMarketRequestToJSON(requestParameters['fetchMarketRequest']),
|
|
211
211
|
}, initOverrides);
|
|
212
212
|
return new runtime.JSONApiResponse(response, (jsonValue) => FetchMarket200ResponseFromJSON(jsonValue));
|
|
213
213
|
}
|
|
@@ -767,7 +767,7 @@ export const FetchEventsOperationExchangeEnum = {
|
|
|
767
767
|
/**
|
|
768
768
|
* @export
|
|
769
769
|
*/
|
|
770
|
-
export const
|
|
770
|
+
export const FetchMarketOperationExchangeEnum = {
|
|
771
771
|
Polymarket: 'polymarket',
|
|
772
772
|
Kalshi: 'kalshi',
|
|
773
773
|
Limitless: 'limitless',
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
import type { ExchangeCredentials } from './ExchangeCredentials.js';
|
|
13
|
+
import type { MarketFilterParams } from './MarketFilterParams.js';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface FetchMarketRequest
|
|
18
|
+
*/
|
|
19
|
+
export interface FetchMarketRequest {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {Array<MarketFilterParams>}
|
|
23
|
+
* @memberof FetchMarketRequest
|
|
24
|
+
*/
|
|
25
|
+
args?: Array<MarketFilterParams>;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {ExchangeCredentials}
|
|
29
|
+
* @memberof FetchMarketRequest
|
|
30
|
+
*/
|
|
31
|
+
credentials?: ExchangeCredentials;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the FetchMarketRequest interface.
|
|
35
|
+
*/
|
|
36
|
+
export declare function instanceOfFetchMarketRequest(value: object): value is FetchMarketRequest;
|
|
37
|
+
export declare function FetchMarketRequestFromJSON(json: any): FetchMarketRequest;
|
|
38
|
+
export declare function FetchMarketRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FetchMarketRequest;
|
|
39
|
+
export declare function FetchMarketRequestToJSON(json: any): FetchMarketRequest;
|
|
40
|
+
export declare function FetchMarketRequestToJSONTyped(value?: FetchMarketRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
import { ExchangeCredentialsFromJSON, ExchangeCredentialsToJSON, } from './ExchangeCredentials.js';
|
|
15
|
+
import { MarketFilterParamsFromJSON, MarketFilterParamsToJSON, } from './MarketFilterParams.js';
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the FetchMarketRequest interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfFetchMarketRequest(value) {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function FetchMarketRequestFromJSON(json) {
|
|
23
|
+
return FetchMarketRequestFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function FetchMarketRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'args': json['args'] == null ? undefined : (json['args'].map(MarketFilterParamsFromJSON)),
|
|
31
|
+
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function FetchMarketRequestToJSON(json) {
|
|
35
|
+
return FetchMarketRequestToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function FetchMarketRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'args': value['args'] == null ? undefined : (value['args'].map(MarketFilterParamsToJSON)),
|
|
43
|
+
'credentials': ExchangeCredentialsToJSON(value['credentials']),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -29,6 +29,12 @@ export interface FetchMarketsRequest {
|
|
|
29
29
|
* @memberof FetchMarketsRequest
|
|
30
30
|
*/
|
|
31
31
|
credentials?: ExchangeCredentials;
|
|
32
|
+
/**
|
|
33
|
+
* Enable verbose logging for this request
|
|
34
|
+
* @type {boolean}
|
|
35
|
+
* @memberof FetchMarketsRequest
|
|
36
|
+
*/
|
|
37
|
+
verbose?: boolean;
|
|
32
38
|
}
|
|
33
39
|
/**
|
|
34
40
|
* Check if a given object implements the FetchMarketsRequest interface.
|
|
@@ -29,6 +29,7 @@ export function FetchMarketsRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
29
|
return {
|
|
30
30
|
'args': json['args'] == null ? undefined : (json['args'].map(MarketFilterParamsFromJSON)),
|
|
31
31
|
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
32
|
+
'verbose': json['verbose'] == null ? undefined : json['verbose'],
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
35
|
export function FetchMarketsRequestToJSON(json) {
|
|
@@ -41,5 +42,6 @@ export function FetchMarketsRequestToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
41
42
|
return {
|
|
42
43
|
'args': value['args'] == null ? undefined : (value['args'].map(MarketFilterParamsToJSON)),
|
|
43
44
|
'credentials': ExchangeCredentialsToJSON(value['credentials']),
|
|
45
|
+
'verbose': value['verbose'],
|
|
44
46
|
};
|
|
45
47
|
}
|
|
@@ -16,6 +16,7 @@ export * from './FetchEvent200Response.js';
|
|
|
16
16
|
export * from './FetchEvents200Response.js';
|
|
17
17
|
export * from './FetchEventsRequest.js';
|
|
18
18
|
export * from './FetchMarket200Response.js';
|
|
19
|
+
export * from './FetchMarketRequest.js';
|
|
19
20
|
export * from './FetchMarkets200Response.js';
|
|
20
21
|
export * from './FetchMarketsRequest.js';
|
|
21
22
|
export * from './FetchOHLCV200Response.js';
|
|
@@ -18,6 +18,7 @@ export * from './FetchEvent200Response.js';
|
|
|
18
18
|
export * from './FetchEvents200Response.js';
|
|
19
19
|
export * from './FetchEventsRequest.js';
|
|
20
20
|
export * from './FetchMarket200Response.js';
|
|
21
|
+
export * from './FetchMarketRequest.js';
|
|
21
22
|
export * from './FetchMarkets200Response.js';
|
|
22
23
|
export * from './FetchMarketsRequest.js';
|
|
23
24
|
export * from './FetchOHLCV200Response.js';
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { BaseResponse, CancelOrderRequest, CreateOrder200Response, CreateOrderRequest, FetchBalance200Response, FetchEvent200Response, FetchEvents200Response, FetchEventsRequest, FetchMarket200Response, FetchMarkets200Response, FetchMarketsRequest, FetchOHLCV200Response, FetchOHLCVRequest, FetchOpenOrders200Response, FetchOpenOrdersRequest, FetchOrderBook200Response, FetchOrderBookRequest, FetchPositions200Response, FetchPositionsRequest, FetchTrades200Response, FetchTradesRequest, FilterEventsRequest, FilterMarketsRequest, GetExecutionPrice200Response, GetExecutionPriceDetailed200Response, GetExecutionPriceRequest, HealthCheck200Response, WatchOrderBookRequest, WatchPricesRequest, WatchTradesRequest, WatchUserPositionsRequest } from '../models/index';
|
|
13
|
+
import type { BaseResponse, CancelOrderRequest, CreateOrder200Response, CreateOrderRequest, FetchBalance200Response, FetchEvent200Response, FetchEvents200Response, FetchEventsRequest, FetchMarket200Response, FetchMarketRequest, FetchMarkets200Response, FetchMarketsRequest, FetchOHLCV200Response, FetchOHLCVRequest, FetchOpenOrders200Response, FetchOpenOrdersRequest, FetchOrderBook200Response, FetchOrderBookRequest, FetchPositions200Response, FetchPositionsRequest, FetchTrades200Response, FetchTradesRequest, FilterEventsRequest, FilterMarketsRequest, GetExecutionPrice200Response, GetExecutionPriceDetailed200Response, GetExecutionPriceRequest, HealthCheck200Response, WatchOrderBookRequest, WatchPricesRequest, WatchTradesRequest, WatchUserPositionsRequest } from '../models/index';
|
|
14
14
|
export interface CancelOrderOperationRequest {
|
|
15
15
|
exchange: CancelOrderOperationExchangeEnum;
|
|
16
16
|
cancelOrderRequest?: CancelOrderRequest;
|
|
@@ -35,9 +35,9 @@ export interface FetchEventsOperationRequest {
|
|
|
35
35
|
exchange: FetchEventsOperationExchangeEnum;
|
|
36
36
|
fetchEventsRequest?: FetchEventsRequest;
|
|
37
37
|
}
|
|
38
|
-
export interface
|
|
39
|
-
exchange:
|
|
40
|
-
|
|
38
|
+
export interface FetchMarketOperationRequest {
|
|
39
|
+
exchange: FetchMarketOperationExchangeEnum;
|
|
40
|
+
fetchMarketRequest?: FetchMarketRequest;
|
|
41
41
|
}
|
|
42
42
|
export interface FetchMarketsOperationRequest {
|
|
43
43
|
exchange: FetchMarketsOperationExchangeEnum;
|
|
@@ -163,12 +163,12 @@ export declare class DefaultApi extends runtime.BaseAPI {
|
|
|
163
163
|
* Fetch a single market by lookup parameters. Returns the first matching market or a 404 error if no market is found. Convenience wrapper around fetchMarkets.
|
|
164
164
|
* Fetch Single Market
|
|
165
165
|
*/
|
|
166
|
-
fetchMarketRaw(requestParameters:
|
|
166
|
+
fetchMarketRaw(requestParameters: FetchMarketOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchMarket200Response>>;
|
|
167
167
|
/**
|
|
168
168
|
* Fetch a single market by lookup parameters. Returns the first matching market or a 404 error if no market is found. Convenience wrapper around fetchMarkets.
|
|
169
169
|
* Fetch Single Market
|
|
170
170
|
*/
|
|
171
|
-
fetchMarket(requestParameters:
|
|
171
|
+
fetchMarket(requestParameters: FetchMarketOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchMarket200Response>;
|
|
172
172
|
/**
|
|
173
173
|
* Fetch Markets
|
|
174
174
|
*/
|
|
@@ -389,7 +389,7 @@ export type FetchEventsOperationExchangeEnum = typeof FetchEventsOperationExchan
|
|
|
389
389
|
/**
|
|
390
390
|
* @export
|
|
391
391
|
*/
|
|
392
|
-
export declare const
|
|
392
|
+
export declare const FetchMarketOperationExchangeEnum: {
|
|
393
393
|
readonly Polymarket: "polymarket";
|
|
394
394
|
readonly Kalshi: "kalshi";
|
|
395
395
|
readonly Limitless: "limitless";
|
|
@@ -397,7 +397,7 @@ export declare const FetchMarketExchangeEnum: {
|
|
|
397
397
|
readonly Baozi: "baozi";
|
|
398
398
|
readonly Myriad: "myriad";
|
|
399
399
|
};
|
|
400
|
-
export type
|
|
400
|
+
export type FetchMarketOperationExchangeEnum = typeof FetchMarketOperationExchangeEnum[keyof typeof FetchMarketOperationExchangeEnum];
|
|
401
401
|
/**
|
|
402
402
|
* @export
|
|
403
403
|
*/
|
|
@@ -46,7 +46,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
46
46
|
};
|
|
47
47
|
})();
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
-
exports.WatchUserTransactionsExchangeEnum = exports.WatchUserPositionsOperationExchangeEnum = exports.WatchTradesOperationExchangeEnum = exports.WatchPricesOperationExchangeEnum = exports.WatchOrderBookOperationExchangeEnum = exports.GetExecutionPriceDetailedExchangeEnum = exports.GetExecutionPriceOperationExchangeEnum = exports.FilterMarketsOperationExchangeEnum = exports.FilterEventsOperationExchangeEnum = exports.FetchTradesOperationExchangeEnum = exports.FetchPositionsOperationExchangeEnum = exports.FetchOrderBookOperationExchangeEnum = exports.FetchOrderExchangeEnum = exports.FetchOpenOrdersOperationExchangeEnum = exports.FetchOHLCVOperationExchangeEnum = exports.FetchMarketsOperationExchangeEnum = exports.
|
|
49
|
+
exports.WatchUserTransactionsExchangeEnum = exports.WatchUserPositionsOperationExchangeEnum = exports.WatchTradesOperationExchangeEnum = exports.WatchPricesOperationExchangeEnum = exports.WatchOrderBookOperationExchangeEnum = exports.GetExecutionPriceDetailedExchangeEnum = exports.GetExecutionPriceOperationExchangeEnum = exports.FilterMarketsOperationExchangeEnum = exports.FilterEventsOperationExchangeEnum = exports.FetchTradesOperationExchangeEnum = exports.FetchPositionsOperationExchangeEnum = exports.FetchOrderBookOperationExchangeEnum = exports.FetchOrderExchangeEnum = exports.FetchOpenOrdersOperationExchangeEnum = exports.FetchOHLCVOperationExchangeEnum = exports.FetchMarketsOperationExchangeEnum = exports.FetchMarketOperationExchangeEnum = exports.FetchEventsOperationExchangeEnum = exports.FetchEventExchangeEnum = exports.FetchBalanceExchangeEnum = exports.CreateOrderOperationExchangeEnum = exports.CloseExchangeEnum = exports.CancelOrderOperationExchangeEnum = exports.DefaultApi = void 0;
|
|
50
50
|
const runtime = __importStar(require("../runtime"));
|
|
51
51
|
const index_1 = require("../models/index");
|
|
52
52
|
/**
|
|
@@ -243,7 +243,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
243
243
|
method: 'POST',
|
|
244
244
|
headers: headerParameters,
|
|
245
245
|
query: queryParameters,
|
|
246
|
-
body: (0, index_1.
|
|
246
|
+
body: (0, index_1.FetchMarketRequestToJSON)(requestParameters['fetchMarketRequest']),
|
|
247
247
|
}, initOverrides);
|
|
248
248
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FetchMarket200ResponseFromJSON)(jsonValue));
|
|
249
249
|
}
|
|
@@ -804,7 +804,7 @@ exports.FetchEventsOperationExchangeEnum = {
|
|
|
804
804
|
/**
|
|
805
805
|
* @export
|
|
806
806
|
*/
|
|
807
|
-
exports.
|
|
807
|
+
exports.FetchMarketOperationExchangeEnum = {
|
|
808
808
|
Polymarket: 'polymarket',
|
|
809
809
|
Kalshi: 'kalshi',
|
|
810
810
|
Limitless: 'limitless',
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
import type { ExchangeCredentials } from './ExchangeCredentials';
|
|
13
|
+
import type { MarketFilterParams } from './MarketFilterParams';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface FetchMarketRequest
|
|
18
|
+
*/
|
|
19
|
+
export interface FetchMarketRequest {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {Array<MarketFilterParams>}
|
|
23
|
+
* @memberof FetchMarketRequest
|
|
24
|
+
*/
|
|
25
|
+
args?: Array<MarketFilterParams>;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {ExchangeCredentials}
|
|
29
|
+
* @memberof FetchMarketRequest
|
|
30
|
+
*/
|
|
31
|
+
credentials?: ExchangeCredentials;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the FetchMarketRequest interface.
|
|
35
|
+
*/
|
|
36
|
+
export declare function instanceOfFetchMarketRequest(value: object): value is FetchMarketRequest;
|
|
37
|
+
export declare function FetchMarketRequestFromJSON(json: any): FetchMarketRequest;
|
|
38
|
+
export declare function FetchMarketRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FetchMarketRequest;
|
|
39
|
+
export declare function FetchMarketRequestToJSON(json: any): FetchMarketRequest;
|
|
40
|
+
export declare function FetchMarketRequestToJSONTyped(value?: FetchMarketRequest | 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, 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.instanceOfFetchMarketRequest = instanceOfFetchMarketRequest;
|
|
17
|
+
exports.FetchMarketRequestFromJSON = FetchMarketRequestFromJSON;
|
|
18
|
+
exports.FetchMarketRequestFromJSONTyped = FetchMarketRequestFromJSONTyped;
|
|
19
|
+
exports.FetchMarketRequestToJSON = FetchMarketRequestToJSON;
|
|
20
|
+
exports.FetchMarketRequestToJSONTyped = FetchMarketRequestToJSONTyped;
|
|
21
|
+
const ExchangeCredentials_1 = require("./ExchangeCredentials");
|
|
22
|
+
const MarketFilterParams_1 = require("./MarketFilterParams");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the FetchMarketRequest interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfFetchMarketRequest(value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function FetchMarketRequestFromJSON(json) {
|
|
30
|
+
return FetchMarketRequestFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function FetchMarketRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'args': json['args'] == null ? undefined : (json['args'].map(MarketFilterParams_1.MarketFilterParamsFromJSON)),
|
|
38
|
+
'credentials': json['credentials'] == null ? undefined : (0, ExchangeCredentials_1.ExchangeCredentialsFromJSON)(json['credentials']),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function FetchMarketRequestToJSON(json) {
|
|
42
|
+
return FetchMarketRequestToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function FetchMarketRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'args': value['args'] == null ? undefined : (value['args'].map(MarketFilterParams_1.MarketFilterParamsToJSON)),
|
|
50
|
+
'credentials': (0, ExchangeCredentials_1.ExchangeCredentialsToJSON)(value['credentials']),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -29,6 +29,12 @@ export interface FetchMarketsRequest {
|
|
|
29
29
|
* @memberof FetchMarketsRequest
|
|
30
30
|
*/
|
|
31
31
|
credentials?: ExchangeCredentials;
|
|
32
|
+
/**
|
|
33
|
+
* Enable verbose logging for this request
|
|
34
|
+
* @type {boolean}
|
|
35
|
+
* @memberof FetchMarketsRequest
|
|
36
|
+
*/
|
|
37
|
+
verbose?: boolean;
|
|
32
38
|
}
|
|
33
39
|
/**
|
|
34
40
|
* Check if a given object implements the FetchMarketsRequest interface.
|
|
@@ -36,6 +36,7 @@ function FetchMarketsRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
36
|
return {
|
|
37
37
|
'args': json['args'] == null ? undefined : (json['args'].map(MarketFilterParams_1.MarketFilterParamsFromJSON)),
|
|
38
38
|
'credentials': json['credentials'] == null ? undefined : (0, ExchangeCredentials_1.ExchangeCredentialsFromJSON)(json['credentials']),
|
|
39
|
+
'verbose': json['verbose'] == null ? undefined : json['verbose'],
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
42
|
function FetchMarketsRequestToJSON(json) {
|
|
@@ -48,5 +49,6 @@ function FetchMarketsRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
48
49
|
return {
|
|
49
50
|
'args': value['args'] == null ? undefined : (value['args'].map(MarketFilterParams_1.MarketFilterParamsToJSON)),
|
|
50
51
|
'credentials': (0, ExchangeCredentials_1.ExchangeCredentialsToJSON)(value['credentials']),
|
|
52
|
+
'verbose': value['verbose'],
|
|
51
53
|
};
|
|
52
54
|
}
|
|
@@ -16,6 +16,7 @@ export * from './FetchEvent200Response';
|
|
|
16
16
|
export * from './FetchEvents200Response';
|
|
17
17
|
export * from './FetchEventsRequest';
|
|
18
18
|
export * from './FetchMarket200Response';
|
|
19
|
+
export * from './FetchMarketRequest';
|
|
19
20
|
export * from './FetchMarkets200Response';
|
|
20
21
|
export * from './FetchMarketsRequest';
|
|
21
22
|
export * from './FetchOHLCV200Response';
|
|
@@ -34,6 +34,7 @@ __exportStar(require("./FetchEvent200Response"), exports);
|
|
|
34
34
|
__exportStar(require("./FetchEvents200Response"), exports);
|
|
35
35
|
__exportStar(require("./FetchEventsRequest"), exports);
|
|
36
36
|
__exportStar(require("./FetchMarket200Response"), exports);
|
|
37
|
+
__exportStar(require("./FetchMarketRequest"), exports);
|
|
37
38
|
__exportStar(require("./FetchMarkets200Response"), exports);
|
|
38
39
|
__exportStar(require("./FetchMarketsRequest"), exports);
|
|
39
40
|
__exportStar(require("./FetchOHLCV200Response"), exports);
|
|
@@ -21,6 +21,7 @@ docs/FetchEvent200Response.md
|
|
|
21
21
|
docs/FetchEvents200Response.md
|
|
22
22
|
docs/FetchEventsRequest.md
|
|
23
23
|
docs/FetchMarket200Response.md
|
|
24
|
+
docs/FetchMarketRequest.md
|
|
24
25
|
docs/FetchMarkets200Response.md
|
|
25
26
|
docs/FetchMarketsRequest.md
|
|
26
27
|
docs/FetchOHLCV200Response.md
|
|
@@ -85,6 +86,7 @@ src/models/FetchEvent200Response.ts
|
|
|
85
86
|
src/models/FetchEvents200Response.ts
|
|
86
87
|
src/models/FetchEventsRequest.ts
|
|
87
88
|
src/models/FetchMarket200Response.ts
|
|
89
|
+
src/models/FetchMarketRequest.ts
|
|
88
90
|
src/models/FetchMarkets200Response.ts
|
|
89
91
|
src/models/FetchMarketsRequest.ts
|
|
90
92
|
src/models/FetchOHLCV200Response.ts
|
|
@@ -10,7 +10,7 @@ All URIs are relative to *http://localhost:3847*
|
|
|
10
10
|
| [**fetchBalance**](DefaultApi.md#fetchbalance) | **POST** /api/{exchange}/fetchBalance | Fetch Balance |
|
|
11
11
|
| [**fetchEvent**](DefaultApi.md#fetchevent) | **POST** /api/{exchange}/fetchEvent | Fetch Single Event |
|
|
12
12
|
| [**fetchEvents**](DefaultApi.md#fetcheventsoperation) | **POST** /api/{exchange}/fetchEvents | Fetch Events |
|
|
13
|
-
| [**fetchMarket**](DefaultApi.md#
|
|
13
|
+
| [**fetchMarket**](DefaultApi.md#fetchmarketoperation) | **POST** /api/{exchange}/fetchMarket | Fetch Single Market |
|
|
14
14
|
| [**fetchMarkets**](DefaultApi.md#fetchmarketsoperation) | **POST** /api/{exchange}/fetchMarkets | Fetch Markets |
|
|
15
15
|
| [**fetchOHLCV**](DefaultApi.md#fetchohlcvoperation) | **POST** /api/{exchange}/fetchOHLCV | Fetch OHLCV Candles |
|
|
16
16
|
| [**fetchOpenOrders**](DefaultApi.md#fetchopenordersoperation) | **POST** /api/{exchange}/fetchOpenOrders | Fetch Open Orders |
|
|
@@ -446,7 +446,7 @@ No authorization required
|
|
|
446
446
|
|
|
447
447
|
## fetchMarket
|
|
448
448
|
|
|
449
|
-
> FetchMarket200Response fetchMarket(exchange,
|
|
449
|
+
> FetchMarket200Response fetchMarket(exchange, fetchMarketRequest)
|
|
450
450
|
|
|
451
451
|
Fetch Single Market
|
|
452
452
|
|
|
@@ -459,7 +459,7 @@ import {
|
|
|
459
459
|
Configuration,
|
|
460
460
|
DefaultApi,
|
|
461
461
|
} from 'pmxtjs';
|
|
462
|
-
import type {
|
|
462
|
+
import type { FetchMarketOperationRequest } from 'pmxtjs';
|
|
463
463
|
|
|
464
464
|
async function example() {
|
|
465
465
|
console.log("🚀 Testing pmxtjs SDK...");
|
|
@@ -468,9 +468,9 @@ async function example() {
|
|
|
468
468
|
const body = {
|
|
469
469
|
// 'polymarket' | 'kalshi' | 'limitless' | 'probable' | 'baozi' | 'myriad' | The prediction market exchange to target.
|
|
470
470
|
exchange: exchange_example,
|
|
471
|
-
//
|
|
472
|
-
|
|
473
|
-
} satisfies
|
|
471
|
+
// FetchMarketRequest (optional)
|
|
472
|
+
fetchMarketRequest: ...,
|
|
473
|
+
} satisfies FetchMarketOperationRequest;
|
|
474
474
|
|
|
475
475
|
try {
|
|
476
476
|
const data = await api.fetchMarket(body);
|
|
@@ -490,7 +490,7 @@ example().catch(console.error);
|
|
|
490
490
|
| Name | Type | Description | Notes |
|
|
491
491
|
|------------- | ------------- | ------------- | -------------|
|
|
492
492
|
| **exchange** | `polymarket`, `kalshi`, `limitless`, `probable`, `baozi`, `myriad` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: polymarket, kalshi, limitless, probable, baozi, myriad] |
|
|
493
|
-
| **
|
|
493
|
+
| **fetchMarketRequest** | [FetchMarketRequest](FetchMarketRequest.md) | | [Optional] |
|
|
494
494
|
|
|
495
495
|
### Return type
|
|
496
496
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# FetchMarketRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`args` | [Array<MarketFilterParams>](MarketFilterParams.md)
|
|
10
|
+
`credentials` | [ExchangeCredentials](ExchangeCredentials.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { FetchMarketRequest } from 'pmxtjs'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"args": null,
|
|
20
|
+
"credentials": null,
|
|
21
|
+
} satisfies FetchMarketRequest
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as FetchMarketRequest
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -8,6 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`args` | [Array<MarketFilterParams>](MarketFilterParams.md)
|
|
10
10
|
`credentials` | [ExchangeCredentials](ExchangeCredentials.md)
|
|
11
|
+
`verbose` | boolean
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -18,6 +19,7 @@ import type { FetchMarketsRequest } from 'pmxtjs'
|
|
|
18
19
|
const example = {
|
|
19
20
|
"args": null,
|
|
20
21
|
"credentials": null,
|
|
22
|
+
"verbose": null,
|
|
21
23
|
} satisfies FetchMarketsRequest
|
|
22
24
|
|
|
23
25
|
console.log(example)
|
package/generated/package.json
CHANGED
|
@@ -25,6 +25,7 @@ import type {
|
|
|
25
25
|
FetchEvents200Response,
|
|
26
26
|
FetchEventsRequest,
|
|
27
27
|
FetchMarket200Response,
|
|
28
|
+
FetchMarketRequest,
|
|
28
29
|
FetchMarkets200Response,
|
|
29
30
|
FetchMarketsRequest,
|
|
30
31
|
FetchOHLCV200Response,
|
|
@@ -69,6 +70,8 @@ import {
|
|
|
69
70
|
FetchEventsRequestToJSON,
|
|
70
71
|
FetchMarket200ResponseFromJSON,
|
|
71
72
|
FetchMarket200ResponseToJSON,
|
|
73
|
+
FetchMarketRequestFromJSON,
|
|
74
|
+
FetchMarketRequestToJSON,
|
|
72
75
|
FetchMarkets200ResponseFromJSON,
|
|
73
76
|
FetchMarkets200ResponseToJSON,
|
|
74
77
|
FetchMarketsRequestFromJSON,
|
|
@@ -145,9 +148,9 @@ export interface FetchEventsOperationRequest {
|
|
|
145
148
|
fetchEventsRequest?: FetchEventsRequest;
|
|
146
149
|
}
|
|
147
150
|
|
|
148
|
-
export interface
|
|
149
|
-
exchange:
|
|
150
|
-
|
|
151
|
+
export interface FetchMarketOperationRequest {
|
|
152
|
+
exchange: FetchMarketOperationExchangeEnum;
|
|
153
|
+
fetchMarketRequest?: FetchMarketRequest;
|
|
151
154
|
}
|
|
152
155
|
|
|
153
156
|
export interface FetchMarketsOperationRequest {
|
|
@@ -483,7 +486,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
483
486
|
* Fetch a single market by lookup parameters. Returns the first matching market or a 404 error if no market is found. Convenience wrapper around fetchMarkets.
|
|
484
487
|
* Fetch Single Market
|
|
485
488
|
*/
|
|
486
|
-
async fetchMarketRaw(requestParameters:
|
|
489
|
+
async fetchMarketRaw(requestParameters: FetchMarketOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchMarket200Response>> {
|
|
487
490
|
if (requestParameters['exchange'] == null) {
|
|
488
491
|
throw new runtime.RequiredError(
|
|
489
492
|
'exchange',
|
|
@@ -506,7 +509,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
506
509
|
method: 'POST',
|
|
507
510
|
headers: headerParameters,
|
|
508
511
|
query: queryParameters,
|
|
509
|
-
body:
|
|
512
|
+
body: FetchMarketRequestToJSON(requestParameters['fetchMarketRequest']),
|
|
510
513
|
}, initOverrides);
|
|
511
514
|
|
|
512
515
|
return new runtime.JSONApiResponse(response, (jsonValue) => FetchMarket200ResponseFromJSON(jsonValue));
|
|
@@ -516,7 +519,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
516
519
|
* Fetch a single market by lookup parameters. Returns the first matching market or a 404 error if no market is found. Convenience wrapper around fetchMarkets.
|
|
517
520
|
* Fetch Single Market
|
|
518
521
|
*/
|
|
519
|
-
async fetchMarket(requestParameters:
|
|
522
|
+
async fetchMarket(requestParameters: FetchMarketOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchMarket200Response> {
|
|
520
523
|
const response = await this.fetchMarketRaw(requestParameters, initOverrides);
|
|
521
524
|
return await response.value();
|
|
522
525
|
}
|
|
@@ -1275,7 +1278,7 @@ export type FetchEventsOperationExchangeEnum = typeof FetchEventsOperationExchan
|
|
|
1275
1278
|
/**
|
|
1276
1279
|
* @export
|
|
1277
1280
|
*/
|
|
1278
|
-
export const
|
|
1281
|
+
export const FetchMarketOperationExchangeEnum = {
|
|
1279
1282
|
Polymarket: 'polymarket',
|
|
1280
1283
|
Kalshi: 'kalshi',
|
|
1281
1284
|
Limitless: 'limitless',
|
|
@@ -1283,7 +1286,7 @@ export const FetchMarketExchangeEnum = {
|
|
|
1283
1286
|
Baozi: 'baozi',
|
|
1284
1287
|
Myriad: 'myriad'
|
|
1285
1288
|
} as const;
|
|
1286
|
-
export type
|
|
1289
|
+
export type FetchMarketOperationExchangeEnum = typeof FetchMarketOperationExchangeEnum[keyof typeof FetchMarketOperationExchangeEnum];
|
|
1287
1290
|
/**
|
|
1288
1291
|
* @export
|
|
1289
1292
|
*/
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
import type { ExchangeCredentials } from './ExchangeCredentials';
|
|
17
|
+
import {
|
|
18
|
+
ExchangeCredentialsFromJSON,
|
|
19
|
+
ExchangeCredentialsFromJSONTyped,
|
|
20
|
+
ExchangeCredentialsToJSON,
|
|
21
|
+
ExchangeCredentialsToJSONTyped,
|
|
22
|
+
} from './ExchangeCredentials';
|
|
23
|
+
import type { MarketFilterParams } from './MarketFilterParams';
|
|
24
|
+
import {
|
|
25
|
+
MarketFilterParamsFromJSON,
|
|
26
|
+
MarketFilterParamsFromJSONTyped,
|
|
27
|
+
MarketFilterParamsToJSON,
|
|
28
|
+
MarketFilterParamsToJSONTyped,
|
|
29
|
+
} from './MarketFilterParams';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface FetchMarketRequest
|
|
35
|
+
*/
|
|
36
|
+
export interface FetchMarketRequest {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<MarketFilterParams>}
|
|
40
|
+
* @memberof FetchMarketRequest
|
|
41
|
+
*/
|
|
42
|
+
args?: Array<MarketFilterParams>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {ExchangeCredentials}
|
|
46
|
+
* @memberof FetchMarketRequest
|
|
47
|
+
*/
|
|
48
|
+
credentials?: ExchangeCredentials;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the FetchMarketRequest interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfFetchMarketRequest(value: object): value is FetchMarketRequest {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function FetchMarketRequestFromJSON(json: any): FetchMarketRequest {
|
|
59
|
+
return FetchMarketRequestFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function FetchMarketRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FetchMarketRequest {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'args': json['args'] == null ? undefined : ((json['args'] as Array<any>).map(MarketFilterParamsFromJSON)),
|
|
69
|
+
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function FetchMarketRequestToJSON(json: any): FetchMarketRequest {
|
|
74
|
+
return FetchMarketRequestToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function FetchMarketRequestToJSONTyped(value?: FetchMarketRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'args': value['args'] == null ? undefined : ((value['args'] as Array<any>).map(MarketFilterParamsToJSON)),
|
|
85
|
+
'credentials': ExchangeCredentialsToJSON(value['credentials']),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -46,6 +46,12 @@ export interface FetchMarketsRequest {
|
|
|
46
46
|
* @memberof FetchMarketsRequest
|
|
47
47
|
*/
|
|
48
48
|
credentials?: ExchangeCredentials;
|
|
49
|
+
/**
|
|
50
|
+
* Enable verbose logging for this request
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
* @memberof FetchMarketsRequest
|
|
53
|
+
*/
|
|
54
|
+
verbose?: boolean;
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
/**
|
|
@@ -67,6 +73,7 @@ export function FetchMarketsRequestFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
67
73
|
|
|
68
74
|
'args': json['args'] == null ? undefined : ((json['args'] as Array<any>).map(MarketFilterParamsFromJSON)),
|
|
69
75
|
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
76
|
+
'verbose': json['verbose'] == null ? undefined : json['verbose'],
|
|
70
77
|
};
|
|
71
78
|
}
|
|
72
79
|
|
|
@@ -83,6 +90,7 @@ export function FetchMarketsRequestToJSONTyped(value?: FetchMarketsRequest | nul
|
|
|
83
90
|
|
|
84
91
|
'args': value['args'] == null ? undefined : ((value['args'] as Array<any>).map(MarketFilterParamsToJSON)),
|
|
85
92
|
'credentials': ExchangeCredentialsToJSON(value['credentials']),
|
|
93
|
+
'verbose': value['verbose'],
|
|
86
94
|
};
|
|
87
95
|
}
|
|
88
96
|
|
|
@@ -18,6 +18,7 @@ export * from './FetchEvent200Response';
|
|
|
18
18
|
export * from './FetchEvents200Response';
|
|
19
19
|
export * from './FetchEventsRequest';
|
|
20
20
|
export * from './FetchMarket200Response';
|
|
21
|
+
export * from './FetchMarketRequest';
|
|
21
22
|
export * from './FetchMarkets200Response';
|
|
22
23
|
export * from './FetchMarketsRequest';
|
|
23
24
|
export * from './FetchOHLCV200Response';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmxtjs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Unified prediction market data API - The ccxt for prediction markets",
|
|
5
5
|
"author": "PMXT Contributors",
|
|
6
6
|
"repository": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"unified"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"pmxt-core": "2.
|
|
45
|
+
"pmxt-core": "2.7.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/jest": "^30.0.0",
|