kalshi-typescript 2.1.1 → 2.1.2
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/.openapi-generator/FILES +4 -1
- package/.openapi-generator-ignore +9 -2
- package/README.md +200 -29
- package/api/exchange-api.ts +4 -4
- package/api/markets-api.ts +4 -4
- package/api/portfolio-api.ts +75 -1
- package/auth.ts +38 -0
- package/base.ts +51 -17
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api/api-keys-api.d.ts +4 -4
- package/dist/api/communications-api.d.ts +11 -11
- package/dist/api/events-api.d.ts +3 -3
- package/dist/api/exchange-api.d.ts +8 -8
- package/dist/api/exchange-api.js +4 -4
- package/dist/api/markets-api.d.ts +9 -9
- package/dist/api/markets-api.js +4 -4
- package/dist/api/milestones-api.d.ts +2 -2
- package/dist/api/multivariate-collections-api.d.ts +3 -3
- package/dist/api/portfolio-api.d.ts +52 -19
- package/dist/api/portfolio-api.js +69 -1
- package/dist/api/series-api.d.ts +2 -2
- package/dist/api/structured-targets-api.d.ts +2 -2
- package/dist/auth.d.ts +7 -0
- package/dist/auth.js +33 -0
- package/dist/base.d.ts +25 -10
- package/dist/base.js +37 -6
- package/dist/esm/api/api-keys-api.d.ts +4 -4
- package/dist/esm/api/communications-api.d.ts +11 -11
- package/dist/esm/api/events-api.d.ts +3 -3
- package/dist/esm/api/exchange-api.d.ts +8 -8
- package/dist/esm/api/exchange-api.js +4 -4
- package/dist/esm/api/markets-api.d.ts +9 -9
- package/dist/esm/api/markets-api.js +4 -4
- package/dist/esm/api/milestones-api.d.ts +2 -2
- package/dist/esm/api/multivariate-collections-api.d.ts +3 -3
- package/dist/esm/api/portfolio-api.d.ts +52 -19
- package/dist/esm/api/portfolio-api.js +69 -1
- package/dist/esm/api/series-api.d.ts +2 -2
- package/dist/esm/api/structured-targets-api.d.ts +2 -2
- package/dist/esm/auth.d.ts +7 -0
- package/dist/esm/auth.js +29 -0
- package/dist/esm/base.d.ts +25 -10
- package/dist/esm/base.js +36 -5
- package/dist/esm/models/amend-order-request.d.ts +30 -0
- package/dist/esm/models/amend-order-request.js +8 -1
- package/dist/esm/models/create-order-group-request.d.ts +4 -1
- package/dist/esm/models/create-order-group-response.d.ts +4 -2
- package/dist/esm/models/create-order-request.d.ts +8 -0
- package/dist/esm/models/error-response-error.d.ts +1 -1
- package/dist/esm/models/event-position.d.ts +53 -0
- package/dist/esm/models/event-position.js +14 -0
- package/dist/esm/models/get-order-group-response.d.ts +21 -0
- package/dist/esm/models/get-order-group-response.js +14 -0
- package/dist/esm/models/get-order-response.d.ts +1 -1
- package/dist/esm/models/get-positions-response.d.ts +3 -1
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/esm/models/order-group.d.ts +8 -4
- package/dist/esm/models/order.d.ts +16 -0
- package/dist/models/amend-order-request.d.ts +30 -0
- package/dist/models/amend-order-request.js +9 -0
- package/dist/models/create-order-group-request.d.ts +4 -1
- package/dist/models/create-order-group-response.d.ts +4 -2
- package/dist/models/create-order-request.d.ts +8 -0
- package/dist/models/error-response-error.d.ts +1 -1
- package/dist/models/event-position.d.ts +53 -0
- package/dist/models/event-position.js +15 -0
- package/dist/models/get-order-group-response.d.ts +21 -0
- package/dist/models/get-order-group-response.js +15 -0
- package/dist/models/get-order-response.d.ts +1 -1
- package/dist/models/get-positions-response.d.ts +3 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/order-group.d.ts +8 -4
- package/dist/models/order.d.ts +16 -0
- package/docs/AcceptQuoteRequest.md +1 -1
- package/docs/AmendOrderRequest.md +11 -1
- package/docs/AmendOrderResponse.md +1 -1
- package/docs/Announcement.md +1 -1
- package/docs/ApiKey.md +1 -1
- package/docs/ApiKeysApi.md +20 -8
- package/docs/BatchCancelOrdersRequest.md +1 -1
- package/docs/BatchCancelOrdersResponse.md +1 -1
- package/docs/BatchCancelOrdersResponseResponsesInner.md +1 -1
- package/docs/BatchCreateOrdersRequest.md +1 -1
- package/docs/BatchCreateOrdersResponse.md +1 -1
- package/docs/BatchCreateOrdersResponseResponsesInner.md +1 -1
- package/docs/CancelOrderResponse.md +1 -1
- package/docs/Candlestick.md +1 -1
- package/docs/CommunicationsApi.md +55 -22
- package/docs/CreateApiKeyRequest.md +1 -1
- package/docs/CreateApiKeyResponse.md +1 -1
- package/docs/CreateOrderGroupRequest.md +3 -3
- package/docs/CreateOrderGroupResponse.md +3 -3
- package/docs/CreateOrderRequest.md +5 -1
- package/docs/CreateOrderResponse.md +1 -1
- package/docs/CreateQuoteRequest.md +1 -1
- package/docs/CreateQuoteResponse.md +1 -1
- package/docs/CreateRFQRequest.md +1 -1
- package/docs/CreateRFQResponse.md +1 -1
- package/docs/DailySchedule.md +1 -1
- package/docs/DecreaseOrderRequest.md +1 -1
- package/docs/DecreaseOrderResponse.md +1 -1
- package/docs/ErrorResponse.md +1 -1
- package/docs/ErrorResponseError.md +2 -2
- package/docs/Event.md +1 -1
- package/docs/EventPosition.md +38 -0
- package/docs/EventsApi.md +15 -6
- package/docs/ExchangeApi.md +21 -9
- package/docs/ExchangeStatus.md +1 -1
- package/docs/Fill.md +1 -1
- package/docs/GenerateApiKeyRequest.md +1 -1
- package/docs/GenerateApiKeyResponse.md +1 -1
- package/docs/GetApiKeysResponse.md +1 -1
- package/docs/GetBalanceResponse.md +1 -1
- package/docs/GetCommunicationsIDResponse.md +1 -1
- package/docs/GetEventMetadataResponse.md +1 -1
- package/docs/GetEventResponse.md +1 -1
- package/docs/GetEventsResponse.md +1 -1
- package/docs/GetExchangeAnnouncementsResponse.md +1 -1
- package/docs/GetExchangeScheduleResponse.md +1 -1
- package/docs/GetExchangeScheduleResponseSchedule.md +1 -1
- package/docs/GetFillsResponse.md +1 -1
- package/docs/GetMarketCandlesticksResponse.md +1 -1
- package/docs/GetMarketOrderbookResponse.md +1 -1
- package/docs/GetMarketOrderbookResponseOrderbook.md +1 -1
- package/docs/GetMarketResponse.md +1 -1
- package/docs/GetMarketsResponse.md +1 -1
- package/docs/GetMilestoneResponse.md +1 -1
- package/docs/GetMilestonesResponse.md +1 -1
- package/docs/GetMultivariateEventCollectionResponse.md +1 -1
- package/docs/GetMultivariateEventCollectionsResponse.md +1 -1
- package/docs/GetOrderGroupResponse.md +22 -0
- package/docs/GetOrderGroupsResponse.md +1 -1
- package/docs/GetOrderQueuePositionResponse.md +1 -1
- package/docs/GetOrderResponse.md +2 -2
- package/docs/GetOrdersResponse.md +1 -1
- package/docs/GetPositionsResponse.md +5 -3
- package/docs/GetQueuePositionsRequest.md +1 -1
- package/docs/GetQueuePositionsResponse.md +1 -1
- package/docs/GetQuoteResponse.md +1 -1
- package/docs/GetQuotesResponse.md +1 -1
- package/docs/GetRFQResponse.md +1 -1
- package/docs/GetRFQsResponse.md +1 -1
- package/docs/GetSeriesByTickerResponse.md +1 -1
- package/docs/GetSeriesResponse.md +1 -1
- package/docs/GetSettlementsResponse.md +1 -1
- package/docs/GetStructuredTargetResponse.md +1 -1
- package/docs/GetStructuredTargetsResponse.md +1 -1
- package/docs/GetTotalRestingOrderValueResponse.md +1 -1
- package/docs/GetTradesResponse.md +1 -1
- package/docs/GetUserDataTimestampResponse.md +1 -1
- package/docs/LookupBundleRequest.md +1 -1
- package/docs/LookupBundleRequestBundleInner.md +1 -1
- package/docs/LookupBundleResponse.md +1 -1
- package/docs/Market.md +1 -1
- package/docs/MarketsApi.md +26 -11
- package/docs/Milestone.md +1 -1
- package/docs/MilestonesApi.md +10 -4
- package/docs/MultivariateCollectionsApi.md +15 -6
- package/docs/MultivariateEventCollection.md +1 -1
- package/docs/MultivariateEventCollectionEventsInner.md +1 -1
- package/docs/Order.md +9 -1
- package/docs/OrderGroup.md +5 -9
- package/docs/OrderbookLevel.md +1 -1
- package/docs/PortfolioApi.md +154 -39
- package/docs/Position.md +1 -1
- package/docs/Quote.md +1 -1
- package/docs/RFQ.md +1 -1
- package/docs/Series.md +1 -1
- package/docs/SeriesApi.md +10 -4
- package/docs/Settlement.md +1 -1
- package/docs/StructuredTarget.md +1 -1
- package/docs/StructuredTargetsApi.md +10 -4
- package/docs/Trade.md +1 -1
- package/models/amend-order-request.ts +34 -0
- package/models/create-order-group-request.ts +4 -1
- package/models/create-order-group-response.ts +4 -4
- package/models/create-order-request.ts +8 -0
- package/models/error-response-error.ts +1 -1
- package/models/event-position.ts +59 -0
- package/models/get-order-group-response.ts +27 -0
- package/models/get-order-response.ts +1 -1
- package/models/get-positions-response.ts +5 -1
- package/models/index.ts +2 -0
- package/models/order-group.ts +8 -4
- package/models/order.ts +16 -0
- package/package.json +4 -4
package/docs/PortfolioApi.md
CHANGED
|
@@ -15,6 +15,7 @@ All URIs are relative to *https://api.elections.kalshi.com/trade-api/v2*
|
|
|
15
15
|
|[**getBalance**](#getbalance) | **GET** /portfolio/balance | Get Balance|
|
|
16
16
|
|[**getFills**](#getfills) | **GET** /portfolio/fills | Get Fills|
|
|
17
17
|
|[**getOrder**](#getorder) | **GET** /portfolio/orders/{order_id} | Get Order|
|
|
18
|
+
|[**getOrderGroup**](#getordergroup) | **GET** /portfolio/order_groups/{order_group_id} | Get Order Group|
|
|
18
19
|
|[**getOrderGroups**](#getordergroups) | **GET** /portfolio/order_groups | Get Order Groups|
|
|
19
20
|
|[**getOrderQueuePosition**](#getorderqueueposition) | **GET** /portfolio/orders/{order_id}/queue_position | Get Order Queue Position|
|
|
20
21
|
|[**getOrders**](#getorders) | **GET** /portfolio/orders | Get Orders|
|
|
@@ -22,7 +23,7 @@ All URIs are relative to *https://api.elections.kalshi.com/trade-api/v2*
|
|
|
22
23
|
|[**getQueuePositions**](#getqueuepositions) | **POST** /portfolio/orders/queue_positions | Get Queue Positions|
|
|
23
24
|
|[**getSettlements**](#getsettlements) | **GET** /portfolio/settlements | Get Settlements|
|
|
24
25
|
|[**getTotalRestingOrderValue**](#gettotalrestingordervalue) | **GET** /portfolio/summary/total_resting_order_value | Get Total Resting Order Value|
|
|
25
|
-
|[**resetOrderGroup**](#resetordergroup) | **
|
|
26
|
+
|[**resetOrderGroup**](#resetordergroup) | **PUT** /portfolio/order_groups/{order_group_id}/reset | Reset Order Group|
|
|
26
27
|
|
|
27
28
|
# **amendOrder**
|
|
28
29
|
> AmendOrderResponse amendOrder(amendOrderRequest)
|
|
@@ -36,9 +37,12 @@ import {
|
|
|
36
37
|
PortfolioApi,
|
|
37
38
|
Configuration,
|
|
38
39
|
AmendOrderRequest
|
|
39
|
-
} from '
|
|
40
|
+
} from 'kalshi-typescript';
|
|
40
41
|
|
|
41
|
-
const configuration = new Configuration(
|
|
42
|
+
const configuration = new Configuration({
|
|
43
|
+
apiKey: 'your-api-key-id',
|
|
44
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
45
|
+
});
|
|
42
46
|
const apiInstance = new PortfolioApi(configuration);
|
|
43
47
|
|
|
44
48
|
let orderId: string; //Order ID (default to undefined)
|
|
@@ -95,9 +99,12 @@ import {
|
|
|
95
99
|
PortfolioApi,
|
|
96
100
|
Configuration,
|
|
97
101
|
BatchCancelOrdersRequest
|
|
98
|
-
} from '
|
|
102
|
+
} from 'kalshi-typescript';
|
|
99
103
|
|
|
100
|
-
const configuration = new Configuration(
|
|
104
|
+
const configuration = new Configuration({
|
|
105
|
+
apiKey: 'your-api-key-id',
|
|
106
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
107
|
+
});
|
|
101
108
|
const apiInstance = new PortfolioApi(configuration);
|
|
102
109
|
|
|
103
110
|
let batchCancelOrdersRequest: BatchCancelOrdersRequest; //
|
|
@@ -150,9 +157,12 @@ import {
|
|
|
150
157
|
PortfolioApi,
|
|
151
158
|
Configuration,
|
|
152
159
|
BatchCreateOrdersRequest
|
|
153
|
-
} from '
|
|
160
|
+
} from 'kalshi-typescript';
|
|
154
161
|
|
|
155
|
-
const configuration = new Configuration(
|
|
162
|
+
const configuration = new Configuration({
|
|
163
|
+
apiKey: 'your-api-key-id',
|
|
164
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
165
|
+
});
|
|
156
166
|
const apiInstance = new PortfolioApi(configuration);
|
|
157
167
|
|
|
158
168
|
let batchCreateOrdersRequest: BatchCreateOrdersRequest; //
|
|
@@ -204,9 +214,12 @@ Cancel an order
|
|
|
204
214
|
import {
|
|
205
215
|
PortfolioApi,
|
|
206
216
|
Configuration
|
|
207
|
-
} from '
|
|
217
|
+
} from 'kalshi-typescript';
|
|
208
218
|
|
|
209
|
-
const configuration = new Configuration(
|
|
219
|
+
const configuration = new Configuration({
|
|
220
|
+
apiKey: 'your-api-key-id',
|
|
221
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
222
|
+
});
|
|
210
223
|
const apiInstance = new PortfolioApi(configuration);
|
|
211
224
|
|
|
212
225
|
let orderId: string; //Order ID (default to undefined)
|
|
@@ -259,9 +272,12 @@ import {
|
|
|
259
272
|
PortfolioApi,
|
|
260
273
|
Configuration,
|
|
261
274
|
CreateOrderRequest
|
|
262
|
-
} from '
|
|
275
|
+
} from 'kalshi-typescript';
|
|
263
276
|
|
|
264
|
-
const configuration = new Configuration(
|
|
277
|
+
const configuration = new Configuration({
|
|
278
|
+
apiKey: 'your-api-key-id',
|
|
279
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
280
|
+
});
|
|
265
281
|
const apiInstance = new PortfolioApi(configuration);
|
|
266
282
|
|
|
267
283
|
let createOrderRequest: CreateOrderRequest; //
|
|
@@ -315,9 +331,12 @@ import {
|
|
|
315
331
|
PortfolioApi,
|
|
316
332
|
Configuration,
|
|
317
333
|
CreateOrderGroupRequest
|
|
318
|
-
} from '
|
|
334
|
+
} from 'kalshi-typescript';
|
|
319
335
|
|
|
320
|
-
const configuration = new Configuration(
|
|
336
|
+
const configuration = new Configuration({
|
|
337
|
+
apiKey: 'your-api-key-id',
|
|
338
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
339
|
+
});
|
|
321
340
|
const apiInstance = new PortfolioApi(configuration);
|
|
322
341
|
|
|
323
342
|
let createOrderGroupRequest: CreateOrderGroupRequest; //
|
|
@@ -370,9 +389,12 @@ import {
|
|
|
370
389
|
PortfolioApi,
|
|
371
390
|
Configuration,
|
|
372
391
|
DecreaseOrderRequest
|
|
373
|
-
} from '
|
|
392
|
+
} from 'kalshi-typescript';
|
|
374
393
|
|
|
375
|
-
const configuration = new Configuration(
|
|
394
|
+
const configuration = new Configuration({
|
|
395
|
+
apiKey: 'your-api-key-id',
|
|
396
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
397
|
+
});
|
|
376
398
|
const apiInstance = new PortfolioApi(configuration);
|
|
377
399
|
|
|
378
400
|
let orderId: string; //Order ID (default to undefined)
|
|
@@ -428,9 +450,12 @@ Delete an order group
|
|
|
428
450
|
import {
|
|
429
451
|
PortfolioApi,
|
|
430
452
|
Configuration
|
|
431
|
-
} from '
|
|
453
|
+
} from 'kalshi-typescript';
|
|
432
454
|
|
|
433
|
-
const configuration = new Configuration(
|
|
455
|
+
const configuration = new Configuration({
|
|
456
|
+
apiKey: 'your-api-key-id',
|
|
457
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
458
|
+
});
|
|
434
459
|
const apiInstance = new PortfolioApi(configuration);
|
|
435
460
|
|
|
436
461
|
let orderGroupId: string; //Order group ID (default to undefined)
|
|
@@ -482,9 +507,12 @@ Get the user\'s current balance
|
|
|
482
507
|
import {
|
|
483
508
|
PortfolioApi,
|
|
484
509
|
Configuration
|
|
485
|
-
} from '
|
|
510
|
+
} from 'kalshi-typescript';
|
|
486
511
|
|
|
487
|
-
const configuration = new Configuration(
|
|
512
|
+
const configuration = new Configuration({
|
|
513
|
+
apiKey: 'your-api-key-id',
|
|
514
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
515
|
+
});
|
|
488
516
|
const apiInstance = new PortfolioApi(configuration);
|
|
489
517
|
|
|
490
518
|
const { status, data } = await apiInstance.getBalance();
|
|
@@ -528,9 +556,12 @@ Get fills for the logged-in user. A fill represents a partial or complete execu
|
|
|
528
556
|
import {
|
|
529
557
|
PortfolioApi,
|
|
530
558
|
Configuration
|
|
531
|
-
} from '
|
|
559
|
+
} from 'kalshi-typescript';
|
|
532
560
|
|
|
533
|
-
const configuration = new Configuration(
|
|
561
|
+
const configuration = new Configuration({
|
|
562
|
+
apiKey: 'your-api-key-id',
|
|
563
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
564
|
+
});
|
|
534
565
|
const apiInstance = new PortfolioApi(configuration);
|
|
535
566
|
|
|
536
567
|
let ticker: string; //Filter by market ticker (optional) (default to undefined)
|
|
@@ -597,9 +628,12 @@ Get a single order by ID
|
|
|
597
628
|
import {
|
|
598
629
|
PortfolioApi,
|
|
599
630
|
Configuration
|
|
600
|
-
} from '
|
|
631
|
+
} from 'kalshi-typescript';
|
|
601
632
|
|
|
602
|
-
const configuration = new Configuration(
|
|
633
|
+
const configuration = new Configuration({
|
|
634
|
+
apiKey: 'your-api-key-id',
|
|
635
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
636
|
+
});
|
|
603
637
|
const apiInstance = new PortfolioApi(configuration);
|
|
604
638
|
|
|
605
639
|
let orderId: string; //Order ID (default to undefined)
|
|
@@ -640,6 +674,63 @@ const { status, data } = await apiInstance.getOrder(
|
|
|
640
674
|
|
|
641
675
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
642
676
|
|
|
677
|
+
# **getOrderGroup**
|
|
678
|
+
> GetOrderGroupResponse getOrderGroup()
|
|
679
|
+
|
|
680
|
+
Get details of a specific order group
|
|
681
|
+
|
|
682
|
+
### Example
|
|
683
|
+
|
|
684
|
+
```typescript
|
|
685
|
+
import {
|
|
686
|
+
PortfolioApi,
|
|
687
|
+
Configuration
|
|
688
|
+
} from 'kalshi-typescript';
|
|
689
|
+
|
|
690
|
+
const configuration = new Configuration({
|
|
691
|
+
apiKey: 'your-api-key-id',
|
|
692
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
693
|
+
});
|
|
694
|
+
const apiInstance = new PortfolioApi(configuration);
|
|
695
|
+
|
|
696
|
+
let orderGroupId: string; //Order group ID (default to undefined)
|
|
697
|
+
|
|
698
|
+
const { status, data } = await apiInstance.getOrderGroup(
|
|
699
|
+
orderGroupId
|
|
700
|
+
);
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
### Parameters
|
|
704
|
+
|
|
705
|
+
|Name | Type | Description | Notes|
|
|
706
|
+
|------------- | ------------- | ------------- | -------------|
|
|
707
|
+
| **orderGroupId** | [**string**] | Order group ID | defaults to undefined|
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
### Return type
|
|
711
|
+
|
|
712
|
+
**GetOrderGroupResponse**
|
|
713
|
+
|
|
714
|
+
### Authorization
|
|
715
|
+
|
|
716
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
717
|
+
|
|
718
|
+
### HTTP request headers
|
|
719
|
+
|
|
720
|
+
- **Content-Type**: Not defined
|
|
721
|
+
- **Accept**: application/json
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
### HTTP response details
|
|
725
|
+
| Status code | Description | Response headers |
|
|
726
|
+
|-------------|-------------|------------------|
|
|
727
|
+
|**200** | Order group retrieved successfully | - |
|
|
728
|
+
|**401** | Unauthorized - authentication required | - |
|
|
729
|
+
|**404** | Resource not found | - |
|
|
730
|
+
|**500** | Internal server error | - |
|
|
731
|
+
|
|
732
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
733
|
+
|
|
643
734
|
# **getOrderGroups**
|
|
644
735
|
> GetOrderGroupsResponse getOrderGroups()
|
|
645
736
|
|
|
@@ -651,9 +742,12 @@ Get order groups for the logged-in user
|
|
|
651
742
|
import {
|
|
652
743
|
PortfolioApi,
|
|
653
744
|
Configuration
|
|
654
|
-
} from '
|
|
745
|
+
} from 'kalshi-typescript';
|
|
655
746
|
|
|
656
|
-
const configuration = new Configuration(
|
|
747
|
+
const configuration = new Configuration({
|
|
748
|
+
apiKey: 'your-api-key-id',
|
|
749
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
750
|
+
});
|
|
657
751
|
const apiInstance = new PortfolioApi(configuration);
|
|
658
752
|
|
|
659
753
|
let status: string; //Filter by status. Possible values depend on the endpoint. (optional) (default to undefined)
|
|
@@ -711,9 +805,12 @@ Get the queue position for an order
|
|
|
711
805
|
import {
|
|
712
806
|
PortfolioApi,
|
|
713
807
|
Configuration
|
|
714
|
-
} from '
|
|
808
|
+
} from 'kalshi-typescript';
|
|
715
809
|
|
|
716
|
-
const configuration = new Configuration(
|
|
810
|
+
const configuration = new Configuration({
|
|
811
|
+
apiKey: 'your-api-key-id',
|
|
812
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
813
|
+
});
|
|
717
814
|
const apiInstance = new PortfolioApi(configuration);
|
|
718
815
|
|
|
719
816
|
let orderId: string; //Order ID (default to undefined)
|
|
@@ -765,9 +862,12 @@ Get orders for the logged-in user
|
|
|
765
862
|
import {
|
|
766
863
|
PortfolioApi,
|
|
767
864
|
Configuration
|
|
768
|
-
} from '
|
|
865
|
+
} from 'kalshi-typescript';
|
|
769
866
|
|
|
770
|
-
const configuration = new Configuration(
|
|
867
|
+
const configuration = new Configuration({
|
|
868
|
+
apiKey: 'your-api-key-id',
|
|
869
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
870
|
+
});
|
|
771
871
|
const apiInstance = new PortfolioApi(configuration);
|
|
772
872
|
|
|
773
873
|
let ticker: string; //Filter by market ticker (optional) (default to undefined)
|
|
@@ -837,9 +937,12 @@ Get positions for the logged-in user
|
|
|
837
937
|
import {
|
|
838
938
|
PortfolioApi,
|
|
839
939
|
Configuration
|
|
840
|
-
} from '
|
|
940
|
+
} from 'kalshi-typescript';
|
|
841
941
|
|
|
842
|
-
const configuration = new Configuration(
|
|
942
|
+
const configuration = new Configuration({
|
|
943
|
+
apiKey: 'your-api-key-id',
|
|
944
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
945
|
+
});
|
|
843
946
|
const apiInstance = new PortfolioApi(configuration);
|
|
844
947
|
|
|
845
948
|
let ticker: string; //Filter by market ticker (optional) (default to undefined)
|
|
@@ -907,9 +1010,12 @@ import {
|
|
|
907
1010
|
PortfolioApi,
|
|
908
1011
|
Configuration,
|
|
909
1012
|
GetQueuePositionsRequest
|
|
910
|
-
} from '
|
|
1013
|
+
} from 'kalshi-typescript';
|
|
911
1014
|
|
|
912
|
-
const configuration = new Configuration(
|
|
1015
|
+
const configuration = new Configuration({
|
|
1016
|
+
apiKey: 'your-api-key-id',
|
|
1017
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
1018
|
+
});
|
|
913
1019
|
const apiInstance = new PortfolioApi(configuration);
|
|
914
1020
|
|
|
915
1021
|
let getQueuePositionsRequest: GetQueuePositionsRequest; //
|
|
@@ -961,9 +1067,12 @@ Get settlements for the logged-in user
|
|
|
961
1067
|
import {
|
|
962
1068
|
PortfolioApi,
|
|
963
1069
|
Configuration
|
|
964
|
-
} from '
|
|
1070
|
+
} from 'kalshi-typescript';
|
|
965
1071
|
|
|
966
|
-
const configuration = new Configuration(
|
|
1072
|
+
const configuration = new Configuration({
|
|
1073
|
+
apiKey: 'your-api-key-id',
|
|
1074
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
1075
|
+
});
|
|
967
1076
|
const apiInstance = new PortfolioApi(configuration);
|
|
968
1077
|
|
|
969
1078
|
let limit: number; //Number of results per page. Defaults to 100. Maximum value is 200. (optional) (default to 100)
|
|
@@ -1018,9 +1127,12 @@ Get the total value of all resting orders
|
|
|
1018
1127
|
import {
|
|
1019
1128
|
PortfolioApi,
|
|
1020
1129
|
Configuration
|
|
1021
|
-
} from '
|
|
1130
|
+
} from 'kalshi-typescript';
|
|
1022
1131
|
|
|
1023
|
-
const configuration = new Configuration(
|
|
1132
|
+
const configuration = new Configuration({
|
|
1133
|
+
apiKey: 'your-api-key-id',
|
|
1134
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
1135
|
+
});
|
|
1024
1136
|
const apiInstance = new PortfolioApi(configuration);
|
|
1025
1137
|
|
|
1026
1138
|
const { status, data } = await apiInstance.getTotalRestingOrderValue();
|
|
@@ -1064,9 +1176,12 @@ Reset an order group
|
|
|
1064
1176
|
import {
|
|
1065
1177
|
PortfolioApi,
|
|
1066
1178
|
Configuration
|
|
1067
|
-
} from '
|
|
1179
|
+
} from 'kalshi-typescript';
|
|
1068
1180
|
|
|
1069
|
-
const configuration = new Configuration(
|
|
1181
|
+
const configuration = new Configuration({
|
|
1182
|
+
apiKey: 'your-api-key-id',
|
|
1183
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
1184
|
+
});
|
|
1070
1185
|
const apiInstance = new PortfolioApi(configuration);
|
|
1071
1186
|
|
|
1072
1187
|
let orderGroupId: string; //Order group ID (default to undefined)
|
package/docs/Position.md
CHANGED
package/docs/Quote.md
CHANGED
package/docs/RFQ.md
CHANGED
package/docs/Series.md
CHANGED
package/docs/SeriesApi.md
CHANGED
|
@@ -18,9 +18,12 @@ Get all market series
|
|
|
18
18
|
import {
|
|
19
19
|
SeriesApi,
|
|
20
20
|
Configuration
|
|
21
|
-
} from '
|
|
21
|
+
} from 'kalshi-typescript';
|
|
22
22
|
|
|
23
|
-
const configuration = new Configuration(
|
|
23
|
+
const configuration = new Configuration({
|
|
24
|
+
apiKey: 'your-api-key-id',
|
|
25
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
26
|
+
});
|
|
24
27
|
const apiInstance = new SeriesApi(configuration);
|
|
25
28
|
|
|
26
29
|
let status: string; //Filter by series status (optional) (default to undefined)
|
|
@@ -71,9 +74,12 @@ Get a single series by its ticker
|
|
|
71
74
|
import {
|
|
72
75
|
SeriesApi,
|
|
73
76
|
Configuration
|
|
74
|
-
} from '
|
|
77
|
+
} from 'kalshi-typescript';
|
|
75
78
|
|
|
76
|
-
const configuration = new Configuration(
|
|
79
|
+
const configuration = new Configuration({
|
|
80
|
+
apiKey: 'your-api-key-id',
|
|
81
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
82
|
+
});
|
|
77
83
|
const apiInstance = new SeriesApi(configuration);
|
|
78
84
|
|
|
79
85
|
let ticker: string; //The series ticker (default to undefined)
|
package/docs/Settlement.md
CHANGED
package/docs/StructuredTarget.md
CHANGED
|
@@ -18,9 +18,12 @@ Get a single structured target by ID
|
|
|
18
18
|
import {
|
|
19
19
|
StructuredTargetsApi,
|
|
20
20
|
Configuration
|
|
21
|
-
} from '
|
|
21
|
+
} from 'kalshi-typescript';
|
|
22
22
|
|
|
23
|
-
const configuration = new Configuration(
|
|
23
|
+
const configuration = new Configuration({
|
|
24
|
+
apiKey: 'your-api-key-id',
|
|
25
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
26
|
+
});
|
|
24
27
|
const apiInstance = new StructuredTargetsApi(configuration);
|
|
25
28
|
|
|
26
29
|
let structuredTargetId: string; //Structured target ID (default to undefined)
|
|
@@ -72,9 +75,12 @@ Get all structured targets
|
|
|
72
75
|
import {
|
|
73
76
|
StructuredTargetsApi,
|
|
74
77
|
Configuration
|
|
75
|
-
} from '
|
|
78
|
+
} from 'kalshi-typescript';
|
|
76
79
|
|
|
77
|
-
const configuration = new Configuration(
|
|
80
|
+
const configuration = new Configuration({
|
|
81
|
+
apiKey: 'your-api-key-id',
|
|
82
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
83
|
+
});
|
|
78
84
|
const apiInstance = new StructuredTargetsApi(configuration);
|
|
79
85
|
|
|
80
86
|
let status: string; //Filter by structured target status (optional) (default to undefined)
|
package/docs/Trade.md
CHANGED
|
@@ -15,8 +15,42 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
export interface AmendOrderRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Market ticker
|
|
20
|
+
*/
|
|
21
|
+
'ticker': string;
|
|
22
|
+
/**
|
|
23
|
+
* Side of the order
|
|
24
|
+
*/
|
|
25
|
+
'side': AmendOrderRequestSideEnum;
|
|
26
|
+
/**
|
|
27
|
+
* Buy or sell action
|
|
28
|
+
*/
|
|
29
|
+
'action': AmendOrderRequestActionEnum;
|
|
18
30
|
'yes_price'?: number;
|
|
19
31
|
'no_price'?: number;
|
|
20
32
|
'count'?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Current client order ID
|
|
35
|
+
*/
|
|
36
|
+
'client_order_id': string;
|
|
37
|
+
/**
|
|
38
|
+
* New client order ID after amendment
|
|
39
|
+
*/
|
|
40
|
+
'updated_client_order_id': string;
|
|
21
41
|
}
|
|
22
42
|
|
|
43
|
+
export const AmendOrderRequestSideEnum = {
|
|
44
|
+
Yes: 'yes',
|
|
45
|
+
No: 'no'
|
|
46
|
+
} as const;
|
|
47
|
+
|
|
48
|
+
export type AmendOrderRequestSideEnum = typeof AmendOrderRequestSideEnum[keyof typeof AmendOrderRequestSideEnum];
|
|
49
|
+
export const AmendOrderRequestActionEnum = {
|
|
50
|
+
Buy: 'buy',
|
|
51
|
+
Sell: 'sell'
|
|
52
|
+
} as const;
|
|
53
|
+
|
|
54
|
+
export type AmendOrderRequestActionEnum = typeof AmendOrderRequestActionEnum[keyof typeof AmendOrderRequestActionEnum];
|
|
55
|
+
|
|
56
|
+
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
// May contain unused imports in some cases
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
import type { OrderGroup } from './order-group';
|
|
19
16
|
|
|
20
17
|
export interface CreateOrderGroupResponse {
|
|
21
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The unique identifier for the created order group
|
|
20
|
+
*/
|
|
21
|
+
'order_group_id'?: string;
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -26,6 +26,14 @@ export interface CreateOrderRequest {
|
|
|
26
26
|
'expiration_ts'?: number;
|
|
27
27
|
'sell_position_floor'?: number;
|
|
28
28
|
'buy_max_cost'?: number;
|
|
29
|
+
/**
|
|
30
|
+
* If set to true, the order will be rejected if it crosses the spread and executes immediately
|
|
31
|
+
*/
|
|
32
|
+
'post_only'?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* OrderGroupId specifies the order group this order is part of
|
|
35
|
+
*/
|
|
36
|
+
'order_group_id'?: string;
|
|
29
37
|
}
|
|
30
38
|
|
|
31
39
|
export const CreateOrderRequestSideEnum = {
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Kalshi Trading API
|
|
5
|
+
* Complete API for the Kalshi trading platform including all handlers for SDK generation
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
* Contact: support@kalshi.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export interface EventPosition {
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier for events.
|
|
20
|
+
*/
|
|
21
|
+
'event_ticker'?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Total spent on this event in cents.
|
|
24
|
+
*/
|
|
25
|
+
'total_cost'?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Total spent on this event in dollars.
|
|
28
|
+
*/
|
|
29
|
+
'total_cost_dollars'?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Cost of the aggregate event position in cents.
|
|
32
|
+
*/
|
|
33
|
+
'event_exposure'?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Cost of the aggregate event position in dollars.
|
|
36
|
+
*/
|
|
37
|
+
'event_exposure_dollars'?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Locked in profit and loss, in cents.
|
|
40
|
+
*/
|
|
41
|
+
'realized_pnl'?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Locked in profit and loss, in dollars.
|
|
44
|
+
*/
|
|
45
|
+
'realized_pnl_dollars'?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Aggregate size of resting orders in contract units.
|
|
48
|
+
*/
|
|
49
|
+
'resting_order_count'?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Fees paid on fill orders, in cents.
|
|
52
|
+
*/
|
|
53
|
+
'fees_paid'?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Fees paid on fill orders, in dollars.
|
|
56
|
+
*/
|
|
57
|
+
'fees_paid_dollars'?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Kalshi Trading API
|
|
5
|
+
* Complete API for the Kalshi trading platform including all handlers for SDK generation
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
* Contact: support@kalshi.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export interface GetOrderGroupResponse {
|
|
18
|
+
/**
|
|
19
|
+
* Whether auto-cancel is enabled for this order group
|
|
20
|
+
*/
|
|
21
|
+
'is_auto_cancel_enabled'?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* List of order IDs that belong to this order group
|
|
24
|
+
*/
|
|
25
|
+
'orders'?: Array<string>;
|
|
26
|
+
}
|
|
27
|
+
|