pmxtjs 1.5.5 → 1.5.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/CreateOrderParams.d.ts +6 -0
- package/dist/esm/generated/src/models/CreateOrderParams.js +2 -0
- package/dist/esm/generated/src/models/ExchangeCredentials.d.ts +13 -0
- package/dist/esm/generated/src/models/ExchangeCredentials.js +5 -0
- package/dist/esm/generated/src/models/ExchangeCredentialsSignatureType.d.ts +21 -0
- package/dist/esm/generated/src/models/ExchangeCredentialsSignatureType.js +43 -0
- package/dist/esm/generated/src/models/index.d.ts +1 -0
- package/dist/esm/generated/src/models/index.js +1 -0
- package/dist/esm/pmxt/client.js +3 -0
- package/dist/esm/pmxt/models.d.ts +2 -0
- package/dist/generated/src/models/CreateOrderParams.d.ts +6 -0
- package/dist/generated/src/models/CreateOrderParams.js +2 -0
- package/dist/generated/src/models/ExchangeCredentials.d.ts +13 -0
- package/dist/generated/src/models/ExchangeCredentials.js +5 -0
- package/dist/generated/src/models/ExchangeCredentialsSignatureType.d.ts +21 -0
- package/dist/generated/src/models/ExchangeCredentialsSignatureType.js +49 -0
- package/dist/generated/src/models/index.d.ts +1 -0
- package/dist/generated/src/models/index.js +1 -0
- package/dist/pmxt/client.js +3 -0
- package/dist/pmxt/models.d.ts +2 -0
- package/generated/.openapi-generator/FILES +2 -0
- package/generated/docs/CreateOrderParams.md +2 -0
- package/generated/docs/ExchangeCredentials.md +4 -0
- package/generated/docs/ExchangeCredentialsSignatureType.md +33 -0
- package/generated/package.json +1 -1
- package/generated/src/models/CreateOrderParams.ts +8 -0
- package/generated/src/models/ExchangeCredentials.ts +24 -0
- package/generated/src/models/ExchangeCredentialsSignatureType.ts +55 -0
- package/generated/src/models/index.ts +1 -0
- package/package.json +2 -2
- package/pmxt/client.ts +3 -0
- package/pmxt/models.ts +3 -0
|
@@ -55,6 +55,7 @@ export function CreateOrderParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
55
55
|
'type': json['type'],
|
|
56
56
|
'amount': json['amount'],
|
|
57
57
|
'price': json['price'] == null ? undefined : json['price'],
|
|
58
|
+
'fee': json['fee'] == null ? undefined : json['fee'],
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
export function CreateOrderParamsToJSON(json) {
|
|
@@ -71,5 +72,6 @@ export function CreateOrderParamsToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
71
72
|
'type': value['type'],
|
|
72
73
|
'amount': value['amount'],
|
|
73
74
|
'price': value['price'],
|
|
75
|
+
'fee': value['fee'],
|
|
74
76
|
};
|
|
75
77
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ExchangeCredentialsSignatureType } from './ExchangeCredentialsSignatureType.js';
|
|
12
13
|
/**
|
|
13
14
|
* Optional authentication credentials for exchange operations
|
|
14
15
|
* @export
|
|
@@ -39,6 +40,18 @@ export interface ExchangeCredentials {
|
|
|
39
40
|
* @memberof ExchangeCredentials
|
|
40
41
|
*/
|
|
41
42
|
passphrase?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The address funding the trades (Proxy address)
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ExchangeCredentials
|
|
47
|
+
*/
|
|
48
|
+
funderAddress?: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {ExchangeCredentialsSignatureType}
|
|
52
|
+
* @memberof ExchangeCredentials
|
|
53
|
+
*/
|
|
54
|
+
signatureType?: ExchangeCredentialsSignatureType;
|
|
42
55
|
}
|
|
43
56
|
/**
|
|
44
57
|
* Check if a given object implements the ExchangeCredentials interface.
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { ExchangeCredentialsSignatureTypeFromJSON, ExchangeCredentialsSignatureTypeToJSON, } from './ExchangeCredentialsSignatureType.js';
|
|
14
15
|
/**
|
|
15
16
|
* Check if a given object implements the ExchangeCredentials interface.
|
|
16
17
|
*/
|
|
@@ -29,6 +30,8 @@ export function ExchangeCredentialsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
30
|
'privateKey': json['privateKey'] == null ? undefined : json['privateKey'],
|
|
30
31
|
'apiSecret': json['apiSecret'] == null ? undefined : json['apiSecret'],
|
|
31
32
|
'passphrase': json['passphrase'] == null ? undefined : json['passphrase'],
|
|
33
|
+
'funderAddress': json['funderAddress'] == null ? undefined : json['funderAddress'],
|
|
34
|
+
'signatureType': json['signatureType'] == null ? undefined : ExchangeCredentialsSignatureTypeFromJSON(json['signatureType']),
|
|
32
35
|
};
|
|
33
36
|
}
|
|
34
37
|
export function ExchangeCredentialsToJSON(json) {
|
|
@@ -43,5 +46,7 @@ export function ExchangeCredentialsToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
43
46
|
'privateKey': value['privateKey'],
|
|
44
47
|
'apiSecret': value['apiSecret'],
|
|
45
48
|
'passphrase': value['passphrase'],
|
|
49
|
+
'funderAddress': value['funderAddress'],
|
|
50
|
+
'signatureType': ExchangeCredentialsSignatureTypeToJSON(value['signatureType']),
|
|
46
51
|
};
|
|
47
52
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PMXT Sidecar API
|
|
3
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.4.4
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @type ExchangeCredentialsSignatureType
|
|
14
|
+
* Signature type (0=EOA, 1=Poly Proxy, 2=Gnosis Safe, or names like 'gnosis_safe')
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export type ExchangeCredentialsSignatureType = number | string;
|
|
18
|
+
export declare function ExchangeCredentialsSignatureTypeFromJSON(json: any): ExchangeCredentialsSignatureType;
|
|
19
|
+
export declare function ExchangeCredentialsSignatureTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExchangeCredentialsSignatureType;
|
|
20
|
+
export declare function ExchangeCredentialsSignatureTypeToJSON(json: any): any;
|
|
21
|
+
export declare function ExchangeCredentialsSignatureTypeToJSONTyped(value?: ExchangeCredentialsSignatureType | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* PMXT Sidecar API
|
|
5
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
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
|
+
export function ExchangeCredentialsSignatureTypeFromJSON(json) {
|
|
15
|
+
return ExchangeCredentialsSignatureTypeFromJSONTyped(json, false);
|
|
16
|
+
}
|
|
17
|
+
export function ExchangeCredentialsSignatureTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
18
|
+
if (json == null) {
|
|
19
|
+
return json;
|
|
20
|
+
}
|
|
21
|
+
if (typeof json === 'number') {
|
|
22
|
+
return json;
|
|
23
|
+
}
|
|
24
|
+
if (typeof json === 'string') {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
export function ExchangeCredentialsSignatureTypeToJSON(json) {
|
|
30
|
+
return ExchangeCredentialsSignatureTypeToJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
export function ExchangeCredentialsSignatureTypeToJSONTyped(value, ignoreDiscriminator = false) {
|
|
33
|
+
if (value == null) {
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
if (typeof value === 'number') {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
if (typeof value === 'string') {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
return {};
|
|
43
|
+
}
|
|
@@ -8,6 +8,7 @@ export * from './CreateOrderRequest.js';
|
|
|
8
8
|
export * from './ErrorDetail.js';
|
|
9
9
|
export * from './ErrorResponse.js';
|
|
10
10
|
export * from './ExchangeCredentials.js';
|
|
11
|
+
export * from './ExchangeCredentialsSignatureType.js';
|
|
11
12
|
export * from './ExecutionPriceResult.js';
|
|
12
13
|
export * from './FetchBalance200Response.js';
|
|
13
14
|
export * from './FetchMarkets200Response.js';
|
|
@@ -10,6 +10,7 @@ export * from './CreateOrderRequest.js';
|
|
|
10
10
|
export * from './ErrorDetail.js';
|
|
11
11
|
export * from './ErrorResponse.js';
|
|
12
12
|
export * from './ExchangeCredentials.js';
|
|
13
|
+
export * from './ExchangeCredentialsSignatureType.js';
|
|
13
14
|
export * from './ExecutionPriceResult.js';
|
|
14
15
|
export * from './FetchBalance200Response.js';
|
|
15
16
|
export * from './FetchMarkets200Response.js';
|
package/dist/esm/pmxt/client.js
CHANGED
|
@@ -594,6 +594,9 @@ export class Exchange {
|
|
|
594
594
|
if (params.price !== undefined) {
|
|
595
595
|
paramsDict.price = params.price;
|
|
596
596
|
}
|
|
597
|
+
if (params.fee !== undefined) {
|
|
598
|
+
paramsDict.fee = params.fee;
|
|
599
|
+
}
|
|
597
600
|
const requestBody = {
|
|
598
601
|
args: [paramsDict],
|
|
599
602
|
credentials: this.getCredentials()
|
|
@@ -234,6 +234,8 @@ export interface CreateOrderParams {
|
|
|
234
234
|
amount: number;
|
|
235
235
|
/** Limit price (required for limit orders, 0.0-1.0) */
|
|
236
236
|
price?: number;
|
|
237
|
+
/** Optional fee rate (e.g., 1000 for 0.1%) */
|
|
238
|
+
fee?: number;
|
|
237
239
|
}
|
|
238
240
|
/**
|
|
239
241
|
* A grouped collection of related markets (e.g., "Who will be Fed Chair?" contains multiple candidate markets)
|
|
@@ -63,6 +63,7 @@ function CreateOrderParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
63
63
|
'type': json['type'],
|
|
64
64
|
'amount': json['amount'],
|
|
65
65
|
'price': json['price'] == null ? undefined : json['price'],
|
|
66
|
+
'fee': json['fee'] == null ? undefined : json['fee'],
|
|
66
67
|
};
|
|
67
68
|
}
|
|
68
69
|
function CreateOrderParamsToJSON(json) {
|
|
@@ -79,5 +80,6 @@ function CreateOrderParamsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
79
80
|
'type': value['type'],
|
|
80
81
|
'amount': value['amount'],
|
|
81
82
|
'price': value['price'],
|
|
83
|
+
'fee': value['fee'],
|
|
82
84
|
};
|
|
83
85
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ExchangeCredentialsSignatureType } from './ExchangeCredentialsSignatureType';
|
|
12
13
|
/**
|
|
13
14
|
* Optional authentication credentials for exchange operations
|
|
14
15
|
* @export
|
|
@@ -39,6 +40,18 @@ export interface ExchangeCredentials {
|
|
|
39
40
|
* @memberof ExchangeCredentials
|
|
40
41
|
*/
|
|
41
42
|
passphrase?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The address funding the trades (Proxy address)
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ExchangeCredentials
|
|
47
|
+
*/
|
|
48
|
+
funderAddress?: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {ExchangeCredentialsSignatureType}
|
|
52
|
+
* @memberof ExchangeCredentials
|
|
53
|
+
*/
|
|
54
|
+
signatureType?: ExchangeCredentialsSignatureType;
|
|
42
55
|
}
|
|
43
56
|
/**
|
|
44
57
|
* Check if a given object implements the ExchangeCredentials interface.
|
|
@@ -18,6 +18,7 @@ exports.ExchangeCredentialsFromJSON = ExchangeCredentialsFromJSON;
|
|
|
18
18
|
exports.ExchangeCredentialsFromJSONTyped = ExchangeCredentialsFromJSONTyped;
|
|
19
19
|
exports.ExchangeCredentialsToJSON = ExchangeCredentialsToJSON;
|
|
20
20
|
exports.ExchangeCredentialsToJSONTyped = ExchangeCredentialsToJSONTyped;
|
|
21
|
+
const ExchangeCredentialsSignatureType_1 = require("./ExchangeCredentialsSignatureType");
|
|
21
22
|
/**
|
|
22
23
|
* Check if a given object implements the ExchangeCredentials interface.
|
|
23
24
|
*/
|
|
@@ -36,6 +37,8 @@ function ExchangeCredentialsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
37
|
'privateKey': json['privateKey'] == null ? undefined : json['privateKey'],
|
|
37
38
|
'apiSecret': json['apiSecret'] == null ? undefined : json['apiSecret'],
|
|
38
39
|
'passphrase': json['passphrase'] == null ? undefined : json['passphrase'],
|
|
40
|
+
'funderAddress': json['funderAddress'] == null ? undefined : json['funderAddress'],
|
|
41
|
+
'signatureType': json['signatureType'] == null ? undefined : (0, ExchangeCredentialsSignatureType_1.ExchangeCredentialsSignatureTypeFromJSON)(json['signatureType']),
|
|
39
42
|
};
|
|
40
43
|
}
|
|
41
44
|
function ExchangeCredentialsToJSON(json) {
|
|
@@ -50,5 +53,7 @@ function ExchangeCredentialsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
50
53
|
'privateKey': value['privateKey'],
|
|
51
54
|
'apiSecret': value['apiSecret'],
|
|
52
55
|
'passphrase': value['passphrase'],
|
|
56
|
+
'funderAddress': value['funderAddress'],
|
|
57
|
+
'signatureType': (0, ExchangeCredentialsSignatureType_1.ExchangeCredentialsSignatureTypeToJSON)(value['signatureType']),
|
|
53
58
|
};
|
|
54
59
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PMXT Sidecar API
|
|
3
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.4.4
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @type ExchangeCredentialsSignatureType
|
|
14
|
+
* Signature type (0=EOA, 1=Poly Proxy, 2=Gnosis Safe, or names like 'gnosis_safe')
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export type ExchangeCredentialsSignatureType = number | string;
|
|
18
|
+
export declare function ExchangeCredentialsSignatureTypeFromJSON(json: any): ExchangeCredentialsSignatureType;
|
|
19
|
+
export declare function ExchangeCredentialsSignatureTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExchangeCredentialsSignatureType;
|
|
20
|
+
export declare function ExchangeCredentialsSignatureTypeToJSON(json: any): any;
|
|
21
|
+
export declare function ExchangeCredentialsSignatureTypeToJSONTyped(value?: ExchangeCredentialsSignatureType | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* PMXT Sidecar API
|
|
6
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.4.4
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ExchangeCredentialsSignatureTypeFromJSON = ExchangeCredentialsSignatureTypeFromJSON;
|
|
17
|
+
exports.ExchangeCredentialsSignatureTypeFromJSONTyped = ExchangeCredentialsSignatureTypeFromJSONTyped;
|
|
18
|
+
exports.ExchangeCredentialsSignatureTypeToJSON = ExchangeCredentialsSignatureTypeToJSON;
|
|
19
|
+
exports.ExchangeCredentialsSignatureTypeToJSONTyped = ExchangeCredentialsSignatureTypeToJSONTyped;
|
|
20
|
+
function ExchangeCredentialsSignatureTypeFromJSON(json) {
|
|
21
|
+
return ExchangeCredentialsSignatureTypeFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
function ExchangeCredentialsSignatureTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json == null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
if (typeof json === 'number') {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
if (typeof json === 'string') {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
function ExchangeCredentialsSignatureTypeToJSON(json) {
|
|
36
|
+
return ExchangeCredentialsSignatureTypeToJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function ExchangeCredentialsSignatureTypeToJSONTyped(value, ignoreDiscriminator = false) {
|
|
39
|
+
if (value == null) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
if (typeof value === 'number') {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
if (typeof value === 'string') {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {};
|
|
49
|
+
}
|
|
@@ -8,6 +8,7 @@ export * from './CreateOrderRequest';
|
|
|
8
8
|
export * from './ErrorDetail';
|
|
9
9
|
export * from './ErrorResponse';
|
|
10
10
|
export * from './ExchangeCredentials';
|
|
11
|
+
export * from './ExchangeCredentialsSignatureType';
|
|
11
12
|
export * from './ExecutionPriceResult';
|
|
12
13
|
export * from './FetchBalance200Response';
|
|
13
14
|
export * from './FetchMarkets200Response';
|
|
@@ -26,6 +26,7 @@ __exportStar(require("./CreateOrderRequest"), exports);
|
|
|
26
26
|
__exportStar(require("./ErrorDetail"), exports);
|
|
27
27
|
__exportStar(require("./ErrorResponse"), exports);
|
|
28
28
|
__exportStar(require("./ExchangeCredentials"), exports);
|
|
29
|
+
__exportStar(require("./ExchangeCredentialsSignatureType"), exports);
|
|
29
30
|
__exportStar(require("./ExecutionPriceResult"), exports);
|
|
30
31
|
__exportStar(require("./FetchBalance200Response"), exports);
|
|
31
32
|
__exportStar(require("./FetchMarkets200Response"), exports);
|
package/dist/pmxt/client.js
CHANGED
|
@@ -597,6 +597,9 @@ class Exchange {
|
|
|
597
597
|
if (params.price !== undefined) {
|
|
598
598
|
paramsDict.price = params.price;
|
|
599
599
|
}
|
|
600
|
+
if (params.fee !== undefined) {
|
|
601
|
+
paramsDict.fee = params.fee;
|
|
602
|
+
}
|
|
600
603
|
const requestBody = {
|
|
601
604
|
args: [paramsDict],
|
|
602
605
|
credentials: this.getCredentials()
|
package/dist/pmxt/models.d.ts
CHANGED
|
@@ -234,6 +234,8 @@ export interface CreateOrderParams {
|
|
|
234
234
|
amount: number;
|
|
235
235
|
/** Limit price (required for limit orders, 0.0-1.0) */
|
|
236
236
|
price?: number;
|
|
237
|
+
/** Optional fee rate (e.g., 1000 for 0.1%) */
|
|
238
|
+
fee?: number;
|
|
237
239
|
}
|
|
238
240
|
/**
|
|
239
241
|
* A grouped collection of related markets (e.g., "Who will be Fed Chair?" contains multiple candidate markets)
|
|
@@ -12,6 +12,7 @@ docs/DefaultApi.md
|
|
|
12
12
|
docs/ErrorDetail.md
|
|
13
13
|
docs/ErrorResponse.md
|
|
14
14
|
docs/ExchangeCredentials.md
|
|
15
|
+
docs/ExchangeCredentialsSignatureType.md
|
|
15
16
|
docs/ExecutionPriceResult.md
|
|
16
17
|
docs/FetchBalance200Response.md
|
|
17
18
|
docs/FetchMarkets200Response.md
|
|
@@ -65,6 +66,7 @@ src/models/CreateOrderRequest.ts
|
|
|
65
66
|
src/models/ErrorDetail.ts
|
|
66
67
|
src/models/ErrorResponse.ts
|
|
67
68
|
src/models/ExchangeCredentials.ts
|
|
69
|
+
src/models/ExchangeCredentialsSignatureType.ts
|
|
68
70
|
src/models/ExecutionPriceResult.ts
|
|
69
71
|
src/models/FetchBalance200Response.ts
|
|
70
72
|
src/models/FetchMarkets200Response.ts
|
|
@@ -12,6 +12,7 @@ Name | Type
|
|
|
12
12
|
`type` | string
|
|
13
13
|
`amount` | number
|
|
14
14
|
`price` | number
|
|
15
|
+
`fee` | number
|
|
15
16
|
|
|
16
17
|
## Example
|
|
17
18
|
|
|
@@ -26,6 +27,7 @@ const example = {
|
|
|
26
27
|
"type": null,
|
|
27
28
|
"amount": null,
|
|
28
29
|
"price": null,
|
|
30
|
+
"fee": null,
|
|
29
31
|
} satisfies CreateOrderParams
|
|
30
32
|
|
|
31
33
|
console.log(example)
|
|
@@ -11,6 +11,8 @@ Name | Type
|
|
|
11
11
|
`privateKey` | string
|
|
12
12
|
`apiSecret` | string
|
|
13
13
|
`passphrase` | string
|
|
14
|
+
`funderAddress` | string
|
|
15
|
+
`signatureType` | [ExchangeCredentialsSignatureType](ExchangeCredentialsSignatureType.md)
|
|
14
16
|
|
|
15
17
|
## Example
|
|
16
18
|
|
|
@@ -23,6 +25,8 @@ const example = {
|
|
|
23
25
|
"privateKey": null,
|
|
24
26
|
"apiSecret": null,
|
|
25
27
|
"passphrase": null,
|
|
28
|
+
"funderAddress": null,
|
|
29
|
+
"signatureType": null,
|
|
26
30
|
} satisfies ExchangeCredentials
|
|
27
31
|
|
|
28
32
|
console.log(example)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# ExchangeCredentialsSignatureType
|
|
3
|
+
|
|
4
|
+
Signature type (0=EOA, 1=Poly Proxy, 2=Gnosis Safe, or names like \'gnosis_safe\')
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ExchangeCredentialsSignatureType } from 'pmxtjs'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies ExchangeCredentialsSignatureType
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as ExchangeCredentialsSignatureType
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|
package/generated/package.json
CHANGED
|
@@ -55,6 +55,12 @@ export interface CreateOrderParams {
|
|
|
55
55
|
* @memberof CreateOrderParams
|
|
56
56
|
*/
|
|
57
57
|
price?: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof CreateOrderParams
|
|
62
|
+
*/
|
|
63
|
+
fee?: number;
|
|
58
64
|
}
|
|
59
65
|
|
|
60
66
|
|
|
@@ -105,6 +111,7 @@ export function CreateOrderParamsFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
105
111
|
'type': json['type'],
|
|
106
112
|
'amount': json['amount'],
|
|
107
113
|
'price': json['price'] == null ? undefined : json['price'],
|
|
114
|
+
'fee': json['fee'] == null ? undefined : json['fee'],
|
|
108
115
|
};
|
|
109
116
|
}
|
|
110
117
|
|
|
@@ -125,6 +132,7 @@ export function CreateOrderParamsToJSONTyped(value?: CreateOrderParams | null, i
|
|
|
125
132
|
'type': value['type'],
|
|
126
133
|
'amount': value['amount'],
|
|
127
134
|
'price': value['price'],
|
|
135
|
+
'fee': value['fee'],
|
|
128
136
|
};
|
|
129
137
|
}
|
|
130
138
|
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ExchangeCredentialsSignatureType } from './ExchangeCredentialsSignatureType';
|
|
17
|
+
import {
|
|
18
|
+
ExchangeCredentialsSignatureTypeFromJSON,
|
|
19
|
+
ExchangeCredentialsSignatureTypeFromJSONTyped,
|
|
20
|
+
ExchangeCredentialsSignatureTypeToJSON,
|
|
21
|
+
ExchangeCredentialsSignatureTypeToJSONTyped,
|
|
22
|
+
} from './ExchangeCredentialsSignatureType';
|
|
23
|
+
|
|
16
24
|
/**
|
|
17
25
|
* Optional authentication credentials for exchange operations
|
|
18
26
|
* @export
|
|
@@ -43,6 +51,18 @@ export interface ExchangeCredentials {
|
|
|
43
51
|
* @memberof ExchangeCredentials
|
|
44
52
|
*/
|
|
45
53
|
passphrase?: string;
|
|
54
|
+
/**
|
|
55
|
+
* The address funding the trades (Proxy address)
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof ExchangeCredentials
|
|
58
|
+
*/
|
|
59
|
+
funderAddress?: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {ExchangeCredentialsSignatureType}
|
|
63
|
+
* @memberof ExchangeCredentials
|
|
64
|
+
*/
|
|
65
|
+
signatureType?: ExchangeCredentialsSignatureType;
|
|
46
66
|
}
|
|
47
67
|
|
|
48
68
|
/**
|
|
@@ -66,6 +86,8 @@ export function ExchangeCredentialsFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
66
86
|
'privateKey': json['privateKey'] == null ? undefined : json['privateKey'],
|
|
67
87
|
'apiSecret': json['apiSecret'] == null ? undefined : json['apiSecret'],
|
|
68
88
|
'passphrase': json['passphrase'] == null ? undefined : json['passphrase'],
|
|
89
|
+
'funderAddress': json['funderAddress'] == null ? undefined : json['funderAddress'],
|
|
90
|
+
'signatureType': json['signatureType'] == null ? undefined : ExchangeCredentialsSignatureTypeFromJSON(json['signatureType']),
|
|
69
91
|
};
|
|
70
92
|
}
|
|
71
93
|
|
|
@@ -84,6 +106,8 @@ export function ExchangeCredentialsToJSONTyped(value?: ExchangeCredentials | nul
|
|
|
84
106
|
'privateKey': value['privateKey'],
|
|
85
107
|
'apiSecret': value['apiSecret'],
|
|
86
108
|
'passphrase': value['passphrase'],
|
|
109
|
+
'funderAddress': value['funderAddress'],
|
|
110
|
+
'signatureType': ExchangeCredentialsSignatureTypeToJSON(value['signatureType']),
|
|
87
111
|
};
|
|
88
112
|
}
|
|
89
113
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* PMXT Sidecar API
|
|
5
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
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
|
+
/**
|
|
16
|
+
* @type ExchangeCredentialsSignatureType
|
|
17
|
+
* Signature type (0=EOA, 1=Poly Proxy, 2=Gnosis Safe, or names like 'gnosis_safe')
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export type ExchangeCredentialsSignatureType = number | string;
|
|
21
|
+
|
|
22
|
+
export function ExchangeCredentialsSignatureTypeFromJSON(json: any): ExchangeCredentialsSignatureType {
|
|
23
|
+
return ExchangeCredentialsSignatureTypeFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function ExchangeCredentialsSignatureTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExchangeCredentialsSignatureType {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
if (typeof json === 'number') {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
if (typeof json === 'string') {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {} as any;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function ExchangeCredentialsSignatureTypeToJSON(json: any): any {
|
|
40
|
+
return ExchangeCredentialsSignatureTypeToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function ExchangeCredentialsSignatureTypeToJSONTyped(value?: ExchangeCredentialsSignatureType | null, ignoreDiscriminator: boolean = false): any {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
if (typeof value === 'number') {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
if (typeof value === 'string') {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {};
|
|
54
|
+
}
|
|
55
|
+
|
|
@@ -10,6 +10,7 @@ export * from './CreateOrderRequest';
|
|
|
10
10
|
export * from './ErrorDetail';
|
|
11
11
|
export * from './ErrorResponse';
|
|
12
12
|
export * from './ExchangeCredentials';
|
|
13
|
+
export * from './ExchangeCredentialsSignatureType';
|
|
13
14
|
export * from './ExecutionPriceResult';
|
|
14
15
|
export * from './FetchBalance200Response';
|
|
15
16
|
export * from './FetchMarkets200Response';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmxtjs",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7",
|
|
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": "1.5.
|
|
45
|
+
"pmxt-core": "1.5.7"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/jest": "^30.0.0",
|
package/pmxt/client.ts
CHANGED
|
@@ -719,6 +719,9 @@ export abstract class Exchange {
|
|
|
719
719
|
if (params.price !== undefined) {
|
|
720
720
|
paramsDict.price = params.price;
|
|
721
721
|
}
|
|
722
|
+
if (params.fee !== undefined) {
|
|
723
|
+
paramsDict.fee = params.fee;
|
|
724
|
+
}
|
|
722
725
|
|
|
723
726
|
const requestBody: CreateOrderRequest = {
|
|
724
727
|
args: [paramsDict],
|
package/pmxt/models.ts
CHANGED
|
@@ -315,6 +315,9 @@ export interface CreateOrderParams {
|
|
|
315
315
|
|
|
316
316
|
/** Limit price (required for limit orders, 0.0-1.0) */
|
|
317
317
|
price?: number;
|
|
318
|
+
|
|
319
|
+
/** Optional fee rate (e.g., 1000 for 0.1%) */
|
|
320
|
+
fee?: number;
|
|
318
321
|
}
|
|
319
322
|
/**
|
|
320
323
|
* A grouped collection of related markets (e.g., "Who will be Fed Chair?" contains multiple candidate markets)
|