pmxtjs 2.37.10 → 2.37.12
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 +33 -3
- package/dist/esm/generated/src/apis/DefaultApi.js +48 -3
- package/dist/esm/generated/src/models/ExchangeCredentials.d.ts +6 -0
- package/dist/esm/generated/src/models/ExchangeCredentials.js +2 -0
- package/dist/esm/generated/src/models/TestDummyMethod200Response.d.ts +45 -0
- package/dist/esm/generated/src/models/TestDummyMethod200Response.js +46 -0
- package/dist/esm/generated/src/models/TestDummyMethodRequest.d.ts +39 -0
- package/dist/esm/generated/src/models/TestDummyMethodRequest.js +44 -0
- package/dist/esm/generated/src/models/index.d.ts +2 -0
- package/dist/esm/generated/src/models/index.js +2 -0
- package/dist/generated/src/apis/DefaultApi.d.ts +33 -3
- package/dist/generated/src/apis/DefaultApi.js +48 -3
- package/dist/generated/src/models/ExchangeCredentials.d.ts +6 -0
- package/dist/generated/src/models/ExchangeCredentials.js +2 -0
- package/dist/generated/src/models/TestDummyMethod200Response.d.ts +45 -0
- package/dist/generated/src/models/TestDummyMethod200Response.js +53 -0
- package/dist/generated/src/models/TestDummyMethodRequest.d.ts +39 -0
- package/dist/generated/src/models/TestDummyMethodRequest.js +51 -0
- package/dist/generated/src/models/index.d.ts +2 -0
- package/dist/generated/src/models/index.js +2 -0
- package/generated/.openapi-generator/FILES +4 -0
- package/generated/docs/DefaultApi.md +71 -2
- package/generated/docs/ExchangeCredentials.md +2 -0
- package/generated/docs/TestDummyMethod200Response.md +38 -0
- package/generated/docs/TestDummyMethodRequest.md +36 -0
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +71 -2
- package/generated/src/models/ExchangeCredentials.ts +8 -0
- package/generated/src/models/TestDummyMethod200Response.ts +89 -0
- package/generated/src/models/TestDummyMethodRequest.ts +81 -0
- package/generated/src/models/index.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* PMXT Sidecar API
|
|
6
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi, 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.instanceOfTestDummyMethod200Response = instanceOfTestDummyMethod200Response;
|
|
17
|
+
exports.TestDummyMethod200ResponseFromJSON = TestDummyMethod200ResponseFromJSON;
|
|
18
|
+
exports.TestDummyMethod200ResponseFromJSONTyped = TestDummyMethod200ResponseFromJSONTyped;
|
|
19
|
+
exports.TestDummyMethod200ResponseToJSON = TestDummyMethod200ResponseToJSON;
|
|
20
|
+
exports.TestDummyMethod200ResponseToJSONTyped = TestDummyMethod200ResponseToJSONTyped;
|
|
21
|
+
const ErrorDetail_1 = require("./ErrorDetail");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the TestDummyMethod200Response interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfTestDummyMethod200Response(value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function TestDummyMethod200ResponseFromJSON(json) {
|
|
29
|
+
return TestDummyMethod200ResponseFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function TestDummyMethod200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'success': json['success'] == null ? undefined : json['success'],
|
|
37
|
+
'error': json['error'] == null ? undefined : (0, ErrorDetail_1.ErrorDetailFromJSON)(json['error']),
|
|
38
|
+
'data': json['data'] == null ? undefined : json['data'],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function TestDummyMethod200ResponseToJSON(json) {
|
|
42
|
+
return TestDummyMethod200ResponseToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function TestDummyMethod200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'success': value['success'],
|
|
50
|
+
'error': (0, ErrorDetail_1.ErrorDetailToJSON)(value['error']),
|
|
51
|
+
'data': value['data'],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface TestDummyMethodRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface TestDummyMethodRequest {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<string>}
|
|
22
|
+
* @memberof TestDummyMethodRequest
|
|
23
|
+
*/
|
|
24
|
+
args?: Array<string>;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {ExchangeCredentials}
|
|
28
|
+
* @memberof TestDummyMethodRequest
|
|
29
|
+
*/
|
|
30
|
+
credentials?: ExchangeCredentials;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the TestDummyMethodRequest interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfTestDummyMethodRequest(value: object): value is TestDummyMethodRequest;
|
|
36
|
+
export declare function TestDummyMethodRequestFromJSON(json: any): TestDummyMethodRequest;
|
|
37
|
+
export declare function TestDummyMethodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TestDummyMethodRequest;
|
|
38
|
+
export declare function TestDummyMethodRequestToJSON(json: any): TestDummyMethodRequest;
|
|
39
|
+
export declare function TestDummyMethodRequestToJSONTyped(value?: TestDummyMethodRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
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.instanceOfTestDummyMethodRequest = instanceOfTestDummyMethodRequest;
|
|
17
|
+
exports.TestDummyMethodRequestFromJSON = TestDummyMethodRequestFromJSON;
|
|
18
|
+
exports.TestDummyMethodRequestFromJSONTyped = TestDummyMethodRequestFromJSONTyped;
|
|
19
|
+
exports.TestDummyMethodRequestToJSON = TestDummyMethodRequestToJSON;
|
|
20
|
+
exports.TestDummyMethodRequestToJSONTyped = TestDummyMethodRequestToJSONTyped;
|
|
21
|
+
const ExchangeCredentials_1 = require("./ExchangeCredentials");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the TestDummyMethodRequest interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfTestDummyMethodRequest(value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function TestDummyMethodRequestFromJSON(json) {
|
|
29
|
+
return TestDummyMethodRequestFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function TestDummyMethodRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'args': json['args'] == null ? undefined : json['args'],
|
|
37
|
+
'credentials': json['credentials'] == null ? undefined : (0, ExchangeCredentials_1.ExchangeCredentialsFromJSON)(json['credentials']),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function TestDummyMethodRequestToJSON(json) {
|
|
41
|
+
return TestDummyMethodRequestToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function TestDummyMethodRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'args': value['args'],
|
|
49
|
+
'credentials': (0, ExchangeCredentials_1.ExchangeCredentialsToJSON)(value['credentials']),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -79,6 +79,8 @@ export * from './Position';
|
|
|
79
79
|
export * from './PriceCandle';
|
|
80
80
|
export * from './PriceComparison';
|
|
81
81
|
export * from './SubmitOrderRequest';
|
|
82
|
+
export * from './TestDummyMethod200Response';
|
|
83
|
+
export * from './TestDummyMethodRequest';
|
|
82
84
|
export * from './Trade';
|
|
83
85
|
export * from './TradesParams';
|
|
84
86
|
export * from './UnifiedEvent';
|
|
@@ -97,6 +97,8 @@ __exportStar(require("./Position"), exports);
|
|
|
97
97
|
__exportStar(require("./PriceCandle"), exports);
|
|
98
98
|
__exportStar(require("./PriceComparison"), exports);
|
|
99
99
|
__exportStar(require("./SubmitOrderRequest"), exports);
|
|
100
|
+
__exportStar(require("./TestDummyMethod200Response"), exports);
|
|
101
|
+
__exportStar(require("./TestDummyMethodRequest"), exports);
|
|
100
102
|
__exportStar(require("./Trade"), exports);
|
|
101
103
|
__exportStar(require("./TradesParams"), exports);
|
|
102
104
|
__exportStar(require("./UnifiedEvent"), exports);
|
|
@@ -84,6 +84,8 @@ docs/Position.md
|
|
|
84
84
|
docs/PriceCandle.md
|
|
85
85
|
docs/PriceComparison.md
|
|
86
86
|
docs/SubmitOrderRequest.md
|
|
87
|
+
docs/TestDummyMethod200Response.md
|
|
88
|
+
docs/TestDummyMethodRequest.md
|
|
87
89
|
docs/Trade.md
|
|
88
90
|
docs/TradesParams.md
|
|
89
91
|
docs/UnifiedEvent.md
|
|
@@ -185,6 +187,8 @@ src/models/Position.ts
|
|
|
185
187
|
src/models/PriceCandle.ts
|
|
186
188
|
src/models/PriceComparison.ts
|
|
187
189
|
src/models/SubmitOrderRequest.ts
|
|
190
|
+
src/models/TestDummyMethod200Response.ts
|
|
191
|
+
src/models/TestDummyMethodRequest.ts
|
|
188
192
|
src/models/Trade.ts
|
|
189
193
|
src/models/TradesParams.ts
|
|
190
194
|
src/models/UnifiedEvent.ts
|
|
@@ -39,6 +39,7 @@ All URIs are relative to *http://localhost:3847*
|
|
|
39
39
|
| [**healthCheck**](DefaultApi.md#healthcheck) | **GET** /health | Server Health Check |
|
|
40
40
|
| [**loadMarkets**](DefaultApi.md#loadmarketsoperation) | **POST** /api/{exchange}/loadMarkets | Load Markets |
|
|
41
41
|
| [**submitOrder**](DefaultApi.md#submitorderoperation) | **POST** /api/{exchange}/submitOrder | Submit Order |
|
|
42
|
+
| [**testDummyMethod**](DefaultApi.md#testdummymethodoperation) | **POST** /api/{exchange}/testDummyMethod | Test Dummy Method |
|
|
42
43
|
| [**unwatchAddress**](DefaultApi.md#unwatchaddressoperation) | **POST** /api/{exchange}/unwatchAddress | Unwatch Address |
|
|
43
44
|
| [**unwatchOrderBook**](DefaultApi.md#unwatchorderbookoperation) | **POST** /api/{exchange}/unwatchOrderBook | Unwatch Order Book |
|
|
44
45
|
| [**watchAddress**](DefaultApi.md#watchaddressoperation) | **POST** /api/{exchange}/watchAddress | Watch Address |
|
|
@@ -194,8 +195,6 @@ No authorization required
|
|
|
194
195
|
|
|
195
196
|
Close
|
|
196
197
|
|
|
197
|
-
Close all WebSocket connections and clean up resources. Call this when you\'re done streaming to properly release connections.
|
|
198
|
-
|
|
199
198
|
### Example
|
|
200
199
|
|
|
201
200
|
```ts
|
|
@@ -2822,6 +2821,76 @@ No authorization required
|
|
|
2822
2821
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2823
2822
|
|
|
2824
2823
|
|
|
2824
|
+
## testDummyMethod
|
|
2825
|
+
|
|
2826
|
+
> TestDummyMethod200Response testDummyMethod(exchange, testDummyMethodRequest)
|
|
2827
|
+
|
|
2828
|
+
Test Dummy Method
|
|
2829
|
+
|
|
2830
|
+
Test method for auto-generation verification.
|
|
2831
|
+
|
|
2832
|
+
### Example
|
|
2833
|
+
|
|
2834
|
+
```ts
|
|
2835
|
+
import {
|
|
2836
|
+
Configuration,
|
|
2837
|
+
DefaultApi,
|
|
2838
|
+
} from 'pmxtjs';
|
|
2839
|
+
import type { TestDummyMethodOperationRequest } from 'pmxtjs';
|
|
2840
|
+
|
|
2841
|
+
async function example() {
|
|
2842
|
+
console.log("🚀 Testing pmxtjs SDK...");
|
|
2843
|
+
const api = new DefaultApi();
|
|
2844
|
+
|
|
2845
|
+
const body = {
|
|
2846
|
+
// 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'router' | The prediction market exchange to target.
|
|
2847
|
+
exchange: exchange_example,
|
|
2848
|
+
// TestDummyMethodRequest (optional)
|
|
2849
|
+
testDummyMethodRequest: ...,
|
|
2850
|
+
} satisfies TestDummyMethodOperationRequest;
|
|
2851
|
+
|
|
2852
|
+
try {
|
|
2853
|
+
const data = await api.testDummyMethod(body);
|
|
2854
|
+
console.log(data);
|
|
2855
|
+
} catch (error) {
|
|
2856
|
+
console.error(error);
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
|
|
2860
|
+
// Run the test
|
|
2861
|
+
example().catch(console.error);
|
|
2862
|
+
```
|
|
2863
|
+
|
|
2864
|
+
### Parameters
|
|
2865
|
+
|
|
2866
|
+
|
|
2867
|
+
| Name | Type | Description | Notes |
|
|
2868
|
+
|------------- | ------------- | ------------- | -------------|
|
|
2869
|
+
| **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] |
|
|
2870
|
+
| **testDummyMethodRequest** | [TestDummyMethodRequest](TestDummyMethodRequest.md) | | [Optional] |
|
|
2871
|
+
|
|
2872
|
+
### Return type
|
|
2873
|
+
|
|
2874
|
+
[**TestDummyMethod200Response**](TestDummyMethod200Response.md)
|
|
2875
|
+
|
|
2876
|
+
### Authorization
|
|
2877
|
+
|
|
2878
|
+
No authorization required
|
|
2879
|
+
|
|
2880
|
+
### HTTP request headers
|
|
2881
|
+
|
|
2882
|
+
- **Content-Type**: `application/json`
|
|
2883
|
+
- **Accept**: `application/json`
|
|
2884
|
+
|
|
2885
|
+
|
|
2886
|
+
### HTTP response details
|
|
2887
|
+
| Status code | Description | Response headers |
|
|
2888
|
+
|-------------|-------------|------------------|
|
|
2889
|
+
| **200** | Test Dummy Method response | - |
|
|
2890
|
+
|
|
2891
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2892
|
+
|
|
2893
|
+
|
|
2825
2894
|
## unwatchAddress
|
|
2826
2895
|
|
|
2827
2896
|
> BaseResponse unwatchAddress(exchange, unwatchAddressRequest)
|
|
@@ -15,6 +15,7 @@ Name | Type
|
|
|
15
15
|
`signatureType` | [ExchangeCredentialsSignatureType](ExchangeCredentialsSignatureType.md)
|
|
16
16
|
`funderAddress` | string
|
|
17
17
|
`walletAddress` | string
|
|
18
|
+
`baseUrl` | string
|
|
18
19
|
|
|
19
20
|
## Example
|
|
20
21
|
|
|
@@ -31,6 +32,7 @@ const example = {
|
|
|
31
32
|
"signatureType": null,
|
|
32
33
|
"funderAddress": null,
|
|
33
34
|
"walletAddress": null,
|
|
35
|
+
"baseUrl": null,
|
|
34
36
|
} satisfies ExchangeCredentials
|
|
35
37
|
|
|
36
38
|
console.log(example)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# TestDummyMethod200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`success` | boolean
|
|
10
|
+
`error` | [ErrorDetail](ErrorDetail.md)
|
|
11
|
+
`data` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { TestDummyMethod200Response } from 'pmxtjs'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"success": true,
|
|
21
|
+
"error": null,
|
|
22
|
+
"data": null,
|
|
23
|
+
} satisfies TestDummyMethod200Response
|
|
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 TestDummyMethod200Response
|
|
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,36 @@
|
|
|
1
|
+
|
|
2
|
+
# TestDummyMethodRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`args` | Array<string>
|
|
10
|
+
`credentials` | [ExchangeCredentials](ExchangeCredentials.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { TestDummyMethodRequest } from 'pmxtjs'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"args": null,
|
|
20
|
+
"credentials": null,
|
|
21
|
+
} satisfies TestDummyMethodRequest
|
|
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 TestDummyMethodRequest
|
|
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
|
+
|
package/generated/package.json
CHANGED
|
@@ -53,6 +53,8 @@ import type {
|
|
|
53
53
|
LoadMarketsRequest,
|
|
54
54
|
MarketFilterCriteria,
|
|
55
55
|
SubmitOrderRequest,
|
|
56
|
+
TestDummyMethod200Response,
|
|
57
|
+
TestDummyMethodRequest,
|
|
56
58
|
UnifiedEvent,
|
|
57
59
|
UnifiedMarket,
|
|
58
60
|
UnwatchAddressRequest,
|
|
@@ -141,6 +143,10 @@ import {
|
|
|
141
143
|
MarketFilterCriteriaToJSON,
|
|
142
144
|
SubmitOrderRequestFromJSON,
|
|
143
145
|
SubmitOrderRequestToJSON,
|
|
146
|
+
TestDummyMethod200ResponseFromJSON,
|
|
147
|
+
TestDummyMethod200ResponseToJSON,
|
|
148
|
+
TestDummyMethodRequestFromJSON,
|
|
149
|
+
TestDummyMethodRequestToJSON,
|
|
144
150
|
UnifiedEventFromJSON,
|
|
145
151
|
UnifiedEventToJSON,
|
|
146
152
|
UnifiedMarketFromJSON,
|
|
@@ -450,6 +456,11 @@ export interface SubmitOrderOperationRequest {
|
|
|
450
456
|
submitOrderRequest?: SubmitOrderRequest;
|
|
451
457
|
}
|
|
452
458
|
|
|
459
|
+
export interface TestDummyMethodOperationRequest {
|
|
460
|
+
exchange: TestDummyMethodOperationExchangeEnum;
|
|
461
|
+
testDummyMethodRequest?: TestDummyMethodRequest;
|
|
462
|
+
}
|
|
463
|
+
|
|
453
464
|
export interface UnwatchAddressOperationRequest {
|
|
454
465
|
exchange: UnwatchAddressOperationExchangeEnum;
|
|
455
466
|
unwatchAddressRequest?: UnwatchAddressRequest;
|
|
@@ -570,7 +581,6 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
570
581
|
}
|
|
571
582
|
|
|
572
583
|
/**
|
|
573
|
-
* Close all WebSocket connections and clean up resources. Call this when you\'re done streaming to properly release connections.
|
|
574
584
|
* Close
|
|
575
585
|
*/
|
|
576
586
|
async closeRaw(requestParameters: CloseOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseResponse>> {
|
|
@@ -603,7 +613,6 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
603
613
|
}
|
|
604
614
|
|
|
605
615
|
/**
|
|
606
|
-
* Close all WebSocket connections and clean up resources. Call this when you\'re done streaming to properly release connections.
|
|
607
616
|
* Close
|
|
608
617
|
*/
|
|
609
618
|
async close(requestParameters: CloseOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseResponse> {
|
|
@@ -2455,6 +2464,48 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
2455
2464
|
return await response.value();
|
|
2456
2465
|
}
|
|
2457
2466
|
|
|
2467
|
+
/**
|
|
2468
|
+
* Test method for auto-generation verification.
|
|
2469
|
+
* Test Dummy Method
|
|
2470
|
+
*/
|
|
2471
|
+
async testDummyMethodRaw(requestParameters: TestDummyMethodOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TestDummyMethod200Response>> {
|
|
2472
|
+
if (requestParameters['exchange'] == null) {
|
|
2473
|
+
throw new runtime.RequiredError(
|
|
2474
|
+
'exchange',
|
|
2475
|
+
'Required parameter "exchange" was null or undefined when calling testDummyMethod().'
|
|
2476
|
+
);
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
const queryParameters: any = {};
|
|
2480
|
+
|
|
2481
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2482
|
+
|
|
2483
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2484
|
+
|
|
2485
|
+
|
|
2486
|
+
let urlPath = `/api/{exchange}/testDummyMethod`;
|
|
2487
|
+
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
2488
|
+
|
|
2489
|
+
const response = await this.request({
|
|
2490
|
+
path: urlPath,
|
|
2491
|
+
method: 'POST',
|
|
2492
|
+
headers: headerParameters,
|
|
2493
|
+
query: queryParameters,
|
|
2494
|
+
body: TestDummyMethodRequestToJSON(requestParameters['testDummyMethodRequest']),
|
|
2495
|
+
}, initOverrides);
|
|
2496
|
+
|
|
2497
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TestDummyMethod200ResponseFromJSON(jsonValue));
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
/**
|
|
2501
|
+
* Test method for auto-generation verification.
|
|
2502
|
+
* Test Dummy Method
|
|
2503
|
+
*/
|
|
2504
|
+
async testDummyMethod(requestParameters: TestDummyMethodOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TestDummyMethod200Response> {
|
|
2505
|
+
const response = await this.testDummyMethodRaw(requestParameters, initOverrides);
|
|
2506
|
+
return await response.value();
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2458
2509
|
/**
|
|
2459
2510
|
* Stop watching a previously registered wallet address and release its resource updates.
|
|
2460
2511
|
* Unwatch Address
|
|
@@ -3449,6 +3500,24 @@ export const SubmitOrderOperationExchangeEnum = {
|
|
|
3449
3500
|
Router: 'router'
|
|
3450
3501
|
} as const;
|
|
3451
3502
|
export type SubmitOrderOperationExchangeEnum = typeof SubmitOrderOperationExchangeEnum[keyof typeof SubmitOrderOperationExchangeEnum];
|
|
3503
|
+
/**
|
|
3504
|
+
* @export
|
|
3505
|
+
*/
|
|
3506
|
+
export const TestDummyMethodOperationExchangeEnum = {
|
|
3507
|
+
Polymarket: 'polymarket',
|
|
3508
|
+
Kalshi: 'kalshi',
|
|
3509
|
+
KalshiDemo: 'kalshi-demo',
|
|
3510
|
+
Limitless: 'limitless',
|
|
3511
|
+
Probable: 'probable',
|
|
3512
|
+
Baozi: 'baozi',
|
|
3513
|
+
Myriad: 'myriad',
|
|
3514
|
+
Opinion: 'opinion',
|
|
3515
|
+
Metaculus: 'metaculus',
|
|
3516
|
+
Smarkets: 'smarkets',
|
|
3517
|
+
PolymarketUs: 'polymarket_us',
|
|
3518
|
+
Router: 'router'
|
|
3519
|
+
} as const;
|
|
3520
|
+
export type TestDummyMethodOperationExchangeEnum = typeof TestDummyMethodOperationExchangeEnum[keyof typeof TestDummyMethodOperationExchangeEnum];
|
|
3452
3521
|
/**
|
|
3453
3522
|
* @export
|
|
3454
3523
|
*/
|
|
@@ -75,6 +75,12 @@ export interface ExchangeCredentials {
|
|
|
75
75
|
* @memberof ExchangeCredentials
|
|
76
76
|
*/
|
|
77
77
|
walletAddress?: string;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof ExchangeCredentials
|
|
82
|
+
*/
|
|
83
|
+
baseUrl?: string;
|
|
78
84
|
}
|
|
79
85
|
|
|
80
86
|
/**
|
|
@@ -102,6 +108,7 @@ export function ExchangeCredentialsFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
102
108
|
'signatureType': json['signatureType'] == null ? undefined : ExchangeCredentialsSignatureTypeFromJSON(json['signatureType']),
|
|
103
109
|
'funderAddress': json['funderAddress'] == null ? undefined : json['funderAddress'],
|
|
104
110
|
'walletAddress': json['walletAddress'] == null ? undefined : json['walletAddress'],
|
|
111
|
+
'baseUrl': json['baseUrl'] == null ? undefined : json['baseUrl'],
|
|
105
112
|
};
|
|
106
113
|
}
|
|
107
114
|
|
|
@@ -124,6 +131,7 @@ export function ExchangeCredentialsToJSONTyped(value?: ExchangeCredentials | nul
|
|
|
124
131
|
'signatureType': ExchangeCredentialsSignatureTypeToJSON(value['signatureType']),
|
|
125
132
|
'funderAddress': value['funderAddress'],
|
|
126
133
|
'walletAddress': value['walletAddress'],
|
|
134
|
+
'baseUrl': value['baseUrl'],
|
|
127
135
|
};
|
|
128
136
|
}
|
|
129
137
|
|
|
@@ -0,0 +1,89 @@
|
|
|
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 { ErrorDetail } from './ErrorDetail';
|
|
17
|
+
import {
|
|
18
|
+
ErrorDetailFromJSON,
|
|
19
|
+
ErrorDetailFromJSONTyped,
|
|
20
|
+
ErrorDetailToJSON,
|
|
21
|
+
ErrorDetailToJSONTyped,
|
|
22
|
+
} from './ErrorDetail';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface TestDummyMethod200Response
|
|
28
|
+
*/
|
|
29
|
+
export interface TestDummyMethod200Response {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof TestDummyMethod200Response
|
|
34
|
+
*/
|
|
35
|
+
success?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {ErrorDetail}
|
|
39
|
+
* @memberof TestDummyMethod200Response
|
|
40
|
+
*/
|
|
41
|
+
error?: ErrorDetail;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof TestDummyMethod200Response
|
|
46
|
+
*/
|
|
47
|
+
data?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the TestDummyMethod200Response interface.
|
|
52
|
+
*/
|
|
53
|
+
export function instanceOfTestDummyMethod200Response(value: object): value is TestDummyMethod200Response {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function TestDummyMethod200ResponseFromJSON(json: any): TestDummyMethod200Response {
|
|
58
|
+
return TestDummyMethod200ResponseFromJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function TestDummyMethod200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TestDummyMethod200Response {
|
|
62
|
+
if (json == null) {
|
|
63
|
+
return json;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
|
|
67
|
+
'success': json['success'] == null ? undefined : json['success'],
|
|
68
|
+
'error': json['error'] == null ? undefined : ErrorDetailFromJSON(json['error']),
|
|
69
|
+
'data': json['data'] == null ? undefined : json['data'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function TestDummyMethod200ResponseToJSON(json: any): TestDummyMethod200Response {
|
|
74
|
+
return TestDummyMethod200ResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function TestDummyMethod200ResponseToJSONTyped(value?: TestDummyMethod200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'success': value['success'],
|
|
85
|
+
'error': ErrorDetailToJSON(value['error']),
|
|
86
|
+
'data': value['data'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|