pmxtjs 1.3.3 → 1.4.0
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 +41 -1
- package/dist/esm/generated/src/apis/DefaultApi.js +71 -1
- package/dist/esm/generated/src/models/ExecutionPriceResult.d.ts +44 -0
- package/dist/esm/generated/src/models/ExecutionPriceResult.js +45 -0
- package/dist/esm/generated/src/models/GetExecutionPrice200Response.d.ts +45 -0
- package/dist/esm/generated/src/models/GetExecutionPrice200Response.js +46 -0
- package/dist/esm/generated/src/models/GetExecutionPriceDetailed200Response.d.ts +46 -0
- package/dist/esm/generated/src/models/GetExecutionPriceDetailed200Response.js +47 -0
- package/dist/esm/generated/src/models/GetExecutionPriceRequest.d.ts +40 -0
- package/dist/esm/generated/src/models/GetExecutionPriceRequest.js +47 -0
- package/dist/esm/generated/src/models/GetExecutionPriceRequestArgsInner.d.ts +22 -0
- package/dist/esm/generated/src/models/GetExecutionPriceRequestArgsInner.js +56 -0
- package/dist/esm/generated/src/models/index.d.ts +5 -0
- package/dist/esm/generated/src/models/index.js +5 -0
- package/dist/esm/pmxt/client.d.ts +36 -2
- package/dist/esm/pmxt/client.js +134 -4
- package/dist/esm/pmxt/models.d.ts +42 -0
- package/dist/generated/src/apis/DefaultApi.d.ts +41 -1
- package/dist/generated/src/apis/DefaultApi.js +71 -1
- package/dist/generated/src/models/ExecutionPriceResult.d.ts +44 -0
- package/dist/generated/src/models/ExecutionPriceResult.js +52 -0
- package/dist/generated/src/models/GetExecutionPrice200Response.d.ts +45 -0
- package/dist/generated/src/models/GetExecutionPrice200Response.js +53 -0
- package/dist/generated/src/models/GetExecutionPriceDetailed200Response.d.ts +46 -0
- package/dist/generated/src/models/GetExecutionPriceDetailed200Response.js +54 -0
- package/dist/generated/src/models/GetExecutionPriceRequest.d.ts +40 -0
- package/dist/generated/src/models/GetExecutionPriceRequest.js +54 -0
- package/dist/generated/src/models/GetExecutionPriceRequestArgsInner.d.ts +22 -0
- package/dist/generated/src/models/GetExecutionPriceRequestArgsInner.js +62 -0
- package/dist/generated/src/models/index.d.ts +5 -0
- package/dist/generated/src/models/index.js +5 -0
- package/dist/pmxt/client.d.ts +36 -2
- package/dist/pmxt/client.js +134 -4
- package/dist/pmxt/models.d.ts +42 -0
- package/generated/.openapi-generator/FILES +10 -0
- package/generated/docs/DefaultApi.md +138 -0
- package/generated/docs/ExecutionPriceResult.md +38 -0
- package/generated/docs/GetExecutionPrice200Response.md +38 -0
- package/generated/docs/GetExecutionPriceDetailed200Response.md +38 -0
- package/generated/docs/GetExecutionPriceRequest.md +36 -0
- package/generated/docs/GetExecutionPriceRequestArgsInner.md +38 -0
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +115 -0
- package/generated/src/models/ExecutionPriceResult.ts +81 -0
- package/generated/src/models/GetExecutionPrice200Response.ts +89 -0
- package/generated/src/models/GetExecutionPriceDetailed200Response.ts +96 -0
- package/generated/src/models/GetExecutionPriceRequest.ts +89 -0
- package/generated/src/models/GetExecutionPriceRequestArgsInner.ts +75 -0
- package/generated/src/models/index.ts +5 -0
- package/package.json +2 -2
- package/pmxt/client.ts +156 -4
- package/pmxt/models.ts +54 -0
|
@@ -14,6 +14,8 @@ All URIs are relative to *http://localhost:3847*
|
|
|
14
14
|
| [**fetchOrderBook**](DefaultApi.md#fetchorderbookoperation) | **POST** /api/{exchange}/fetchOrderBook | Fetch Order Book |
|
|
15
15
|
| [**fetchPositions**](DefaultApi.md#fetchpositionsoperation) | **POST** /api/{exchange}/fetchPositions | Fetch Positions |
|
|
16
16
|
| [**fetchTrades**](DefaultApi.md#fetchtradesoperation) | **POST** /api/{exchange}/fetchTrades | Fetch Trades |
|
|
17
|
+
| [**getExecutionPrice**](DefaultApi.md#getexecutionpriceoperation) | **POST** /api/{exchange}/getExecutionPrice | Get Execution Price |
|
|
18
|
+
| [**getExecutionPriceDetailed**](DefaultApi.md#getexecutionpricedetailed) | **POST** /api/{exchange}/getExecutionPriceDetailed | Get Detailed Execution Price |
|
|
17
19
|
| [**getMarketsBySlug**](DefaultApi.md#getmarketsbyslugoperation) | **POST** /api/{exchange}/getMarketsBySlug | Get Market by Slug |
|
|
18
20
|
| [**healthCheck**](DefaultApi.md#healthcheck) | **GET** /health | Server Health Check |
|
|
19
21
|
| [**searchEvents**](DefaultApi.md#searcheventsoperation) | **POST** /api/{exchange}/searchEvents | Search Events |
|
|
@@ -703,6 +705,142 @@ No authorization required
|
|
|
703
705
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
704
706
|
|
|
705
707
|
|
|
708
|
+
## getExecutionPrice
|
|
709
|
+
|
|
710
|
+
> GetExecutionPrice200Response getExecutionPrice(exchange, getExecutionPriceRequest)
|
|
711
|
+
|
|
712
|
+
Get Execution Price
|
|
713
|
+
|
|
714
|
+
### Example
|
|
715
|
+
|
|
716
|
+
```ts
|
|
717
|
+
import {
|
|
718
|
+
Configuration,
|
|
719
|
+
DefaultApi,
|
|
720
|
+
} from 'pmxtjs';
|
|
721
|
+
import type { GetExecutionPriceOperationRequest } from 'pmxtjs';
|
|
722
|
+
|
|
723
|
+
async function example() {
|
|
724
|
+
console.log("🚀 Testing pmxtjs SDK...");
|
|
725
|
+
const api = new DefaultApi();
|
|
726
|
+
|
|
727
|
+
const body = {
|
|
728
|
+
// 'polymarket' | 'kalshi' | The prediction market exchange to target.
|
|
729
|
+
exchange: exchange_example,
|
|
730
|
+
// GetExecutionPriceRequest (optional)
|
|
731
|
+
getExecutionPriceRequest: ...,
|
|
732
|
+
} satisfies GetExecutionPriceOperationRequest;
|
|
733
|
+
|
|
734
|
+
try {
|
|
735
|
+
const data = await api.getExecutionPrice(body);
|
|
736
|
+
console.log(data);
|
|
737
|
+
} catch (error) {
|
|
738
|
+
console.error(error);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
// Run the test
|
|
743
|
+
example().catch(console.error);
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
### Parameters
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
| Name | Type | Description | Notes |
|
|
750
|
+
|------------- | ------------- | ------------- | -------------|
|
|
751
|
+
| **exchange** | `polymarket`, `kalshi` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: polymarket, kalshi] |
|
|
752
|
+
| **getExecutionPriceRequest** | [GetExecutionPriceRequest](GetExecutionPriceRequest.md) | | [Optional] |
|
|
753
|
+
|
|
754
|
+
### Return type
|
|
755
|
+
|
|
756
|
+
[**GetExecutionPrice200Response**](GetExecutionPrice200Response.md)
|
|
757
|
+
|
|
758
|
+
### Authorization
|
|
759
|
+
|
|
760
|
+
No authorization required
|
|
761
|
+
|
|
762
|
+
### HTTP request headers
|
|
763
|
+
|
|
764
|
+
- **Content-Type**: `application/json`
|
|
765
|
+
- **Accept**: `application/json`
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
### HTTP response details
|
|
769
|
+
| Status code | Description | Response headers |
|
|
770
|
+
|-------------|-------------|------------------|
|
|
771
|
+
| **200** | Average execution price | - |
|
|
772
|
+
|
|
773
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
## getExecutionPriceDetailed
|
|
777
|
+
|
|
778
|
+
> GetExecutionPriceDetailed200Response getExecutionPriceDetailed(exchange, getExecutionPriceRequest)
|
|
779
|
+
|
|
780
|
+
Get Detailed Execution Price
|
|
781
|
+
|
|
782
|
+
### Example
|
|
783
|
+
|
|
784
|
+
```ts
|
|
785
|
+
import {
|
|
786
|
+
Configuration,
|
|
787
|
+
DefaultApi,
|
|
788
|
+
} from 'pmxtjs';
|
|
789
|
+
import type { GetExecutionPriceDetailedRequest } from 'pmxtjs';
|
|
790
|
+
|
|
791
|
+
async function example() {
|
|
792
|
+
console.log("🚀 Testing pmxtjs SDK...");
|
|
793
|
+
const api = new DefaultApi();
|
|
794
|
+
|
|
795
|
+
const body = {
|
|
796
|
+
// 'polymarket' | 'kalshi' | The prediction market exchange to target.
|
|
797
|
+
exchange: exchange_example,
|
|
798
|
+
// GetExecutionPriceRequest (optional)
|
|
799
|
+
getExecutionPriceRequest: ...,
|
|
800
|
+
} satisfies GetExecutionPriceDetailedRequest;
|
|
801
|
+
|
|
802
|
+
try {
|
|
803
|
+
const data = await api.getExecutionPriceDetailed(body);
|
|
804
|
+
console.log(data);
|
|
805
|
+
} catch (error) {
|
|
806
|
+
console.error(error);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
// Run the test
|
|
811
|
+
example().catch(console.error);
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
### Parameters
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
| Name | Type | Description | Notes |
|
|
818
|
+
|------------- | ------------- | ------------- | -------------|
|
|
819
|
+
| **exchange** | `polymarket`, `kalshi` | The prediction market exchange to target. | [Defaults to `undefined`] [Enum: polymarket, kalshi] |
|
|
820
|
+
| **getExecutionPriceRequest** | [GetExecutionPriceRequest](GetExecutionPriceRequest.md) | | [Optional] |
|
|
821
|
+
|
|
822
|
+
### Return type
|
|
823
|
+
|
|
824
|
+
[**GetExecutionPriceDetailed200Response**](GetExecutionPriceDetailed200Response.md)
|
|
825
|
+
|
|
826
|
+
### Authorization
|
|
827
|
+
|
|
828
|
+
No authorization required
|
|
829
|
+
|
|
830
|
+
### HTTP request headers
|
|
831
|
+
|
|
832
|
+
- **Content-Type**: `application/json`
|
|
833
|
+
- **Accept**: `application/json`
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
### HTTP response details
|
|
837
|
+
| Status code | Description | Response headers |
|
|
838
|
+
|-------------|-------------|------------------|
|
|
839
|
+
| **200** | Detailed execution result | - |
|
|
840
|
+
|
|
841
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
842
|
+
|
|
843
|
+
|
|
706
844
|
## getMarketsBySlug
|
|
707
845
|
|
|
708
846
|
> FetchMarkets200Response getMarketsBySlug(exchange, getMarketsBySlugRequest)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# ExecutionPriceResult
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`price` | number
|
|
10
|
+
`filledAmount` | number
|
|
11
|
+
`fullyFilled` | boolean
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ExecutionPriceResult } from 'pmxtjs'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"price": null,
|
|
21
|
+
"filledAmount": null,
|
|
22
|
+
"fullyFilled": null,
|
|
23
|
+
} satisfies ExecutionPriceResult
|
|
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 ExecutionPriceResult
|
|
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,38 @@
|
|
|
1
|
+
|
|
2
|
+
# GetExecutionPrice200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`success` | boolean
|
|
10
|
+
`error` | [ErrorDetail](ErrorDetail.md)
|
|
11
|
+
`data` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { GetExecutionPrice200Response } 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 GetExecutionPrice200Response
|
|
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 GetExecutionPrice200Response
|
|
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,38 @@
|
|
|
1
|
+
|
|
2
|
+
# GetExecutionPriceDetailed200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`success` | boolean
|
|
10
|
+
`error` | [ErrorDetail](ErrorDetail.md)
|
|
11
|
+
`data` | [ExecutionPriceResult](ExecutionPriceResult.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { GetExecutionPriceDetailed200Response } 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 GetExecutionPriceDetailed200Response
|
|
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 GetExecutionPriceDetailed200Response
|
|
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
|
+
# GetExecutionPriceRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`args` | [Array<GetExecutionPriceRequestArgsInner>](GetExecutionPriceRequestArgsInner.md)
|
|
10
|
+
`credentials` | [ExchangeCredentials](ExchangeCredentials.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { GetExecutionPriceRequest } from 'pmxtjs'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"args": null,
|
|
20
|
+
"credentials": null,
|
|
21
|
+
} satisfies GetExecutionPriceRequest
|
|
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 GetExecutionPriceRequest
|
|
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
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# GetExecutionPriceRequestArgsInner
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`bids` | [Array<OrderLevel>](OrderLevel.md)
|
|
10
|
+
`asks` | [Array<OrderLevel>](OrderLevel.md)
|
|
11
|
+
`timestamp` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { GetExecutionPriceRequestArgsInner } from 'pmxtjs'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"bids": null,
|
|
21
|
+
"asks": null,
|
|
22
|
+
"timestamp": null,
|
|
23
|
+
} satisfies GetExecutionPriceRequestArgsInner
|
|
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 GetExecutionPriceRequestArgsInner
|
|
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
|
+
|
package/generated/package.json
CHANGED
|
@@ -31,6 +31,9 @@ import type {
|
|
|
31
31
|
FetchPositionsRequest,
|
|
32
32
|
FetchTrades200Response,
|
|
33
33
|
FetchTradesRequest,
|
|
34
|
+
GetExecutionPrice200Response,
|
|
35
|
+
GetExecutionPriceDetailed200Response,
|
|
36
|
+
GetExecutionPriceRequest,
|
|
34
37
|
GetMarketsBySlugRequest,
|
|
35
38
|
HealthCheck200Response,
|
|
36
39
|
SearchEvents200Response,
|
|
@@ -72,6 +75,12 @@ import {
|
|
|
72
75
|
FetchTrades200ResponseToJSON,
|
|
73
76
|
FetchTradesRequestFromJSON,
|
|
74
77
|
FetchTradesRequestToJSON,
|
|
78
|
+
GetExecutionPrice200ResponseFromJSON,
|
|
79
|
+
GetExecutionPrice200ResponseToJSON,
|
|
80
|
+
GetExecutionPriceDetailed200ResponseFromJSON,
|
|
81
|
+
GetExecutionPriceDetailed200ResponseToJSON,
|
|
82
|
+
GetExecutionPriceRequestFromJSON,
|
|
83
|
+
GetExecutionPriceRequestToJSON,
|
|
75
84
|
GetMarketsBySlugRequestFromJSON,
|
|
76
85
|
GetMarketsBySlugRequestToJSON,
|
|
77
86
|
HealthCheck200ResponseFromJSON,
|
|
@@ -138,6 +147,16 @@ export interface FetchTradesOperationRequest {
|
|
|
138
147
|
fetchTradesRequest?: FetchTradesRequest;
|
|
139
148
|
}
|
|
140
149
|
|
|
150
|
+
export interface GetExecutionPriceOperationRequest {
|
|
151
|
+
exchange: GetExecutionPriceOperationExchangeEnum;
|
|
152
|
+
getExecutionPriceRequest?: GetExecutionPriceRequest;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface GetExecutionPriceDetailedRequest {
|
|
156
|
+
exchange: GetExecutionPriceDetailedExchangeEnum;
|
|
157
|
+
getExecutionPriceRequest?: GetExecutionPriceRequest;
|
|
158
|
+
}
|
|
159
|
+
|
|
141
160
|
export interface GetMarketsBySlugOperationRequest {
|
|
142
161
|
exchange: GetMarketsBySlugOperationExchangeEnum;
|
|
143
162
|
getMarketsBySlugRequest?: GetMarketsBySlugRequest;
|
|
@@ -568,6 +587,86 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
568
587
|
return await response.value();
|
|
569
588
|
}
|
|
570
589
|
|
|
590
|
+
/**
|
|
591
|
+
* Get Execution Price
|
|
592
|
+
*/
|
|
593
|
+
async getExecutionPriceRaw(requestParameters: GetExecutionPriceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetExecutionPrice200Response>> {
|
|
594
|
+
if (requestParameters['exchange'] == null) {
|
|
595
|
+
throw new runtime.RequiredError(
|
|
596
|
+
'exchange',
|
|
597
|
+
'Required parameter "exchange" was null or undefined when calling getExecutionPrice().'
|
|
598
|
+
);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
const queryParameters: any = {};
|
|
602
|
+
|
|
603
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
604
|
+
|
|
605
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
let urlPath = `/api/{exchange}/getExecutionPrice`;
|
|
609
|
+
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
610
|
+
|
|
611
|
+
const response = await this.request({
|
|
612
|
+
path: urlPath,
|
|
613
|
+
method: 'POST',
|
|
614
|
+
headers: headerParameters,
|
|
615
|
+
query: queryParameters,
|
|
616
|
+
body: GetExecutionPriceRequestToJSON(requestParameters['getExecutionPriceRequest']),
|
|
617
|
+
}, initOverrides);
|
|
618
|
+
|
|
619
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetExecutionPrice200ResponseFromJSON(jsonValue));
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Get Execution Price
|
|
624
|
+
*/
|
|
625
|
+
async getExecutionPrice(requestParameters: GetExecutionPriceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetExecutionPrice200Response> {
|
|
626
|
+
const response = await this.getExecutionPriceRaw(requestParameters, initOverrides);
|
|
627
|
+
return await response.value();
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* Get Detailed Execution Price
|
|
632
|
+
*/
|
|
633
|
+
async getExecutionPriceDetailedRaw(requestParameters: GetExecutionPriceDetailedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetExecutionPriceDetailed200Response>> {
|
|
634
|
+
if (requestParameters['exchange'] == null) {
|
|
635
|
+
throw new runtime.RequiredError(
|
|
636
|
+
'exchange',
|
|
637
|
+
'Required parameter "exchange" was null or undefined when calling getExecutionPriceDetailed().'
|
|
638
|
+
);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
const queryParameters: any = {};
|
|
642
|
+
|
|
643
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
644
|
+
|
|
645
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
let urlPath = `/api/{exchange}/getExecutionPriceDetailed`;
|
|
649
|
+
urlPath = urlPath.replace(`{${"exchange"}}`, encodeURIComponent(String(requestParameters['exchange'])));
|
|
650
|
+
|
|
651
|
+
const response = await this.request({
|
|
652
|
+
path: urlPath,
|
|
653
|
+
method: 'POST',
|
|
654
|
+
headers: headerParameters,
|
|
655
|
+
query: queryParameters,
|
|
656
|
+
body: GetExecutionPriceRequestToJSON(requestParameters['getExecutionPriceRequest']),
|
|
657
|
+
}, initOverrides);
|
|
658
|
+
|
|
659
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetExecutionPriceDetailed200ResponseFromJSON(jsonValue));
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Get Detailed Execution Price
|
|
664
|
+
*/
|
|
665
|
+
async getExecutionPriceDetailed(requestParameters: GetExecutionPriceDetailedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetExecutionPriceDetailed200Response> {
|
|
666
|
+
const response = await this.getExecutionPriceDetailedRaw(requestParameters, initOverrides);
|
|
667
|
+
return await response.value();
|
|
668
|
+
}
|
|
669
|
+
|
|
571
670
|
/**
|
|
572
671
|
* Get Market by Slug
|
|
573
672
|
*/
|
|
@@ -887,6 +986,22 @@ export const FetchTradesOperationExchangeEnum = {
|
|
|
887
986
|
Kalshi: 'kalshi'
|
|
888
987
|
} as const;
|
|
889
988
|
export type FetchTradesOperationExchangeEnum = typeof FetchTradesOperationExchangeEnum[keyof typeof FetchTradesOperationExchangeEnum];
|
|
989
|
+
/**
|
|
990
|
+
* @export
|
|
991
|
+
*/
|
|
992
|
+
export const GetExecutionPriceOperationExchangeEnum = {
|
|
993
|
+
Polymarket: 'polymarket',
|
|
994
|
+
Kalshi: 'kalshi'
|
|
995
|
+
} as const;
|
|
996
|
+
export type GetExecutionPriceOperationExchangeEnum = typeof GetExecutionPriceOperationExchangeEnum[keyof typeof GetExecutionPriceOperationExchangeEnum];
|
|
997
|
+
/**
|
|
998
|
+
* @export
|
|
999
|
+
*/
|
|
1000
|
+
export const GetExecutionPriceDetailedExchangeEnum = {
|
|
1001
|
+
Polymarket: 'polymarket',
|
|
1002
|
+
Kalshi: 'kalshi'
|
|
1003
|
+
} as const;
|
|
1004
|
+
export type GetExecutionPriceDetailedExchangeEnum = typeof GetExecutionPriceDetailedExchangeEnum[keyof typeof GetExecutionPriceDetailedExchangeEnum];
|
|
890
1005
|
/**
|
|
891
1006
|
* @export
|
|
892
1007
|
*/
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ExecutionPriceResult
|
|
20
|
+
*/
|
|
21
|
+
export interface ExecutionPriceResult {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ExecutionPriceResult
|
|
26
|
+
*/
|
|
27
|
+
price?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ExecutionPriceResult
|
|
32
|
+
*/
|
|
33
|
+
filledAmount?: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @memberof ExecutionPriceResult
|
|
38
|
+
*/
|
|
39
|
+
fullyFilled?: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the ExecutionPriceResult interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfExecutionPriceResult(value: object): value is ExecutionPriceResult {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ExecutionPriceResultFromJSON(json: any): ExecutionPriceResult {
|
|
50
|
+
return ExecutionPriceResultFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function ExecutionPriceResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExecutionPriceResult {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'price': json['price'] == null ? undefined : json['price'],
|
|
60
|
+
'filledAmount': json['filledAmount'] == null ? undefined : json['filledAmount'],
|
|
61
|
+
'fullyFilled': json['fullyFilled'] == null ? undefined : json['fullyFilled'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ExecutionPriceResultToJSON(json: any): ExecutionPriceResult {
|
|
66
|
+
return ExecutionPriceResultToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ExecutionPriceResultToJSONTyped(value?: ExecutionPriceResult | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'price': value['price'],
|
|
77
|
+
'filledAmount': value['filledAmount'],
|
|
78
|
+
'fullyFilled': value['fullyFilled'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -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). 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 GetExecutionPrice200Response
|
|
28
|
+
*/
|
|
29
|
+
export interface GetExecutionPrice200Response {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof GetExecutionPrice200Response
|
|
34
|
+
*/
|
|
35
|
+
success?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {ErrorDetail}
|
|
39
|
+
* @memberof GetExecutionPrice200Response
|
|
40
|
+
*/
|
|
41
|
+
error?: ErrorDetail;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof GetExecutionPrice200Response
|
|
46
|
+
*/
|
|
47
|
+
data?: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the GetExecutionPrice200Response interface.
|
|
52
|
+
*/
|
|
53
|
+
export function instanceOfGetExecutionPrice200Response(value: object): value is GetExecutionPrice200Response {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function GetExecutionPrice200ResponseFromJSON(json: any): GetExecutionPrice200Response {
|
|
58
|
+
return GetExecutionPrice200ResponseFromJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function GetExecutionPrice200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetExecutionPrice200Response {
|
|
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 GetExecutionPrice200ResponseToJSON(json: any): GetExecutionPrice200Response {
|
|
74
|
+
return GetExecutionPrice200ResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function GetExecutionPrice200ResponseToJSONTyped(value?: GetExecutionPrice200Response | 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
|
+
|