pmxtjs 2.35.3 → 2.35.5
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 +0 -50
- package/dist/esm/generated/src/apis/DefaultApi.js +0 -79
- package/dist/generated/src/apis/DefaultApi.d.ts +0 -50
- package/dist/generated/src/apis/DefaultApi.js +2 -81
- package/generated/docs/DefaultApi.md +0 -90
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +0 -112
- package/package.json +2 -2
|
@@ -160,17 +160,6 @@ export interface FetchMarketsPaginatedRequest {
|
|
|
160
160
|
cursor?: string;
|
|
161
161
|
filter?: MarketFilterCriteria;
|
|
162
162
|
}
|
|
163
|
-
export interface FetchMatchesRequest {
|
|
164
|
-
exchange: FetchMatchesExchangeEnum;
|
|
165
|
-
market?: UnifiedMarket;
|
|
166
|
-
marketId?: string;
|
|
167
|
-
slug?: string;
|
|
168
|
-
url?: string;
|
|
169
|
-
relation?: FetchMatchesRelationEnum;
|
|
170
|
-
minConfidence?: number;
|
|
171
|
-
limit?: number;
|
|
172
|
-
includePrices?: boolean;
|
|
173
|
-
}
|
|
174
163
|
export interface FetchMyTradesRequest {
|
|
175
164
|
exchange: FetchMyTradesExchangeEnum;
|
|
176
165
|
outcomeId?: string;
|
|
@@ -435,16 +424,6 @@ export declare class DefaultApi extends runtime.BaseAPI {
|
|
|
435
424
|
* Fetch Markets Paginated
|
|
436
425
|
*/
|
|
437
426
|
fetchMarketsPaginated(requestParameters: FetchMarketsPaginatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchMarketsPaginated200Response>;
|
|
438
|
-
/**
|
|
439
|
-
* Find Similar Markets (Deprecated)
|
|
440
|
-
* @deprecated
|
|
441
|
-
*/
|
|
442
|
-
fetchMatchesRaw(requestParameters: FetchMatchesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchMarketMatches200Response>>;
|
|
443
|
-
/**
|
|
444
|
-
* Find Similar Markets (Deprecated)
|
|
445
|
-
* @deprecated
|
|
446
|
-
*/
|
|
447
|
-
fetchMatches(requestParameters: FetchMatchesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchMarketMatches200Response>;
|
|
448
427
|
/**
|
|
449
428
|
* Fetch My Trades
|
|
450
429
|
*/
|
|
@@ -1112,35 +1091,6 @@ export declare const FetchMarketsPaginatedExchangeEnum: {
|
|
|
1112
1091
|
readonly Router: "router";
|
|
1113
1092
|
};
|
|
1114
1093
|
export type FetchMarketsPaginatedExchangeEnum = typeof FetchMarketsPaginatedExchangeEnum[keyof typeof FetchMarketsPaginatedExchangeEnum];
|
|
1115
|
-
/**
|
|
1116
|
-
* @export
|
|
1117
|
-
*/
|
|
1118
|
-
export declare const FetchMatchesExchangeEnum: {
|
|
1119
|
-
readonly Polymarket: "polymarket";
|
|
1120
|
-
readonly Kalshi: "kalshi";
|
|
1121
|
-
readonly KalshiDemo: "kalshi-demo";
|
|
1122
|
-
readonly Limitless: "limitless";
|
|
1123
|
-
readonly Probable: "probable";
|
|
1124
|
-
readonly Baozi: "baozi";
|
|
1125
|
-
readonly Myriad: "myriad";
|
|
1126
|
-
readonly Opinion: "opinion";
|
|
1127
|
-
readonly Metaculus: "metaculus";
|
|
1128
|
-
readonly Smarkets: "smarkets";
|
|
1129
|
-
readonly PolymarketUs: "polymarket_us";
|
|
1130
|
-
readonly Router: "router";
|
|
1131
|
-
};
|
|
1132
|
-
export type FetchMatchesExchangeEnum = typeof FetchMatchesExchangeEnum[keyof typeof FetchMatchesExchangeEnum];
|
|
1133
|
-
/**
|
|
1134
|
-
* @export
|
|
1135
|
-
*/
|
|
1136
|
-
export declare const FetchMatchesRelationEnum: {
|
|
1137
|
-
readonly Identity: "identity";
|
|
1138
|
-
readonly Subset: "subset";
|
|
1139
|
-
readonly Superset: "superset";
|
|
1140
|
-
readonly Overlap: "overlap";
|
|
1141
|
-
readonly Disjoint: "disjoint";
|
|
1142
|
-
};
|
|
1143
|
-
export type FetchMatchesRelationEnum = typeof FetchMatchesRelationEnum[keyof typeof FetchMatchesRelationEnum];
|
|
1144
1094
|
/**
|
|
1145
1095
|
* @export
|
|
1146
1096
|
*/
|
|
@@ -797,58 +797,6 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
797
797
|
const response = await this.fetchMarketsPaginatedRaw(requestParameters, initOverrides);
|
|
798
798
|
return await response.value();
|
|
799
799
|
}
|
|
800
|
-
/**
|
|
801
|
-
* Find Similar Markets (Deprecated)
|
|
802
|
-
* @deprecated
|
|
803
|
-
*/
|
|
804
|
-
async fetchMatchesRaw(requestParameters, initOverrides) {
|
|
805
|
-
if (requestParameters['exchange'] == null) {
|
|
806
|
-
throw new runtime.RequiredError('exchange', 'Required parameter "exchange" was null or undefined when calling fetchMatches().');
|
|
807
|
-
}
|
|
808
|
-
const queryParameters = {};
|
|
809
|
-
if (requestParameters['market'] != null) {
|
|
810
|
-
queryParameters['market'] = requestParameters['market'];
|
|
811
|
-
}
|
|
812
|
-
if (requestParameters['marketId'] != null) {
|
|
813
|
-
queryParameters['marketId'] = requestParameters['marketId'];
|
|
814
|
-
}
|
|
815
|
-
if (requestParameters['slug'] != null) {
|
|
816
|
-
queryParameters['slug'] = requestParameters['slug'];
|
|
817
|
-
}
|
|
818
|
-
if (requestParameters['url'] != null) {
|
|
819
|
-
queryParameters['url'] = requestParameters['url'];
|
|
820
|
-
}
|
|
821
|
-
if (requestParameters['relation'] != null) {
|
|
822
|
-
queryParameters['relation'] = requestParameters['relation'];
|
|
823
|
-
}
|
|
824
|
-
if (requestParameters['minConfidence'] != null) {
|
|
825
|
-
queryParameters['minConfidence'] = requestParameters['minConfidence'];
|
|
826
|
-
}
|
|
827
|
-
if (requestParameters['limit'] != null) {
|
|
828
|
-
queryParameters['limit'] = requestParameters['limit'];
|
|
829
|
-
}
|
|
830
|
-
if (requestParameters['includePrices'] != null) {
|
|
831
|
-
queryParameters['includePrices'] = requestParameters['includePrices'];
|
|
832
|
-
}
|
|
833
|
-
const headerParameters = {};
|
|
834
|
-
let urlPath = `/api/{exchange}/fetchMatches`;
|
|
835
|
-
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
836
|
-
const response = await this.request({
|
|
837
|
-
path: urlPath,
|
|
838
|
-
method: 'GET',
|
|
839
|
-
headers: headerParameters,
|
|
840
|
-
query: queryParameters,
|
|
841
|
-
}, initOverrides);
|
|
842
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => FetchMarketMatches200ResponseFromJSON(jsonValue));
|
|
843
|
-
}
|
|
844
|
-
/**
|
|
845
|
-
* Find Similar Markets (Deprecated)
|
|
846
|
-
* @deprecated
|
|
847
|
-
*/
|
|
848
|
-
async fetchMatches(requestParameters, initOverrides) {
|
|
849
|
-
const response = await this.fetchMatchesRaw(requestParameters, initOverrides);
|
|
850
|
-
return await response.value();
|
|
851
|
-
}
|
|
852
800
|
/**
|
|
853
801
|
* Fetch My Trades
|
|
854
802
|
*/
|
|
@@ -1911,33 +1859,6 @@ export const FetchMarketsPaginatedExchangeEnum = {
|
|
|
1911
1859
|
PolymarketUs: 'polymarket_us',
|
|
1912
1860
|
Router: 'router'
|
|
1913
1861
|
};
|
|
1914
|
-
/**
|
|
1915
|
-
* @export
|
|
1916
|
-
*/
|
|
1917
|
-
export const FetchMatchesExchangeEnum = {
|
|
1918
|
-
Polymarket: 'polymarket',
|
|
1919
|
-
Kalshi: 'kalshi',
|
|
1920
|
-
KalshiDemo: 'kalshi-demo',
|
|
1921
|
-
Limitless: 'limitless',
|
|
1922
|
-
Probable: 'probable',
|
|
1923
|
-
Baozi: 'baozi',
|
|
1924
|
-
Myriad: 'myriad',
|
|
1925
|
-
Opinion: 'opinion',
|
|
1926
|
-
Metaculus: 'metaculus',
|
|
1927
|
-
Smarkets: 'smarkets',
|
|
1928
|
-
PolymarketUs: 'polymarket_us',
|
|
1929
|
-
Router: 'router'
|
|
1930
|
-
};
|
|
1931
|
-
/**
|
|
1932
|
-
* @export
|
|
1933
|
-
*/
|
|
1934
|
-
export const FetchMatchesRelationEnum = {
|
|
1935
|
-
Identity: 'identity',
|
|
1936
|
-
Subset: 'subset',
|
|
1937
|
-
Superset: 'superset',
|
|
1938
|
-
Overlap: 'overlap',
|
|
1939
|
-
Disjoint: 'disjoint'
|
|
1940
|
-
};
|
|
1941
1862
|
/**
|
|
1942
1863
|
* @export
|
|
1943
1864
|
*/
|
|
@@ -160,17 +160,6 @@ export interface FetchMarketsPaginatedRequest {
|
|
|
160
160
|
cursor?: string;
|
|
161
161
|
filter?: MarketFilterCriteria;
|
|
162
162
|
}
|
|
163
|
-
export interface FetchMatchesRequest {
|
|
164
|
-
exchange: FetchMatchesExchangeEnum;
|
|
165
|
-
market?: UnifiedMarket;
|
|
166
|
-
marketId?: string;
|
|
167
|
-
slug?: string;
|
|
168
|
-
url?: string;
|
|
169
|
-
relation?: FetchMatchesRelationEnum;
|
|
170
|
-
minConfidence?: number;
|
|
171
|
-
limit?: number;
|
|
172
|
-
includePrices?: boolean;
|
|
173
|
-
}
|
|
174
163
|
export interface FetchMyTradesRequest {
|
|
175
164
|
exchange: FetchMyTradesExchangeEnum;
|
|
176
165
|
outcomeId?: string;
|
|
@@ -435,16 +424,6 @@ export declare class DefaultApi extends runtime.BaseAPI {
|
|
|
435
424
|
* Fetch Markets Paginated
|
|
436
425
|
*/
|
|
437
426
|
fetchMarketsPaginated(requestParameters: FetchMarketsPaginatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchMarketsPaginated200Response>;
|
|
438
|
-
/**
|
|
439
|
-
* Find Similar Markets (Deprecated)
|
|
440
|
-
* @deprecated
|
|
441
|
-
*/
|
|
442
|
-
fetchMatchesRaw(requestParameters: FetchMatchesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchMarketMatches200Response>>;
|
|
443
|
-
/**
|
|
444
|
-
* Find Similar Markets (Deprecated)
|
|
445
|
-
* @deprecated
|
|
446
|
-
*/
|
|
447
|
-
fetchMatches(requestParameters: FetchMatchesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchMarketMatches200Response>;
|
|
448
427
|
/**
|
|
449
428
|
* Fetch My Trades
|
|
450
429
|
*/
|
|
@@ -1112,35 +1091,6 @@ export declare const FetchMarketsPaginatedExchangeEnum: {
|
|
|
1112
1091
|
readonly Router: "router";
|
|
1113
1092
|
};
|
|
1114
1093
|
export type FetchMarketsPaginatedExchangeEnum = typeof FetchMarketsPaginatedExchangeEnum[keyof typeof FetchMarketsPaginatedExchangeEnum];
|
|
1115
|
-
/**
|
|
1116
|
-
* @export
|
|
1117
|
-
*/
|
|
1118
|
-
export declare const FetchMatchesExchangeEnum: {
|
|
1119
|
-
readonly Polymarket: "polymarket";
|
|
1120
|
-
readonly Kalshi: "kalshi";
|
|
1121
|
-
readonly KalshiDemo: "kalshi-demo";
|
|
1122
|
-
readonly Limitless: "limitless";
|
|
1123
|
-
readonly Probable: "probable";
|
|
1124
|
-
readonly Baozi: "baozi";
|
|
1125
|
-
readonly Myriad: "myriad";
|
|
1126
|
-
readonly Opinion: "opinion";
|
|
1127
|
-
readonly Metaculus: "metaculus";
|
|
1128
|
-
readonly Smarkets: "smarkets";
|
|
1129
|
-
readonly PolymarketUs: "polymarket_us";
|
|
1130
|
-
readonly Router: "router";
|
|
1131
|
-
};
|
|
1132
|
-
export type FetchMatchesExchangeEnum = typeof FetchMatchesExchangeEnum[keyof typeof FetchMatchesExchangeEnum];
|
|
1133
|
-
/**
|
|
1134
|
-
* @export
|
|
1135
|
-
*/
|
|
1136
|
-
export declare const FetchMatchesRelationEnum: {
|
|
1137
|
-
readonly Identity: "identity";
|
|
1138
|
-
readonly Subset: "subset";
|
|
1139
|
-
readonly Superset: "superset";
|
|
1140
|
-
readonly Overlap: "overlap";
|
|
1141
|
-
readonly Disjoint: "disjoint";
|
|
1142
|
-
};
|
|
1143
|
-
export type FetchMatchesRelationEnum = typeof FetchMatchesRelationEnum[keyof typeof FetchMatchesRelationEnum];
|
|
1144
1094
|
/**
|
|
1145
1095
|
* @export
|
|
1146
1096
|
*/
|
|
@@ -46,8 +46,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
46
46
|
};
|
|
47
47
|
})();
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
-
exports.LoadMarketsOperationExchangeEnum = exports.GetExecutionPriceDetailedOperationExchangeEnum = exports.GetExecutionPriceOperationExchangeEnum = exports.FilterMarketsOperationExchangeEnum = exports.FilterEventsOperationExchangeEnum = exports.FetchTradesExchangeEnum = exports.FetchPositionsExchangeEnum = exports.FetchOrderBookExchangeEnum = exports.FetchOrderExchangeEnum = exports.FetchOpenOrdersExchangeEnum = exports.FetchOHLCVResolutionEnum = exports.FetchOHLCVExchangeEnum = exports.FetchMyTradesExchangeEnum = exports.
|
|
50
|
-
exports.WatchTradesOperationExchangeEnum = exports.WatchOrderBookOperationExchangeEnum = exports.WatchAddressOperationExchangeEnum = exports.UnwatchOrderBookOperationExchangeEnum =
|
|
49
|
+
exports.UnwatchAddressOperationExchangeEnum = exports.SubmitOrderOperationExchangeEnum = exports.LoadMarketsOperationExchangeEnum = exports.GetExecutionPriceDetailedOperationExchangeEnum = exports.GetExecutionPriceOperationExchangeEnum = exports.FilterMarketsOperationExchangeEnum = exports.FilterEventsOperationExchangeEnum = exports.FetchTradesExchangeEnum = exports.FetchPositionsExchangeEnum = exports.FetchOrderBookExchangeEnum = exports.FetchOrderExchangeEnum = exports.FetchOpenOrdersExchangeEnum = exports.FetchOHLCVResolutionEnum = exports.FetchOHLCVExchangeEnum = exports.FetchMyTradesExchangeEnum = exports.FetchMarketsPaginatedExchangeEnum = exports.FetchMarketsSearchInEnum = exports.FetchMarketsStatusEnum = exports.FetchMarketsSortEnum = exports.FetchMarketsExchangeEnum = exports.FetchMarketMatchesRelationEnum = exports.FetchMarketMatchesExchangeEnum = exports.FetchMarketSearchInEnum = exports.FetchMarketStatusEnum = exports.FetchMarketSortEnum = exports.FetchMarketExchangeEnum = 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.WatchTradesOperationExchangeEnum = exports.WatchOrderBookOperationExchangeEnum = exports.WatchAddressOperationExchangeEnum = exports.UnwatchOrderBookOperationExchangeEnum = void 0;
|
|
51
51
|
const runtime = __importStar(require("../runtime"));
|
|
52
52
|
const index_1 = require("../models/index");
|
|
53
53
|
/**
|
|
@@ -834,58 +834,6 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
834
834
|
const response = await this.fetchMarketsPaginatedRaw(requestParameters, initOverrides);
|
|
835
835
|
return await response.value();
|
|
836
836
|
}
|
|
837
|
-
/**
|
|
838
|
-
* Find Similar Markets (Deprecated)
|
|
839
|
-
* @deprecated
|
|
840
|
-
*/
|
|
841
|
-
async fetchMatchesRaw(requestParameters, initOverrides) {
|
|
842
|
-
if (requestParameters['exchange'] == null) {
|
|
843
|
-
throw new runtime.RequiredError('exchange', 'Required parameter "exchange" was null or undefined when calling fetchMatches().');
|
|
844
|
-
}
|
|
845
|
-
const queryParameters = {};
|
|
846
|
-
if (requestParameters['market'] != null) {
|
|
847
|
-
queryParameters['market'] = requestParameters['market'];
|
|
848
|
-
}
|
|
849
|
-
if (requestParameters['marketId'] != null) {
|
|
850
|
-
queryParameters['marketId'] = requestParameters['marketId'];
|
|
851
|
-
}
|
|
852
|
-
if (requestParameters['slug'] != null) {
|
|
853
|
-
queryParameters['slug'] = requestParameters['slug'];
|
|
854
|
-
}
|
|
855
|
-
if (requestParameters['url'] != null) {
|
|
856
|
-
queryParameters['url'] = requestParameters['url'];
|
|
857
|
-
}
|
|
858
|
-
if (requestParameters['relation'] != null) {
|
|
859
|
-
queryParameters['relation'] = requestParameters['relation'];
|
|
860
|
-
}
|
|
861
|
-
if (requestParameters['minConfidence'] != null) {
|
|
862
|
-
queryParameters['minConfidence'] = requestParameters['minConfidence'];
|
|
863
|
-
}
|
|
864
|
-
if (requestParameters['limit'] != null) {
|
|
865
|
-
queryParameters['limit'] = requestParameters['limit'];
|
|
866
|
-
}
|
|
867
|
-
if (requestParameters['includePrices'] != null) {
|
|
868
|
-
queryParameters['includePrices'] = requestParameters['includePrices'];
|
|
869
|
-
}
|
|
870
|
-
const headerParameters = {};
|
|
871
|
-
let urlPath = `/api/{exchange}/fetchMatches`;
|
|
872
|
-
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
873
|
-
const response = await this.request({
|
|
874
|
-
path: urlPath,
|
|
875
|
-
method: 'GET',
|
|
876
|
-
headers: headerParameters,
|
|
877
|
-
query: queryParameters,
|
|
878
|
-
}, initOverrides);
|
|
879
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FetchMarketMatches200ResponseFromJSON)(jsonValue));
|
|
880
|
-
}
|
|
881
|
-
/**
|
|
882
|
-
* Find Similar Markets (Deprecated)
|
|
883
|
-
* @deprecated
|
|
884
|
-
*/
|
|
885
|
-
async fetchMatches(requestParameters, initOverrides) {
|
|
886
|
-
const response = await this.fetchMatchesRaw(requestParameters, initOverrides);
|
|
887
|
-
return await response.value();
|
|
888
|
-
}
|
|
889
837
|
/**
|
|
890
838
|
* Fetch My Trades
|
|
891
839
|
*/
|
|
@@ -1949,33 +1897,6 @@ exports.FetchMarketsPaginatedExchangeEnum = {
|
|
|
1949
1897
|
PolymarketUs: 'polymarket_us',
|
|
1950
1898
|
Router: 'router'
|
|
1951
1899
|
};
|
|
1952
|
-
/**
|
|
1953
|
-
* @export
|
|
1954
|
-
*/
|
|
1955
|
-
exports.FetchMatchesExchangeEnum = {
|
|
1956
|
-
Polymarket: 'polymarket',
|
|
1957
|
-
Kalshi: 'kalshi',
|
|
1958
|
-
KalshiDemo: 'kalshi-demo',
|
|
1959
|
-
Limitless: 'limitless',
|
|
1960
|
-
Probable: 'probable',
|
|
1961
|
-
Baozi: 'baozi',
|
|
1962
|
-
Myriad: 'myriad',
|
|
1963
|
-
Opinion: 'opinion',
|
|
1964
|
-
Metaculus: 'metaculus',
|
|
1965
|
-
Smarkets: 'smarkets',
|
|
1966
|
-
PolymarketUs: 'polymarket_us',
|
|
1967
|
-
Router: 'router'
|
|
1968
|
-
};
|
|
1969
|
-
/**
|
|
1970
|
-
* @export
|
|
1971
|
-
*/
|
|
1972
|
-
exports.FetchMatchesRelationEnum = {
|
|
1973
|
-
Identity: 'identity',
|
|
1974
|
-
Subset: 'subset',
|
|
1975
|
-
Superset: 'superset',
|
|
1976
|
-
Overlap: 'overlap',
|
|
1977
|
-
Disjoint: 'disjoint'
|
|
1978
|
-
};
|
|
1979
1900
|
/**
|
|
1980
1901
|
* @export
|
|
1981
1902
|
*/
|
|
@@ -22,7 +22,6 @@ All URIs are relative to *http://localhost:3847*
|
|
|
22
22
|
| [**fetchMarketMatches**](DefaultApi.md#fetchmarketmatches) | **GET** /api/{exchange}/fetchMarketMatches | Find Similar Markets |
|
|
23
23
|
| [**fetchMarkets**](DefaultApi.md#fetchmarkets) | **GET** /api/{exchange}/fetchMarkets | Fetch Markets |
|
|
24
24
|
| [**fetchMarketsPaginated**](DefaultApi.md#fetchmarketspaginated) | **GET** /api/{exchange}/fetchMarketsPaginated | Fetch Markets Paginated |
|
|
25
|
-
| [**fetchMatches**](DefaultApi.md#fetchmatches) | **GET** /api/{exchange}/fetchMatches | Find Similar Markets (Deprecated) |
|
|
26
25
|
| [**fetchMyTrades**](DefaultApi.md#fetchmytrades) | **GET** /api/{exchange}/fetchMyTrades | Fetch My Trades |
|
|
27
26
|
| [**fetchOHLCV**](DefaultApi.md#fetchohlcv) | **GET** /api/{exchange}/fetchOHLCV | Fetch OHLCV |
|
|
28
27
|
| [**fetchOpenOrders**](DefaultApi.md#fetchopenorders) | **GET** /api/{exchange}/fetchOpenOrders | Fetch Open Orders |
|
|
@@ -1532,95 +1531,6 @@ No authorization required
|
|
|
1532
1531
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1533
1532
|
|
|
1534
1533
|
|
|
1535
|
-
## fetchMatches
|
|
1536
|
-
|
|
1537
|
-
> FetchMarketMatches200Response fetchMatches(exchange, market, marketId, slug, url, relation, minConfidence, limit, includePrices)
|
|
1538
|
-
|
|
1539
|
-
Find Similar Markets (Deprecated)
|
|
1540
|
-
|
|
1541
|
-
### Example
|
|
1542
|
-
|
|
1543
|
-
```ts
|
|
1544
|
-
import {
|
|
1545
|
-
Configuration,
|
|
1546
|
-
DefaultApi,
|
|
1547
|
-
} from 'pmxtjs';
|
|
1548
|
-
import type { FetchMatchesRequest } from 'pmxtjs';
|
|
1549
|
-
|
|
1550
|
-
async function example() {
|
|
1551
|
-
console.log("🚀 Testing pmxtjs SDK...");
|
|
1552
|
-
const api = new DefaultApi();
|
|
1553
|
-
|
|
1554
|
-
const body = {
|
|
1555
|
-
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
1556
|
-
exchange: exchange_example,
|
|
1557
|
-
// UnifiedMarket | Pass a UnifiedMarket directly instead of marketId/slug/url. (optional)
|
|
1558
|
-
market: ...,
|
|
1559
|
-
// string (optional)
|
|
1560
|
-
marketId: marketId_example,
|
|
1561
|
-
// string (optional)
|
|
1562
|
-
slug: slug_example,
|
|
1563
|
-
// string (optional)
|
|
1564
|
-
url: url_example,
|
|
1565
|
-
// 'identity' | 'subset' | 'superset' | 'overlap' | 'disjoint' (optional)
|
|
1566
|
-
relation: relation_example,
|
|
1567
|
-
// number (optional)
|
|
1568
|
-
minConfidence: 8.14,
|
|
1569
|
-
// number (optional)
|
|
1570
|
-
limit: 8.14,
|
|
1571
|
-
// boolean (optional)
|
|
1572
|
-
includePrices: true,
|
|
1573
|
-
} satisfies FetchMatchesRequest;
|
|
1574
|
-
|
|
1575
|
-
try {
|
|
1576
|
-
const data = await api.fetchMatches(body);
|
|
1577
|
-
console.log(data);
|
|
1578
|
-
} catch (error) {
|
|
1579
|
-
console.error(error);
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
// Run the test
|
|
1584
|
-
example().catch(console.error);
|
|
1585
|
-
```
|
|
1586
|
-
|
|
1587
|
-
### Parameters
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
| Name | Type | Description | Notes |
|
|
1591
|
-
|------------- | ------------- | ------------- | -------------|
|
|
1592
|
-
| **exchange** | `polymarket`, `kalshi`, `kalshi-demo`, `limitless`, `probable`, `baozi`, `myriad`, `opinion`, `metaculus`, `smarkets`, `polymarket_us`, `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: polymarket, kalshi, kalshi-demo, limitless, probable, baozi, myriad, opinion, metaculus, smarkets, polymarket_us, router] |
|
|
1593
|
-
| **market** | [](.md) | Pass a UnifiedMarket directly instead of marketId/slug/url. | [Optional] [Defaults to `undefined`] |
|
|
1594
|
-
| **marketId** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
1595
|
-
| **slug** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
1596
|
-
| **url** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
1597
|
-
| **relation** | `identity`, `subset`, `superset`, `overlap`, `disjoint` | | [Optional] [Defaults to `undefined`] [Enum: identity, subset, superset, overlap, disjoint] |
|
|
1598
|
-
| **minConfidence** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
1599
|
-
| **limit** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
1600
|
-
| **includePrices** | `boolean` | | [Optional] [Defaults to `undefined`] |
|
|
1601
|
-
|
|
1602
|
-
### Return type
|
|
1603
|
-
|
|
1604
|
-
[**FetchMarketMatches200Response**](FetchMarketMatches200Response.md)
|
|
1605
|
-
|
|
1606
|
-
### Authorization
|
|
1607
|
-
|
|
1608
|
-
No authorization required
|
|
1609
|
-
|
|
1610
|
-
### HTTP request headers
|
|
1611
|
-
|
|
1612
|
-
- **Content-Type**: Not defined
|
|
1613
|
-
- **Accept**: `application/json`
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
### HTTP response details
|
|
1617
|
-
| Status code | Description | Response headers |
|
|
1618
|
-
|-------------|-------------|------------------|
|
|
1619
|
-
| **200** | Find Similar Markets (Deprecated) response | - |
|
|
1620
|
-
|
|
1621
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
1534
|
## fetchMyTrades
|
|
1625
1535
|
|
|
1626
1536
|
> FetchMyTrades200Response fetchMyTrades(exchange, outcomeId, marketId, since, until, limit, cursor)
|
package/generated/package.json
CHANGED
|
@@ -321,18 +321,6 @@ export interface FetchMarketsPaginatedRequest {
|
|
|
321
321
|
filter?: MarketFilterCriteria;
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
export interface FetchMatchesRequest {
|
|
325
|
-
exchange: FetchMatchesExchangeEnum;
|
|
326
|
-
market?: UnifiedMarket;
|
|
327
|
-
marketId?: string;
|
|
328
|
-
slug?: string;
|
|
329
|
-
url?: string;
|
|
330
|
-
relation?: FetchMatchesRelationEnum;
|
|
331
|
-
minConfidence?: number;
|
|
332
|
-
limit?: number;
|
|
333
|
-
includePrices?: boolean;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
324
|
export interface FetchMyTradesRequest {
|
|
337
325
|
exchange: FetchMyTradesExchangeEnum;
|
|
338
326
|
outcomeId?: string;
|
|
@@ -1513,77 +1501,6 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
1513
1501
|
return await response.value();
|
|
1514
1502
|
}
|
|
1515
1503
|
|
|
1516
|
-
/**
|
|
1517
|
-
* Find Similar Markets (Deprecated)
|
|
1518
|
-
* @deprecated
|
|
1519
|
-
*/
|
|
1520
|
-
async fetchMatchesRaw(requestParameters: FetchMatchesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FetchMarketMatches200Response>> {
|
|
1521
|
-
if (requestParameters['exchange'] == null) {
|
|
1522
|
-
throw new runtime.RequiredError(
|
|
1523
|
-
'exchange',
|
|
1524
|
-
'Required parameter "exchange" was null or undefined when calling fetchMatches().'
|
|
1525
|
-
);
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
|
-
const queryParameters: any = {};
|
|
1529
|
-
|
|
1530
|
-
if (requestParameters['market'] != null) {
|
|
1531
|
-
queryParameters['market'] = requestParameters['market'];
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
if (requestParameters['marketId'] != null) {
|
|
1535
|
-
queryParameters['marketId'] = requestParameters['marketId'];
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
if (requestParameters['slug'] != null) {
|
|
1539
|
-
queryParameters['slug'] = requestParameters['slug'];
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
if (requestParameters['url'] != null) {
|
|
1543
|
-
queryParameters['url'] = requestParameters['url'];
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
if (requestParameters['relation'] != null) {
|
|
1547
|
-
queryParameters['relation'] = requestParameters['relation'];
|
|
1548
|
-
}
|
|
1549
|
-
|
|
1550
|
-
if (requestParameters['minConfidence'] != null) {
|
|
1551
|
-
queryParameters['minConfidence'] = requestParameters['minConfidence'];
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
if (requestParameters['limit'] != null) {
|
|
1555
|
-
queryParameters['limit'] = requestParameters['limit'];
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
if (requestParameters['includePrices'] != null) {
|
|
1559
|
-
queryParameters['includePrices'] = requestParameters['includePrices'];
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
let urlPath = `/api/{exchange}/fetchMatches`;
|
|
1566
|
-
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
1567
|
-
|
|
1568
|
-
const response = await this.request({
|
|
1569
|
-
path: urlPath,
|
|
1570
|
-
method: 'GET',
|
|
1571
|
-
headers: headerParameters,
|
|
1572
|
-
query: queryParameters,
|
|
1573
|
-
}, initOverrides);
|
|
1574
|
-
|
|
1575
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => FetchMarketMatches200ResponseFromJSON(jsonValue));
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
/**
|
|
1579
|
-
* Find Similar Markets (Deprecated)
|
|
1580
|
-
* @deprecated
|
|
1581
|
-
*/
|
|
1582
|
-
async fetchMatches(requestParameters: FetchMatchesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FetchMarketMatches200Response> {
|
|
1583
|
-
const response = await this.fetchMatchesRaw(requestParameters, initOverrides);
|
|
1584
|
-
return await response.value();
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
1504
|
/**
|
|
1588
1505
|
* Fetch My Trades
|
|
1589
1506
|
*/
|
|
@@ -2932,35 +2849,6 @@ export const FetchMarketsPaginatedExchangeEnum = {
|
|
|
2932
2849
|
Router: 'router'
|
|
2933
2850
|
} as const;
|
|
2934
2851
|
export type FetchMarketsPaginatedExchangeEnum = typeof FetchMarketsPaginatedExchangeEnum[keyof typeof FetchMarketsPaginatedExchangeEnum];
|
|
2935
|
-
/**
|
|
2936
|
-
* @export
|
|
2937
|
-
*/
|
|
2938
|
-
export const FetchMatchesExchangeEnum = {
|
|
2939
|
-
Polymarket: 'polymarket',
|
|
2940
|
-
Kalshi: 'kalshi',
|
|
2941
|
-
KalshiDemo: 'kalshi-demo',
|
|
2942
|
-
Limitless: 'limitless',
|
|
2943
|
-
Probable: 'probable',
|
|
2944
|
-
Baozi: 'baozi',
|
|
2945
|
-
Myriad: 'myriad',
|
|
2946
|
-
Opinion: 'opinion',
|
|
2947
|
-
Metaculus: 'metaculus',
|
|
2948
|
-
Smarkets: 'smarkets',
|
|
2949
|
-
PolymarketUs: 'polymarket_us',
|
|
2950
|
-
Router: 'router'
|
|
2951
|
-
} as const;
|
|
2952
|
-
export type FetchMatchesExchangeEnum = typeof FetchMatchesExchangeEnum[keyof typeof FetchMatchesExchangeEnum];
|
|
2953
|
-
/**
|
|
2954
|
-
* @export
|
|
2955
|
-
*/
|
|
2956
|
-
export const FetchMatchesRelationEnum = {
|
|
2957
|
-
Identity: 'identity',
|
|
2958
|
-
Subset: 'subset',
|
|
2959
|
-
Superset: 'superset',
|
|
2960
|
-
Overlap: 'overlap',
|
|
2961
|
-
Disjoint: 'disjoint'
|
|
2962
|
-
} as const;
|
|
2963
|
-
export type FetchMatchesRelationEnum = typeof FetchMatchesRelationEnum[keyof typeof FetchMatchesRelationEnum];
|
|
2964
2852
|
/**
|
|
2965
2853
|
* @export
|
|
2966
2854
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmxtjs",
|
|
3
|
-
"version": "2.35.
|
|
3
|
+
"version": "2.35.5",
|
|
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.35.
|
|
46
|
+
"pmxt-core": "2.35.5"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/jest": "^30.0.0",
|