pmxtjs 2.37.9 → 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 -91
- package/dist/esm/generated/src/apis/DefaultApi.js +48 -91
- 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/esm/pmxt/router.js +1 -1
- package/dist/generated/src/apis/DefaultApi.d.ts +33 -91
- package/dist/generated/src/apis/DefaultApi.js +48 -91
- 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/dist/pmxt/router.js +1 -1
- package/generated/.openapi-generator/FILES +4 -0
- package/generated/docs/DefaultApi.md +87 -18
- 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 -90
- 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
- package/pmxt/router.ts +1 -1
|
@@ -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);
|
package/dist/pmxt/router.js
CHANGED
|
@@ -154,7 +154,7 @@ class Router extends client_js_1.Exchange {
|
|
|
154
154
|
if (params.includePrices)
|
|
155
155
|
query.includePrices = true;
|
|
156
156
|
try {
|
|
157
|
-
const json = await this.sidecarReadRequest('
|
|
157
|
+
const json = await this.sidecarReadRequest('fetchMarketMatches', query, [query]);
|
|
158
158
|
const data = this.handleResponse(json);
|
|
159
159
|
if (!data)
|
|
160
160
|
return [];
|
|
@@ -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
|
|
@@ -280,7 +279,7 @@ async function example() {
|
|
|
280
279
|
const api = new DefaultApi();
|
|
281
280
|
|
|
282
281
|
const body = {
|
|
283
|
-
// '
|
|
282
|
+
// 'router' | The prediction market exchange to target.
|
|
284
283
|
exchange: exchange_example,
|
|
285
284
|
// CompareMarketPricesRequest (optional)
|
|
286
285
|
compareMarketPricesRequest: ...,
|
|
@@ -303,7 +302,7 @@ example().catch(console.error);
|
|
|
303
302
|
|
|
304
303
|
| Name | Type | Description | Notes |
|
|
305
304
|
|------------- | ------------- | ------------- | -------------|
|
|
306
|
-
| **exchange** | `
|
|
305
|
+
| **exchange** | `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: router] |
|
|
307
306
|
| **compareMarketPricesRequest** | [CompareMarketPricesRequest](CompareMarketPricesRequest.md) | | [Optional] |
|
|
308
307
|
|
|
309
308
|
### Return type
|
|
@@ -498,7 +497,7 @@ async function example() {
|
|
|
498
497
|
const api = new DefaultApi();
|
|
499
498
|
|
|
500
499
|
const body = {
|
|
501
|
-
// '
|
|
500
|
+
// 'router' | The prediction market exchange to target.
|
|
502
501
|
exchange: exchange_example,
|
|
503
502
|
// number (optional)
|
|
504
503
|
minSpread: 8.14,
|
|
@@ -527,7 +526,7 @@ example().catch(console.error);
|
|
|
527
526
|
|
|
528
527
|
| Name | Type | Description | Notes |
|
|
529
528
|
|------------- | ------------- | ------------- | -------------|
|
|
530
|
-
| **exchange** | `
|
|
529
|
+
| **exchange** | `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: router] |
|
|
531
530
|
| **minSpread** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
532
531
|
| **category** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
533
532
|
| **limit** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
@@ -827,7 +826,7 @@ async function example() {
|
|
|
827
826
|
const api = new DefaultApi();
|
|
828
827
|
|
|
829
828
|
const body = {
|
|
830
|
-
// '
|
|
829
|
+
// 'router' | The prediction market exchange to target.
|
|
831
830
|
exchange: exchange_example,
|
|
832
831
|
// string | Keyword search across matched event titles. (optional)
|
|
833
832
|
query: query_example,
|
|
@@ -866,7 +865,7 @@ example().catch(console.error);
|
|
|
866
865
|
|
|
867
866
|
| Name | Type | Description | Notes |
|
|
868
867
|
|------------- | ------------- | ------------- | -------------|
|
|
869
|
-
| **exchange** | `
|
|
868
|
+
| **exchange** | `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: router] |
|
|
870
869
|
| **query** | `string` | Keyword search across matched event titles. | [Optional] [Defaults to `undefined`] |
|
|
871
870
|
| **category** | `string` | Filter matches by category. | [Optional] [Defaults to `undefined`] |
|
|
872
871
|
| **event** | [](.md) | Pass a UnifiedEvent directly instead of eventId/slug. | [Optional] [Defaults to `undefined`] |
|
|
@@ -1095,7 +1094,7 @@ async function example() {
|
|
|
1095
1094
|
const api = new DefaultApi();
|
|
1096
1095
|
|
|
1097
1096
|
const body = {
|
|
1098
|
-
// '
|
|
1097
|
+
// 'router' | The prediction market exchange to target.
|
|
1099
1098
|
exchange: exchange_example,
|
|
1100
1099
|
// string | Keyword search across matched market titles. (optional)
|
|
1101
1100
|
query: query_example,
|
|
@@ -1140,7 +1139,7 @@ example().catch(console.error);
|
|
|
1140
1139
|
|
|
1141
1140
|
| Name | Type | Description | Notes |
|
|
1142
1141
|
|------------- | ------------- | ------------- | -------------|
|
|
1143
|
-
| **exchange** | `
|
|
1142
|
+
| **exchange** | `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: router] |
|
|
1144
1143
|
| **query** | `string` | Keyword search across matched market titles. | [Optional] [Defaults to `undefined`] |
|
|
1145
1144
|
| **category** | `string` | Filter matches by category. | [Optional] [Defaults to `undefined`] |
|
|
1146
1145
|
| **market** | [](.md) | Pass a UnifiedMarket directly instead of marketId/slug/url. | [Optional] [Defaults to `undefined`] |
|
|
@@ -1301,7 +1300,7 @@ async function example() {
|
|
|
1301
1300
|
const api = new DefaultApi();
|
|
1302
1301
|
|
|
1303
1302
|
const body = {
|
|
1304
|
-
// '
|
|
1303
|
+
// 'router' | The prediction market exchange to target.
|
|
1305
1304
|
exchange: exchange_example,
|
|
1306
1305
|
// string | Keyword search across matched market titles. (optional)
|
|
1307
1306
|
query: query_example,
|
|
@@ -1346,7 +1345,7 @@ example().catch(console.error);
|
|
|
1346
1345
|
|
|
1347
1346
|
| Name | Type | Description | Notes |
|
|
1348
1347
|
|------------- | ------------- | ------------- | -------------|
|
|
1349
|
-
| **exchange** | `
|
|
1348
|
+
| **exchange** | `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: router] |
|
|
1350
1349
|
| **query** | `string` | Keyword search across matched market titles. | [Optional] [Defaults to `undefined`] |
|
|
1351
1350
|
| **category** | `string` | Filter matches by category. | [Optional] [Defaults to `undefined`] |
|
|
1352
1351
|
| **market** | [](.md) | Pass a UnifiedMarket directly instead of marketId/slug/url. | [Optional] [Defaults to `undefined`] |
|
|
@@ -1581,7 +1580,7 @@ async function example() {
|
|
|
1581
1580
|
const api = new DefaultApi();
|
|
1582
1581
|
|
|
1583
1582
|
const body = {
|
|
1584
|
-
// '
|
|
1583
|
+
// 'router' | The prediction market exchange to target.
|
|
1585
1584
|
exchange: exchange_example,
|
|
1586
1585
|
// number (optional)
|
|
1587
1586
|
minDifference: 8.14,
|
|
@@ -1610,7 +1609,7 @@ example().catch(console.error);
|
|
|
1610
1609
|
|
|
1611
1610
|
| Name | Type | Description | Notes |
|
|
1612
1611
|
|------------- | ------------- | ------------- | -------------|
|
|
1613
|
-
| **exchange** | `
|
|
1612
|
+
| **exchange** | `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: router] |
|
|
1614
1613
|
| **minDifference** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
1615
1614
|
| **category** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
1616
1615
|
| **limit** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
@@ -1658,7 +1657,7 @@ async function example() {
|
|
|
1658
1657
|
const api = new DefaultApi();
|
|
1659
1658
|
|
|
1660
1659
|
const body = {
|
|
1661
|
-
// '
|
|
1660
|
+
// 'router' | The prediction market exchange to target.
|
|
1662
1661
|
exchange: exchange_example,
|
|
1663
1662
|
// number (optional)
|
|
1664
1663
|
minDifference: 8.14,
|
|
@@ -1687,7 +1686,7 @@ example().catch(console.error);
|
|
|
1687
1686
|
|
|
1688
1687
|
| Name | Type | Description | Notes |
|
|
1689
1688
|
|------------- | ------------- | ------------- | -------------|
|
|
1690
|
-
| **exchange** | `
|
|
1689
|
+
| **exchange** | `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: router] |
|
|
1691
1690
|
| **minDifference** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
1692
1691
|
| **category** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
1693
1692
|
| **limit** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
@@ -2185,7 +2184,7 @@ async function example() {
|
|
|
2185
2184
|
const api = new DefaultApi();
|
|
2186
2185
|
|
|
2187
2186
|
const body = {
|
|
2188
|
-
// '
|
|
2187
|
+
// 'router' | The prediction market exchange to target.
|
|
2189
2188
|
exchange: exchange_example,
|
|
2190
2189
|
// string | Keyword search across matched market titles. (optional)
|
|
2191
2190
|
query: query_example,
|
|
@@ -2230,7 +2229,7 @@ example().catch(console.error);
|
|
|
2230
2229
|
|
|
2231
2230
|
| Name | Type | Description | Notes |
|
|
2232
2231
|
|------------- | ------------- | ------------- | -------------|
|
|
2233
|
-
| **exchange** | `
|
|
2232
|
+
| **exchange** | `router` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: router] |
|
|
2234
2233
|
| **query** | `string` | Keyword search across matched market titles. | [Optional] [Defaults to `undefined`] |
|
|
2235
2234
|
| **category** | `string` | Filter matches by category. | [Optional] [Defaults to `undefined`] |
|
|
2236
2235
|
| **market** | [](.md) | Pass a UnifiedMarket directly instead of marketId/slug/url. | [Optional] [Defaults to `undefined`] |
|
|
@@ -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
|
|
@@ -2767,17 +2818,6 @@ export type CloseOperationExchangeEnum = typeof CloseOperationExchangeEnum[keyof
|
|
|
2767
2818
|
* @export
|
|
2768
2819
|
*/
|
|
2769
2820
|
export const CompareMarketPricesOperationExchangeEnum = {
|
|
2770
|
-
Polymarket: 'polymarket',
|
|
2771
|
-
Kalshi: 'kalshi',
|
|
2772
|
-
KalshiDemo: 'kalshi-demo',
|
|
2773
|
-
Limitless: 'limitless',
|
|
2774
|
-
Probable: 'probable',
|
|
2775
|
-
Baozi: 'baozi',
|
|
2776
|
-
Myriad: 'myriad',
|
|
2777
|
-
Opinion: 'opinion',
|
|
2778
|
-
Metaculus: 'metaculus',
|
|
2779
|
-
Smarkets: 'smarkets',
|
|
2780
|
-
PolymarketUs: 'polymarket_us',
|
|
2781
2821
|
Router: 'router'
|
|
2782
2822
|
} as const;
|
|
2783
2823
|
export type CompareMarketPricesOperationExchangeEnum = typeof CompareMarketPricesOperationExchangeEnum[keyof typeof CompareMarketPricesOperationExchangeEnum];
|
|
@@ -2821,17 +2861,6 @@ export type FetchAllOrdersExchangeEnum = typeof FetchAllOrdersExchangeEnum[keyof
|
|
|
2821
2861
|
* @export
|
|
2822
2862
|
*/
|
|
2823
2863
|
export const FetchArbitrageExchangeEnum = {
|
|
2824
|
-
Polymarket: 'polymarket',
|
|
2825
|
-
Kalshi: 'kalshi',
|
|
2826
|
-
KalshiDemo: 'kalshi-demo',
|
|
2827
|
-
Limitless: 'limitless',
|
|
2828
|
-
Probable: 'probable',
|
|
2829
|
-
Baozi: 'baozi',
|
|
2830
|
-
Myriad: 'myriad',
|
|
2831
|
-
Opinion: 'opinion',
|
|
2832
|
-
Metaculus: 'metaculus',
|
|
2833
|
-
Smarkets: 'smarkets',
|
|
2834
|
-
PolymarketUs: 'polymarket_us',
|
|
2835
2864
|
Router: 'router'
|
|
2836
2865
|
} as const;
|
|
2837
2866
|
export type FetchArbitrageExchangeEnum = typeof FetchArbitrageExchangeEnum[keyof typeof FetchArbitrageExchangeEnum];
|
|
@@ -2932,17 +2961,6 @@ export type FetchEventSearchInEnum = typeof FetchEventSearchInEnum[keyof typeof
|
|
|
2932
2961
|
* @export
|
|
2933
2962
|
*/
|
|
2934
2963
|
export const FetchEventMatchesExchangeEnum = {
|
|
2935
|
-
Polymarket: 'polymarket',
|
|
2936
|
-
Kalshi: 'kalshi',
|
|
2937
|
-
KalshiDemo: 'kalshi-demo',
|
|
2938
|
-
Limitless: 'limitless',
|
|
2939
|
-
Probable: 'probable',
|
|
2940
|
-
Baozi: 'baozi',
|
|
2941
|
-
Myriad: 'myriad',
|
|
2942
|
-
Opinion: 'opinion',
|
|
2943
|
-
Metaculus: 'metaculus',
|
|
2944
|
-
Smarkets: 'smarkets',
|
|
2945
|
-
PolymarketUs: 'polymarket_us',
|
|
2946
2964
|
Router: 'router'
|
|
2947
2965
|
} as const;
|
|
2948
2966
|
export type FetchEventMatchesExchangeEnum = typeof FetchEventMatchesExchangeEnum[keyof typeof FetchEventMatchesExchangeEnum];
|
|
@@ -3025,17 +3043,6 @@ export type FetchEventsPaginatedExchangeEnum = typeof FetchEventsPaginatedExchan
|
|
|
3025
3043
|
* @export
|
|
3026
3044
|
*/
|
|
3027
3045
|
export const FetchHedgesExchangeEnum = {
|
|
3028
|
-
Polymarket: 'polymarket',
|
|
3029
|
-
Kalshi: 'kalshi',
|
|
3030
|
-
KalshiDemo: 'kalshi-demo',
|
|
3031
|
-
Limitless: 'limitless',
|
|
3032
|
-
Probable: 'probable',
|
|
3033
|
-
Baozi: 'baozi',
|
|
3034
|
-
Myriad: 'myriad',
|
|
3035
|
-
Opinion: 'opinion',
|
|
3036
|
-
Metaculus: 'metaculus',
|
|
3037
|
-
Smarkets: 'smarkets',
|
|
3038
|
-
PolymarketUs: 'polymarket_us',
|
|
3039
3046
|
Router: 'router'
|
|
3040
3047
|
} as const;
|
|
3041
3048
|
export type FetchHedgesExchangeEnum = typeof FetchHedgesExchangeEnum[keyof typeof FetchHedgesExchangeEnum];
|
|
@@ -3109,17 +3116,6 @@ export type FetchMarketSearchInEnum = typeof FetchMarketSearchInEnum[keyof typeo
|
|
|
3109
3116
|
* @export
|
|
3110
3117
|
*/
|
|
3111
3118
|
export const FetchMarketMatchesExchangeEnum = {
|
|
3112
|
-
Polymarket: 'polymarket',
|
|
3113
|
-
Kalshi: 'kalshi',
|
|
3114
|
-
KalshiDemo: 'kalshi-demo',
|
|
3115
|
-
Limitless: 'limitless',
|
|
3116
|
-
Probable: 'probable',
|
|
3117
|
-
Baozi: 'baozi',
|
|
3118
|
-
Myriad: 'myriad',
|
|
3119
|
-
Opinion: 'opinion',
|
|
3120
|
-
Metaculus: 'metaculus',
|
|
3121
|
-
Smarkets: 'smarkets',
|
|
3122
|
-
PolymarketUs: 'polymarket_us',
|
|
3123
3119
|
Router: 'router'
|
|
3124
3120
|
} as const;
|
|
3125
3121
|
export type FetchMarketMatchesExchangeEnum = typeof FetchMarketMatchesExchangeEnum[keyof typeof FetchMarketMatchesExchangeEnum];
|
|
@@ -3211,17 +3207,6 @@ export type FetchMarketsPaginatedExchangeEnum = typeof FetchMarketsPaginatedExch
|
|
|
3211
3207
|
* @export
|
|
3212
3208
|
*/
|
|
3213
3209
|
export const FetchMatchedMarketsExchangeEnum = {
|
|
3214
|
-
Polymarket: 'polymarket',
|
|
3215
|
-
Kalshi: 'kalshi',
|
|
3216
|
-
KalshiDemo: 'kalshi-demo',
|
|
3217
|
-
Limitless: 'limitless',
|
|
3218
|
-
Probable: 'probable',
|
|
3219
|
-
Baozi: 'baozi',
|
|
3220
|
-
Myriad: 'myriad',
|
|
3221
|
-
Opinion: 'opinion',
|
|
3222
|
-
Metaculus: 'metaculus',
|
|
3223
|
-
Smarkets: 'smarkets',
|
|
3224
|
-
PolymarketUs: 'polymarket_us',
|
|
3225
3210
|
Router: 'router'
|
|
3226
3211
|
} as const;
|
|
3227
3212
|
export type FetchMatchedMarketsExchangeEnum = typeof FetchMatchedMarketsExchangeEnum[keyof typeof FetchMatchedMarketsExchangeEnum];
|
|
@@ -3240,17 +3225,6 @@ export type FetchMatchedMarketsRelationsEnum = typeof FetchMatchedMarketsRelatio
|
|
|
3240
3225
|
* @export
|
|
3241
3226
|
*/
|
|
3242
3227
|
export const FetchMatchedPricesExchangeEnum = {
|
|
3243
|
-
Polymarket: 'polymarket',
|
|
3244
|
-
Kalshi: 'kalshi',
|
|
3245
|
-
KalshiDemo: 'kalshi-demo',
|
|
3246
|
-
Limitless: 'limitless',
|
|
3247
|
-
Probable: 'probable',
|
|
3248
|
-
Baozi: 'baozi',
|
|
3249
|
-
Myriad: 'myriad',
|
|
3250
|
-
Opinion: 'opinion',
|
|
3251
|
-
Metaculus: 'metaculus',
|
|
3252
|
-
Smarkets: 'smarkets',
|
|
3253
|
-
PolymarketUs: 'polymarket_us',
|
|
3254
3228
|
Router: 'router'
|
|
3255
3229
|
} as const;
|
|
3256
3230
|
export type FetchMatchedPricesExchangeEnum = typeof FetchMatchedPricesExchangeEnum[keyof typeof FetchMatchedPricesExchangeEnum];
|
|
@@ -3377,17 +3351,6 @@ export type FetchPositionsExchangeEnum = typeof FetchPositionsExchangeEnum[keyof
|
|
|
3377
3351
|
* @export
|
|
3378
3352
|
*/
|
|
3379
3353
|
export const FetchRelatedMarketsExchangeEnum = {
|
|
3380
|
-
Polymarket: 'polymarket',
|
|
3381
|
-
Kalshi: 'kalshi',
|
|
3382
|
-
KalshiDemo: 'kalshi-demo',
|
|
3383
|
-
Limitless: 'limitless',
|
|
3384
|
-
Probable: 'probable',
|
|
3385
|
-
Baozi: 'baozi',
|
|
3386
|
-
Myriad: 'myriad',
|
|
3387
|
-
Opinion: 'opinion',
|
|
3388
|
-
Metaculus: 'metaculus',
|
|
3389
|
-
Smarkets: 'smarkets',
|
|
3390
|
-
PolymarketUs: 'polymarket_us',
|
|
3391
3354
|
Router: 'router'
|
|
3392
3355
|
} as const;
|
|
3393
3356
|
export type FetchRelatedMarketsExchangeEnum = typeof FetchRelatedMarketsExchangeEnum[keyof typeof FetchRelatedMarketsExchangeEnum];
|
|
@@ -3537,6 +3500,24 @@ export const SubmitOrderOperationExchangeEnum = {
|
|
|
3537
3500
|
Router: 'router'
|
|
3538
3501
|
} as const;
|
|
3539
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];
|
|
3540
3521
|
/**
|
|
3541
3522
|
* @export
|
|
3542
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
|
|