pmxtjs 2.0.4 → 2.0.7
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/models/FetchOHLCVRequestArgsInner.d.ts +2 -2
- package/dist/esm/generated/src/models/FetchOHLCVRequestArgsInner.js +5 -5
- package/dist/esm/generated/src/models/FetchTradesRequest.d.ts +3 -3
- package/dist/esm/generated/src/models/FetchTradesRequest.js +3 -3
- package/dist/esm/generated/src/models/FetchTradesRequestArgsInner.d.ts +22 -0
- package/dist/esm/generated/src/models/FetchTradesRequestArgsInner.js +50 -0
- package/dist/esm/generated/src/models/HistoryFilterParams.d.ts +2 -2
- package/dist/esm/generated/src/models/HistoryFilterParams.js +1 -3
- package/dist/esm/generated/src/models/OHLCVParams.d.ts +62 -0
- package/dist/esm/generated/src/models/OHLCVParams.js +60 -0
- package/dist/esm/generated/src/models/TradesParams.d.ts +44 -0
- package/dist/esm/generated/src/models/TradesParams.js +45 -0
- package/dist/esm/generated/src/models/index.d.ts +3 -0
- package/dist/esm/generated/src/models/index.js +3 -0
- package/dist/generated/src/models/FetchOHLCVRequestArgsInner.d.ts +2 -2
- package/dist/generated/src/models/FetchOHLCVRequestArgsInner.js +5 -5
- package/dist/generated/src/models/FetchTradesRequest.d.ts +3 -3
- package/dist/generated/src/models/FetchTradesRequest.js +3 -3
- package/dist/generated/src/models/FetchTradesRequestArgsInner.d.ts +22 -0
- package/dist/generated/src/models/FetchTradesRequestArgsInner.js +56 -0
- package/dist/generated/src/models/HistoryFilterParams.d.ts +2 -2
- package/dist/generated/src/models/HistoryFilterParams.js +1 -3
- package/dist/generated/src/models/OHLCVParams.d.ts +62 -0
- package/dist/generated/src/models/OHLCVParams.js +68 -0
- package/dist/generated/src/models/TradesParams.d.ts +44 -0
- package/dist/generated/src/models/TradesParams.js +52 -0
- package/dist/generated/src/models/index.d.ts +3 -0
- package/dist/generated/src/models/index.js +3 -0
- package/generated/.openapi-generator/FILES +6 -0
- package/generated/docs/FetchTradesRequest.md +1 -1
- package/generated/docs/FetchTradesRequestArgsInner.md +38 -0
- package/generated/docs/HistoryFilterParams.md +1 -0
- package/generated/docs/OHLCVParams.md +40 -0
- package/generated/docs/TradesParams.md +39 -0
- package/generated/package.json +1 -1
- package/generated/src/models/FetchOHLCVRequestArgsInner.ts +11 -11
- package/generated/src/models/FetchTradesRequest.ts +10 -10
- package/generated/src/models/FetchTradesRequestArgsInner.ts +69 -0
- package/generated/src/models/HistoryFilterParams.ts +3 -4
- package/generated/src/models/OHLCVParams.ts +105 -0
- package/generated/src/models/TradesParams.ts +81 -0
- package/generated/src/models/index.ts +3 -0
- package/package.json +2 -2
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Deprecated - use OHLCVParams or TradesParams instead. Resolution is optional for backward compatibility.
|
|
14
14
|
* @export
|
|
15
15
|
* @interface HistoryFilterParams
|
|
16
16
|
*/
|
|
@@ -20,7 +20,7 @@ export interface HistoryFilterParams {
|
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof HistoryFilterParams
|
|
22
22
|
*/
|
|
23
|
-
resolution
|
|
23
|
+
resolution?: HistoryFilterParamsResolutionEnum;
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
26
|
* @type {Date}
|
|
@@ -34,8 +34,6 @@ exports.HistoryFilterParamsResolutionEnum = {
|
|
|
34
34
|
* Check if a given object implements the HistoryFilterParams interface.
|
|
35
35
|
*/
|
|
36
36
|
function instanceOfHistoryFilterParams(value) {
|
|
37
|
-
if (!('resolution' in value) || value['resolution'] === undefined)
|
|
38
|
-
return false;
|
|
39
37
|
return true;
|
|
40
38
|
}
|
|
41
39
|
function HistoryFilterParamsFromJSON(json) {
|
|
@@ -46,7 +44,7 @@ function HistoryFilterParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
44
|
return json;
|
|
47
45
|
}
|
|
48
46
|
return {
|
|
49
|
-
'resolution': json['resolution'],
|
|
47
|
+
'resolution': json['resolution'] == null ? undefined : json['resolution'],
|
|
50
48
|
'start': json['start'] == null ? undefined : (new Date(json['start'])),
|
|
51
49
|
'end': json['end'] == null ? undefined : (new Date(json['end'])),
|
|
52
50
|
'limit': json['limit'] == null ? undefined : json['limit'],
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PMXT Sidecar API
|
|
3
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.4.4
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface OHLCVParams
|
|
16
|
+
*/
|
|
17
|
+
export interface OHLCVParams {
|
|
18
|
+
/**
|
|
19
|
+
* Candle interval for aggregation
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof OHLCVParams
|
|
22
|
+
*/
|
|
23
|
+
resolution: OHLCVParamsResolutionEnum;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Date}
|
|
27
|
+
* @memberof OHLCVParams
|
|
28
|
+
*/
|
|
29
|
+
start?: Date;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Date}
|
|
33
|
+
* @memberof OHLCVParams
|
|
34
|
+
*/
|
|
35
|
+
end?: Date;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof OHLCVParams
|
|
40
|
+
*/
|
|
41
|
+
limit?: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export declare const OHLCVParamsResolutionEnum: {
|
|
47
|
+
readonly _1m: "1m";
|
|
48
|
+
readonly _5m: "5m";
|
|
49
|
+
readonly _15m: "15m";
|
|
50
|
+
readonly _1h: "1h";
|
|
51
|
+
readonly _6h: "6h";
|
|
52
|
+
readonly _1d: "1d";
|
|
53
|
+
};
|
|
54
|
+
export type OHLCVParamsResolutionEnum = typeof OHLCVParamsResolutionEnum[keyof typeof OHLCVParamsResolutionEnum];
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the OHLCVParams interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfOHLCVParams(value: object): value is OHLCVParams;
|
|
59
|
+
export declare function OHLCVParamsFromJSON(json: any): OHLCVParams;
|
|
60
|
+
export declare function OHLCVParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OHLCVParams;
|
|
61
|
+
export declare function OHLCVParamsToJSON(json: any): OHLCVParams;
|
|
62
|
+
export declare function OHLCVParamsToJSONTyped(value?: OHLCVParams | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* PMXT Sidecar API
|
|
6
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.4.4
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.OHLCVParamsResolutionEnum = void 0;
|
|
17
|
+
exports.instanceOfOHLCVParams = instanceOfOHLCVParams;
|
|
18
|
+
exports.OHLCVParamsFromJSON = OHLCVParamsFromJSON;
|
|
19
|
+
exports.OHLCVParamsFromJSONTyped = OHLCVParamsFromJSONTyped;
|
|
20
|
+
exports.OHLCVParamsToJSON = OHLCVParamsToJSON;
|
|
21
|
+
exports.OHLCVParamsToJSONTyped = OHLCVParamsToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.OHLCVParamsResolutionEnum = {
|
|
26
|
+
_1m: '1m',
|
|
27
|
+
_5m: '5m',
|
|
28
|
+
_15m: '15m',
|
|
29
|
+
_1h: '1h',
|
|
30
|
+
_6h: '6h',
|
|
31
|
+
_1d: '1d'
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the OHLCVParams interface.
|
|
35
|
+
*/
|
|
36
|
+
function instanceOfOHLCVParams(value) {
|
|
37
|
+
if (!('resolution' in value) || value['resolution'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
function OHLCVParamsFromJSON(json) {
|
|
42
|
+
return OHLCVParamsFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function OHLCVParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'resolution': json['resolution'],
|
|
50
|
+
'start': json['start'] == null ? undefined : (new Date(json['start'])),
|
|
51
|
+
'end': json['end'] == null ? undefined : (new Date(json['end'])),
|
|
52
|
+
'limit': json['limit'] == null ? undefined : json['limit'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function OHLCVParamsToJSON(json) {
|
|
56
|
+
return OHLCVParamsToJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function OHLCVParamsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'resolution': value['resolution'],
|
|
64
|
+
'start': value['start'] == null ? value['start'] : value['start'].toISOString(),
|
|
65
|
+
'end': value['end'] == null ? value['end'] : value['end'].toISOString(),
|
|
66
|
+
'limit': value['limit'],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PMXT Sidecar API
|
|
3
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.4.4
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Parameters for fetching trade history. No resolution parameter - trades are discrete events.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface TradesParams
|
|
16
|
+
*/
|
|
17
|
+
export interface TradesParams {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {Date}
|
|
21
|
+
* @memberof TradesParams
|
|
22
|
+
*/
|
|
23
|
+
start?: Date;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Date}
|
|
27
|
+
* @memberof TradesParams
|
|
28
|
+
*/
|
|
29
|
+
end?: Date;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof TradesParams
|
|
34
|
+
*/
|
|
35
|
+
limit?: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the TradesParams interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfTradesParams(value: object): value is TradesParams;
|
|
41
|
+
export declare function TradesParamsFromJSON(json: any): TradesParams;
|
|
42
|
+
export declare function TradesParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TradesParams;
|
|
43
|
+
export declare function TradesParamsToJSON(json: any): TradesParams;
|
|
44
|
+
export declare function TradesParamsToJSONTyped(value?: TradesParams | 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.instanceOfTradesParams = instanceOfTradesParams;
|
|
17
|
+
exports.TradesParamsFromJSON = TradesParamsFromJSON;
|
|
18
|
+
exports.TradesParamsFromJSONTyped = TradesParamsFromJSONTyped;
|
|
19
|
+
exports.TradesParamsToJSON = TradesParamsToJSON;
|
|
20
|
+
exports.TradesParamsToJSONTyped = TradesParamsToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the TradesParams interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfTradesParams(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function TradesParamsFromJSON(json) {
|
|
28
|
+
return TradesParamsFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function TradesParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'start': json['start'] == null ? undefined : (new Date(json['start'])),
|
|
36
|
+
'end': json['end'] == null ? undefined : (new Date(json['end'])),
|
|
37
|
+
'limit': json['limit'] == null ? undefined : json['limit'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function TradesParamsToJSON(json) {
|
|
41
|
+
return TradesParamsToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function TradesParamsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'start': value['start'] == null ? value['start'] : value['start'].toISOString(),
|
|
49
|
+
'end': value['end'] == null ? value['end'] : value['end'].toISOString(),
|
|
50
|
+
'limit': value['limit'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -27,6 +27,7 @@ export * from './FetchPositions200Response';
|
|
|
27
27
|
export * from './FetchPositionsRequest';
|
|
28
28
|
export * from './FetchTrades200Response';
|
|
29
29
|
export * from './FetchTradesRequest';
|
|
30
|
+
export * from './FetchTradesRequestArgsInner';
|
|
30
31
|
export * from './FilterEventsRequest';
|
|
31
32
|
export * from './FilterEventsRequestArgsInner';
|
|
32
33
|
export * from './FilterMarketsRequest';
|
|
@@ -40,12 +41,14 @@ export * from './HealthCheck200Response';
|
|
|
40
41
|
export * from './HistoryFilterParams';
|
|
41
42
|
export * from './MarketFilterParams';
|
|
42
43
|
export * from './MarketOutcome';
|
|
44
|
+
export * from './OHLCVParams';
|
|
43
45
|
export * from './Order';
|
|
44
46
|
export * from './OrderBook';
|
|
45
47
|
export * from './OrderLevel';
|
|
46
48
|
export * from './Position';
|
|
47
49
|
export * from './PriceCandle';
|
|
48
50
|
export * from './Trade';
|
|
51
|
+
export * from './TradesParams';
|
|
49
52
|
export * from './UnifiedEvent';
|
|
50
53
|
export * from './UnifiedMarket';
|
|
51
54
|
export * from './WatchOrderBookRequest';
|
|
@@ -45,6 +45,7 @@ __exportStar(require("./FetchPositions200Response"), exports);
|
|
|
45
45
|
__exportStar(require("./FetchPositionsRequest"), exports);
|
|
46
46
|
__exportStar(require("./FetchTrades200Response"), exports);
|
|
47
47
|
__exportStar(require("./FetchTradesRequest"), exports);
|
|
48
|
+
__exportStar(require("./FetchTradesRequestArgsInner"), exports);
|
|
48
49
|
__exportStar(require("./FilterEventsRequest"), exports);
|
|
49
50
|
__exportStar(require("./FilterEventsRequestArgsInner"), exports);
|
|
50
51
|
__exportStar(require("./FilterMarketsRequest"), exports);
|
|
@@ -58,12 +59,14 @@ __exportStar(require("./HealthCheck200Response"), exports);
|
|
|
58
59
|
__exportStar(require("./HistoryFilterParams"), exports);
|
|
59
60
|
__exportStar(require("./MarketFilterParams"), exports);
|
|
60
61
|
__exportStar(require("./MarketOutcome"), exports);
|
|
62
|
+
__exportStar(require("./OHLCVParams"), exports);
|
|
61
63
|
__exportStar(require("./Order"), exports);
|
|
62
64
|
__exportStar(require("./OrderBook"), exports);
|
|
63
65
|
__exportStar(require("./OrderLevel"), exports);
|
|
64
66
|
__exportStar(require("./Position"), exports);
|
|
65
67
|
__exportStar(require("./PriceCandle"), exports);
|
|
66
68
|
__exportStar(require("./Trade"), exports);
|
|
69
|
+
__exportStar(require("./TradesParams"), exports);
|
|
67
70
|
__exportStar(require("./UnifiedEvent"), exports);
|
|
68
71
|
__exportStar(require("./UnifiedMarket"), exports);
|
|
69
72
|
__exportStar(require("./WatchOrderBookRequest"), exports);
|
|
@@ -31,6 +31,7 @@ docs/FetchPositions200Response.md
|
|
|
31
31
|
docs/FetchPositionsRequest.md
|
|
32
32
|
docs/FetchTrades200Response.md
|
|
33
33
|
docs/FetchTradesRequest.md
|
|
34
|
+
docs/FetchTradesRequestArgsInner.md
|
|
34
35
|
docs/FilterEventsRequest.md
|
|
35
36
|
docs/FilterEventsRequestArgsInner.md
|
|
36
37
|
docs/FilterMarketsRequest.md
|
|
@@ -44,12 +45,14 @@ docs/HealthCheck200Response.md
|
|
|
44
45
|
docs/HistoryFilterParams.md
|
|
45
46
|
docs/MarketFilterParams.md
|
|
46
47
|
docs/MarketOutcome.md
|
|
48
|
+
docs/OHLCVParams.md
|
|
47
49
|
docs/Order.md
|
|
48
50
|
docs/OrderBook.md
|
|
49
51
|
docs/OrderLevel.md
|
|
50
52
|
docs/Position.md
|
|
51
53
|
docs/PriceCandle.md
|
|
52
54
|
docs/Trade.md
|
|
55
|
+
docs/TradesParams.md
|
|
53
56
|
docs/UnifiedEvent.md
|
|
54
57
|
docs/UnifiedMarket.md
|
|
55
58
|
docs/WatchOrderBookRequest.md
|
|
@@ -90,6 +93,7 @@ src/models/FetchPositions200Response.ts
|
|
|
90
93
|
src/models/FetchPositionsRequest.ts
|
|
91
94
|
src/models/FetchTrades200Response.ts
|
|
92
95
|
src/models/FetchTradesRequest.ts
|
|
96
|
+
src/models/FetchTradesRequestArgsInner.ts
|
|
93
97
|
src/models/FilterEventsRequest.ts
|
|
94
98
|
src/models/FilterEventsRequestArgsInner.ts
|
|
95
99
|
src/models/FilterMarketsRequest.ts
|
|
@@ -103,12 +107,14 @@ src/models/HealthCheck200Response.ts
|
|
|
103
107
|
src/models/HistoryFilterParams.ts
|
|
104
108
|
src/models/MarketFilterParams.ts
|
|
105
109
|
src/models/MarketOutcome.ts
|
|
110
|
+
src/models/OHLCVParams.ts
|
|
106
111
|
src/models/Order.ts
|
|
107
112
|
src/models/OrderBook.ts
|
|
108
113
|
src/models/OrderLevel.ts
|
|
109
114
|
src/models/Position.ts
|
|
110
115
|
src/models/PriceCandle.ts
|
|
111
116
|
src/models/Trade.ts
|
|
117
|
+
src/models/TradesParams.ts
|
|
112
118
|
src/models/UnifiedEvent.ts
|
|
113
119
|
src/models/UnifiedMarket.ts
|
|
114
120
|
src/models/WatchOrderBookRequest.ts
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`args` | [Array<
|
|
9
|
+
`args` | [Array<FetchTradesRequestArgsInner>](FetchTradesRequestArgsInner.md)
|
|
10
10
|
`credentials` | [ExchangeCredentials](ExchangeCredentials.md)
|
|
11
11
|
|
|
12
12
|
## Example
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# FetchTradesRequestArgsInner
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`start` | Date
|
|
10
|
+
`end` | Date
|
|
11
|
+
`limit` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { FetchTradesRequestArgsInner } from 'pmxtjs'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"start": null,
|
|
21
|
+
"end": null,
|
|
22
|
+
"limit": null,
|
|
23
|
+
} satisfies FetchTradesRequestArgsInner
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as FetchTradesRequestArgsInner
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# OHLCVParams
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`resolution` | string
|
|
10
|
+
`start` | Date
|
|
11
|
+
`end` | Date
|
|
12
|
+
`limit` | number
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { OHLCVParams } from 'pmxtjs'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"resolution": null,
|
|
22
|
+
"start": null,
|
|
23
|
+
"end": null,
|
|
24
|
+
"limit": null,
|
|
25
|
+
} satisfies OHLCVParams
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as OHLCVParams
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# TradesParams
|
|
3
|
+
|
|
4
|
+
Parameters for fetching trade history. No resolution parameter - trades are discrete events.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`start` | Date
|
|
11
|
+
`end` | Date
|
|
12
|
+
`limit` | number
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { TradesParams } from 'pmxtjs'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"start": null,
|
|
22
|
+
"end": null,
|
|
23
|
+
"limit": null,
|
|
24
|
+
} satisfies TradesParams
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as TradesParams
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
package/generated/package.json
CHANGED
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type {
|
|
15
|
+
import type { OHLCVParams } from './OHLCVParams';
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
17
|
+
instanceOfOHLCVParams,
|
|
18
|
+
OHLCVParamsFromJSON,
|
|
19
|
+
OHLCVParamsFromJSONTyped,
|
|
20
|
+
OHLCVParamsToJSON,
|
|
21
|
+
} from './OHLCVParams';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* @type FetchOHLCVRequestArgsInner
|
|
25
25
|
*
|
|
26
26
|
* @export
|
|
27
27
|
*/
|
|
28
|
-
export type FetchOHLCVRequestArgsInner =
|
|
28
|
+
export type FetchOHLCVRequestArgsInner = OHLCVParams | string;
|
|
29
29
|
|
|
30
30
|
export function FetchOHLCVRequestArgsInnerFromJSON(json: any): FetchOHLCVRequestArgsInner {
|
|
31
31
|
return FetchOHLCVRequestArgsInnerFromJSONTyped(json, false);
|
|
@@ -38,8 +38,8 @@ export function FetchOHLCVRequestArgsInnerFromJSONTyped(json: any, ignoreDiscrim
|
|
|
38
38
|
if (typeof json !== 'object') {
|
|
39
39
|
return json;
|
|
40
40
|
}
|
|
41
|
-
if (
|
|
42
|
-
return
|
|
41
|
+
if (instanceOfOHLCVParams(json)) {
|
|
42
|
+
return OHLCVParamsFromJSONTyped(json, true);
|
|
43
43
|
}
|
|
44
44
|
if (typeof json === 'string') {
|
|
45
45
|
return json;
|
|
@@ -58,8 +58,8 @@ export function FetchOHLCVRequestArgsInnerToJSONTyped(value?: FetchOHLCVRequestA
|
|
|
58
58
|
if (typeof value !== 'object') {
|
|
59
59
|
return value;
|
|
60
60
|
}
|
|
61
|
-
if (
|
|
62
|
-
return
|
|
61
|
+
if (instanceOfOHLCVParams(value)) {
|
|
62
|
+
return OHLCVParamsToJSON(value as OHLCVParams);
|
|
63
63
|
}
|
|
64
64
|
if (typeof value === 'string') {
|
|
65
65
|
return value;
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { FetchTradesRequestArgsInner } from './FetchTradesRequestArgsInner';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
18
|
+
FetchTradesRequestArgsInnerFromJSON,
|
|
19
|
+
FetchTradesRequestArgsInnerFromJSONTyped,
|
|
20
|
+
FetchTradesRequestArgsInnerToJSON,
|
|
21
|
+
FetchTradesRequestArgsInnerToJSONTyped,
|
|
22
|
+
} from './FetchTradesRequestArgsInner';
|
|
23
23
|
import type { ExchangeCredentials } from './ExchangeCredentials';
|
|
24
24
|
import {
|
|
25
25
|
ExchangeCredentialsFromJSON,
|
|
@@ -36,10 +36,10 @@ import {
|
|
|
36
36
|
export interface FetchTradesRequest {
|
|
37
37
|
/**
|
|
38
38
|
* [id, params]
|
|
39
|
-
* @type {Array<
|
|
39
|
+
* @type {Array<FetchTradesRequestArgsInner>}
|
|
40
40
|
* @memberof FetchTradesRequest
|
|
41
41
|
*/
|
|
42
|
-
args: Array<
|
|
42
|
+
args: Array<FetchTradesRequestArgsInner>;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
45
|
* @type {ExchangeCredentials}
|
|
@@ -66,7 +66,7 @@ export function FetchTradesRequestFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
66
66
|
}
|
|
67
67
|
return {
|
|
68
68
|
|
|
69
|
-
'args': ((json['args'] as Array<any>).map(
|
|
69
|
+
'args': ((json['args'] as Array<any>).map(FetchTradesRequestArgsInnerFromJSON)),
|
|
70
70
|
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
71
71
|
};
|
|
72
72
|
}
|
|
@@ -82,7 +82,7 @@ export function FetchTradesRequestToJSONTyped(value?: FetchTradesRequest | null,
|
|
|
82
82
|
|
|
83
83
|
return {
|
|
84
84
|
|
|
85
|
-
'args': ((value['args'] as Array<any>).map(
|
|
85
|
+
'args': ((value['args'] as Array<any>).map(FetchTradesRequestArgsInnerToJSON)),
|
|
86
86
|
'credentials': ExchangeCredentialsToJSON(value['credentials']),
|
|
87
87
|
};
|
|
88
88
|
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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 type { TradesParams } from './TradesParams';
|
|
16
|
+
import {
|
|
17
|
+
instanceOfTradesParams,
|
|
18
|
+
TradesParamsFromJSON,
|
|
19
|
+
TradesParamsFromJSONTyped,
|
|
20
|
+
TradesParamsToJSON,
|
|
21
|
+
} from './TradesParams';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @type FetchTradesRequestArgsInner
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
export type FetchTradesRequestArgsInner = TradesParams | string;
|
|
29
|
+
|
|
30
|
+
export function FetchTradesRequestArgsInnerFromJSON(json: any): FetchTradesRequestArgsInner {
|
|
31
|
+
return FetchTradesRequestArgsInnerFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function FetchTradesRequestArgsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FetchTradesRequestArgsInner {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
if (typeof json !== 'object') {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
if (instanceOfTradesParams(json)) {
|
|
42
|
+
return TradesParamsFromJSONTyped(json, true);
|
|
43
|
+
}
|
|
44
|
+
if (typeof json === 'string') {
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
return {} as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function FetchTradesRequestArgsInnerToJSON(json: any): any {
|
|
51
|
+
return FetchTradesRequestArgsInnerToJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function FetchTradesRequestArgsInnerToJSONTyped(value?: FetchTradesRequestArgsInner | null, ignoreDiscriminator: boolean = false): any {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
if (typeof value !== 'object') {
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
if (instanceOfTradesParams(value)) {
|
|
62
|
+
return TradesParamsToJSON(value as TradesParams);
|
|
63
|
+
}
|
|
64
|
+
if (typeof value === 'string') {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
return {};
|
|
68
|
+
}
|
|
69
|
+
|