kalshi-typescript 2.1.0 → 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.
Files changed (189) hide show
  1. package/.openapi-generator/FILES +4 -1
  2. package/.openapi-generator-ignore +9 -1
  3. package/README.md +6 -3
  4. package/api/exchange-api.ts +4 -4
  5. package/api/markets-api.ts +4 -4
  6. package/api/portfolio-api.ts +75 -1
  7. package/auth.ts +38 -0
  8. package/base.ts +51 -17
  9. package/common.ts +1 -1
  10. package/configuration.ts +1 -1
  11. package/dist/api/api-keys-api.d.ts +4 -4
  12. package/dist/api/communications-api.d.ts +11 -11
  13. package/dist/api/events-api.d.ts +3 -3
  14. package/dist/api/exchange-api.d.ts +8 -8
  15. package/dist/api/exchange-api.js +4 -4
  16. package/dist/api/markets-api.d.ts +9 -9
  17. package/dist/api/markets-api.js +4 -4
  18. package/dist/api/milestones-api.d.ts +2 -2
  19. package/dist/api/multivariate-collections-api.d.ts +3 -3
  20. package/dist/api/portfolio-api.d.ts +52 -19
  21. package/dist/api/portfolio-api.js +69 -1
  22. package/dist/api/series-api.d.ts +2 -2
  23. package/dist/api/structured-targets-api.d.ts +2 -2
  24. package/dist/auth.d.ts +7 -0
  25. package/dist/auth.js +33 -0
  26. package/dist/base.d.ts +25 -10
  27. package/dist/base.js +37 -6
  28. package/dist/esm/api/api-keys-api.d.ts +4 -4
  29. package/dist/esm/api/communications-api.d.ts +11 -11
  30. package/dist/esm/api/events-api.d.ts +3 -3
  31. package/dist/esm/api/exchange-api.d.ts +8 -8
  32. package/dist/esm/api/exchange-api.js +4 -4
  33. package/dist/esm/api/markets-api.d.ts +9 -9
  34. package/dist/esm/api/markets-api.js +4 -4
  35. package/dist/esm/api/milestones-api.d.ts +2 -2
  36. package/dist/esm/api/multivariate-collections-api.d.ts +3 -3
  37. package/dist/esm/api/portfolio-api.d.ts +52 -19
  38. package/dist/esm/api/portfolio-api.js +69 -1
  39. package/dist/esm/api/series-api.d.ts +2 -2
  40. package/dist/esm/api/structured-targets-api.d.ts +2 -2
  41. package/dist/esm/auth.d.ts +7 -0
  42. package/dist/esm/auth.js +29 -0
  43. package/dist/esm/base.d.ts +25 -10
  44. package/dist/esm/base.js +36 -5
  45. package/dist/esm/models/amend-order-request.d.ts +30 -0
  46. package/dist/esm/models/amend-order-request.js +8 -1
  47. package/dist/esm/models/create-order-group-request.d.ts +4 -1
  48. package/dist/esm/models/create-order-group-response.d.ts +4 -2
  49. package/dist/esm/models/create-order-request.d.ts +8 -0
  50. package/dist/esm/models/error-response-error.d.ts +1 -1
  51. package/dist/esm/models/event-position.d.ts +53 -0
  52. package/dist/esm/models/event-position.js +14 -0
  53. package/dist/esm/models/get-order-group-response.d.ts +21 -0
  54. package/dist/esm/models/get-order-group-response.js +14 -0
  55. package/dist/esm/models/get-order-response.d.ts +1 -1
  56. package/dist/esm/models/get-positions-response.d.ts +3 -1
  57. package/dist/esm/models/index.d.ts +2 -0
  58. package/dist/esm/models/index.js +2 -0
  59. package/dist/esm/models/order-group.d.ts +8 -4
  60. package/dist/esm/models/order.d.ts +16 -0
  61. package/dist/models/amend-order-request.d.ts +30 -0
  62. package/dist/models/amend-order-request.js +9 -0
  63. package/dist/models/create-order-group-request.d.ts +4 -1
  64. package/dist/models/create-order-group-response.d.ts +4 -2
  65. package/dist/models/create-order-request.d.ts +8 -0
  66. package/dist/models/error-response-error.d.ts +1 -1
  67. package/dist/models/event-position.d.ts +53 -0
  68. package/dist/models/event-position.js +15 -0
  69. package/dist/models/get-order-group-response.d.ts +21 -0
  70. package/dist/models/get-order-group-response.js +15 -0
  71. package/dist/models/get-order-response.d.ts +1 -1
  72. package/dist/models/get-positions-response.d.ts +3 -1
  73. package/dist/models/index.d.ts +2 -0
  74. package/dist/models/index.js +2 -0
  75. package/dist/models/order-group.d.ts +8 -4
  76. package/dist/models/order.d.ts +16 -0
  77. package/docs/AcceptQuoteRequest.md +1 -1
  78. package/docs/AmendOrderRequest.md +11 -1
  79. package/docs/AmendOrderResponse.md +1 -1
  80. package/docs/Announcement.md +1 -1
  81. package/docs/ApiKey.md +1 -1
  82. package/docs/ApiKeysApi.md +20 -8
  83. package/docs/BatchCancelOrdersRequest.md +1 -1
  84. package/docs/BatchCancelOrdersResponse.md +1 -1
  85. package/docs/BatchCancelOrdersResponseResponsesInner.md +1 -1
  86. package/docs/BatchCreateOrdersRequest.md +1 -1
  87. package/docs/BatchCreateOrdersResponse.md +1 -1
  88. package/docs/BatchCreateOrdersResponseResponsesInner.md +1 -1
  89. package/docs/CancelOrderResponse.md +1 -1
  90. package/docs/Candlestick.md +1 -1
  91. package/docs/CommunicationsApi.md +55 -22
  92. package/docs/CreateApiKeyRequest.md +1 -1
  93. package/docs/CreateApiKeyResponse.md +1 -1
  94. package/docs/CreateOrderGroupRequest.md +3 -3
  95. package/docs/CreateOrderGroupResponse.md +3 -3
  96. package/docs/CreateOrderRequest.md +5 -1
  97. package/docs/CreateOrderResponse.md +1 -1
  98. package/docs/CreateQuoteRequest.md +1 -1
  99. package/docs/CreateQuoteResponse.md +1 -1
  100. package/docs/CreateRFQRequest.md +1 -1
  101. package/docs/CreateRFQResponse.md +1 -1
  102. package/docs/DailySchedule.md +1 -1
  103. package/docs/DecreaseOrderRequest.md +1 -1
  104. package/docs/DecreaseOrderResponse.md +1 -1
  105. package/docs/ErrorResponse.md +1 -1
  106. package/docs/ErrorResponseError.md +2 -2
  107. package/docs/Event.md +1 -1
  108. package/docs/EventPosition.md +38 -0
  109. package/docs/EventsApi.md +15 -6
  110. package/docs/ExchangeApi.md +21 -9
  111. package/docs/ExchangeStatus.md +1 -1
  112. package/docs/Fill.md +1 -1
  113. package/docs/GenerateApiKeyRequest.md +1 -1
  114. package/docs/GenerateApiKeyResponse.md +1 -1
  115. package/docs/GetApiKeysResponse.md +1 -1
  116. package/docs/GetBalanceResponse.md +1 -1
  117. package/docs/GetCommunicationsIDResponse.md +1 -1
  118. package/docs/GetEventMetadataResponse.md +1 -1
  119. package/docs/GetEventResponse.md +1 -1
  120. package/docs/GetEventsResponse.md +1 -1
  121. package/docs/GetExchangeAnnouncementsResponse.md +1 -1
  122. package/docs/GetExchangeScheduleResponse.md +1 -1
  123. package/docs/GetExchangeScheduleResponseSchedule.md +1 -1
  124. package/docs/GetFillsResponse.md +1 -1
  125. package/docs/GetMarketCandlesticksResponse.md +1 -1
  126. package/docs/GetMarketOrderbookResponse.md +1 -1
  127. package/docs/GetMarketOrderbookResponseOrderbook.md +1 -1
  128. package/docs/GetMarketResponse.md +1 -1
  129. package/docs/GetMarketsResponse.md +1 -1
  130. package/docs/GetMilestoneResponse.md +1 -1
  131. package/docs/GetMilestonesResponse.md +1 -1
  132. package/docs/GetMultivariateEventCollectionResponse.md +1 -1
  133. package/docs/GetMultivariateEventCollectionsResponse.md +1 -1
  134. package/docs/GetOrderGroupResponse.md +22 -0
  135. package/docs/GetOrderGroupsResponse.md +1 -1
  136. package/docs/GetOrderQueuePositionResponse.md +1 -1
  137. package/docs/GetOrderResponse.md +2 -2
  138. package/docs/GetOrdersResponse.md +1 -1
  139. package/docs/GetPositionsResponse.md +5 -3
  140. package/docs/GetQueuePositionsRequest.md +1 -1
  141. package/docs/GetQueuePositionsResponse.md +1 -1
  142. package/docs/GetQuoteResponse.md +1 -1
  143. package/docs/GetQuotesResponse.md +1 -1
  144. package/docs/GetRFQResponse.md +1 -1
  145. package/docs/GetRFQsResponse.md +1 -1
  146. package/docs/GetSeriesByTickerResponse.md +1 -1
  147. package/docs/GetSeriesResponse.md +1 -1
  148. package/docs/GetSettlementsResponse.md +1 -1
  149. package/docs/GetStructuredTargetResponse.md +1 -1
  150. package/docs/GetStructuredTargetsResponse.md +1 -1
  151. package/docs/GetTotalRestingOrderValueResponse.md +1 -1
  152. package/docs/GetTradesResponse.md +1 -1
  153. package/docs/GetUserDataTimestampResponse.md +1 -1
  154. package/docs/LookupBundleRequest.md +1 -1
  155. package/docs/LookupBundleRequestBundleInner.md +1 -1
  156. package/docs/LookupBundleResponse.md +1 -1
  157. package/docs/Market.md +1 -1
  158. package/docs/MarketsApi.md +26 -11
  159. package/docs/Milestone.md +1 -1
  160. package/docs/MilestonesApi.md +10 -4
  161. package/docs/MultivariateCollectionsApi.md +15 -6
  162. package/docs/MultivariateEventCollection.md +1 -1
  163. package/docs/MultivariateEventCollectionEventsInner.md +1 -1
  164. package/docs/Order.md +9 -1
  165. package/docs/OrderGroup.md +5 -9
  166. package/docs/OrderbookLevel.md +1 -1
  167. package/docs/PortfolioApi.md +154 -39
  168. package/docs/Position.md +1 -1
  169. package/docs/Quote.md +1 -1
  170. package/docs/RFQ.md +1 -1
  171. package/docs/Series.md +1 -1
  172. package/docs/SeriesApi.md +10 -4
  173. package/docs/Settlement.md +1 -1
  174. package/docs/StructuredTarget.md +1 -1
  175. package/docs/StructuredTargetsApi.md +10 -4
  176. package/docs/Trade.md +1 -1
  177. package/models/amend-order-request.ts +34 -0
  178. package/models/create-order-group-request.ts +4 -1
  179. package/models/create-order-group-response.ts +4 -4
  180. package/models/create-order-request.ts +8 -0
  181. package/models/error-response-error.ts +1 -1
  182. package/models/event-position.ts +59 -0
  183. package/models/get-order-group-response.ts +27 -0
  184. package/models/get-order-response.ts +1 -1
  185. package/models/get-positions-response.ts +5 -1
  186. package/models/index.ts +2 -0
  187. package/models/order-group.ts +8 -4
  188. package/models/order.ts +16 -0
  189. package/package.json +4 -4
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
12
12
  ## Example
13
13
 
14
14
  ```typescript
15
- import { BatchCancelOrdersResponseResponsesInner } from '@kalshi/trading-api';
15
+ import { BatchCancelOrdersResponseResponsesInner } from 'kalshi-typescript';
16
16
 
17
17
  const instance: BatchCancelOrdersResponseResponsesInner = {
18
18
  order_id,
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { BatchCreateOrdersRequest } from '@kalshi/trading-api';
13
+ import { BatchCreateOrdersRequest } from 'kalshi-typescript';
14
14
 
15
15
  const instance: BatchCreateOrdersRequest = {
16
16
  orders,
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { BatchCreateOrdersResponse } from '@kalshi/trading-api';
13
+ import { BatchCreateOrdersResponse } from 'kalshi-typescript';
14
14
 
15
15
  const instance: BatchCreateOrdersResponse = {
16
16
  responses,
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
11
11
  ## Example
12
12
 
13
13
  ```typescript
14
- import { BatchCreateOrdersResponseResponsesInner } from '@kalshi/trading-api';
14
+ import { BatchCreateOrdersResponseResponsesInner } from 'kalshi-typescript';
15
15
 
16
16
  const instance: BatchCreateOrdersResponseResponsesInner = {
17
17
  order,
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
11
11
  ## Example
12
12
 
13
13
  ```typescript
14
- import { CancelOrderResponse } from '@kalshi/trading-api';
14
+ import { CancelOrderResponse } from 'kalshi-typescript';
15
15
 
16
16
  const instance: CancelOrderResponse = {
17
17
  order,
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
16
16
  ## Example
17
17
 
18
18
  ```typescript
19
- import { Candlestick } from '@kalshi/trading-api';
19
+ import { Candlestick } from 'kalshi-typescript';
20
20
 
21
21
  const instance: Candlestick = {
22
22
  start_ts,
@@ -28,9 +28,12 @@ import {
28
28
  CommunicationsApi,
29
29
  Configuration,
30
30
  AcceptQuoteRequest
31
- } from '@kalshi/trading-api';
31
+ } from 'kalshi-typescript';
32
32
 
33
- const configuration = new Configuration();
33
+ const configuration = new Configuration({
34
+ apiKey: 'your-api-key-id',
35
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
36
+ });
34
37
  const apiInstance = new CommunicationsApi(configuration);
35
38
 
36
39
  let quoteId: string; //Quote ID (default to undefined)
@@ -86,9 +89,12 @@ Confirm a quote. This will start a timer for order execution
86
89
  import {
87
90
  CommunicationsApi,
88
91
  Configuration
89
- } from '@kalshi/trading-api';
92
+ } from 'kalshi-typescript';
90
93
 
91
- const configuration = new Configuration();
94
+ const configuration = new Configuration({
95
+ apiKey: 'your-api-key-id',
96
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
97
+ });
92
98
  const apiInstance = new CommunicationsApi(configuration);
93
99
 
94
100
  let quoteId: string; //Quote ID (default to undefined)
@@ -141,9 +147,12 @@ import {
141
147
  CommunicationsApi,
142
148
  Configuration,
143
149
  CreateQuoteRequest
144
- } from '@kalshi/trading-api';
150
+ } from 'kalshi-typescript';
145
151
 
146
- const configuration = new Configuration();
152
+ const configuration = new Configuration({
153
+ apiKey: 'your-api-key-id',
154
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
155
+ });
147
156
  const apiInstance = new CommunicationsApi(configuration);
148
157
 
149
158
  let createQuoteRequest: CreateQuoteRequest; //
@@ -196,9 +205,12 @@ import {
196
205
  CommunicationsApi,
197
206
  Configuration,
198
207
  CreateRFQRequest
199
- } from '@kalshi/trading-api';
208
+ } from 'kalshi-typescript';
200
209
 
201
- const configuration = new Configuration();
210
+ const configuration = new Configuration({
211
+ apiKey: 'your-api-key-id',
212
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
213
+ });
202
214
  const apiInstance = new CommunicationsApi(configuration);
203
215
 
204
216
  let createRFQRequest: CreateRFQRequest; //
@@ -250,9 +262,12 @@ Delete a quote, which means it can no longer be accepted
250
262
  import {
251
263
  CommunicationsApi,
252
264
  Configuration
253
- } from '@kalshi/trading-api';
265
+ } from 'kalshi-typescript';
254
266
 
255
- const configuration = new Configuration();
267
+ const configuration = new Configuration({
268
+ apiKey: 'your-api-key-id',
269
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
270
+ });
256
271
  const apiInstance = new CommunicationsApi(configuration);
257
272
 
258
273
  let quoteId: string; //Quote ID (default to undefined)
@@ -304,9 +319,12 @@ Delete an RFQ by ID
304
319
  import {
305
320
  CommunicationsApi,
306
321
  Configuration
307
- } from '@kalshi/trading-api';
322
+ } from 'kalshi-typescript';
308
323
 
309
- const configuration = new Configuration();
324
+ const configuration = new Configuration({
325
+ apiKey: 'your-api-key-id',
326
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
327
+ });
310
328
  const apiInstance = new CommunicationsApi(configuration);
311
329
 
312
330
  let rfqId: string; //RFQ ID (default to undefined)
@@ -358,9 +376,12 @@ Get the communications ID of the logged-in user
358
376
  import {
359
377
  CommunicationsApi,
360
378
  Configuration
361
- } from '@kalshi/trading-api';
379
+ } from 'kalshi-typescript';
362
380
 
363
- const configuration = new Configuration();
381
+ const configuration = new Configuration({
382
+ apiKey: 'your-api-key-id',
383
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
384
+ });
364
385
  const apiInstance = new CommunicationsApi(configuration);
365
386
 
366
387
  const { status, data } = await apiInstance.getCommunicationsID();
@@ -404,9 +425,12 @@ Get a particular quote by ID
404
425
  import {
405
426
  CommunicationsApi,
406
427
  Configuration
407
- } from '@kalshi/trading-api';
428
+ } from 'kalshi-typescript';
408
429
 
409
- const configuration = new Configuration();
430
+ const configuration = new Configuration({
431
+ apiKey: 'your-api-key-id',
432
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
433
+ });
410
434
  const apiInstance = new CommunicationsApi(configuration);
411
435
 
412
436
  let quoteId: string; //Quote ID (default to undefined)
@@ -458,9 +482,12 @@ Retrieve all quotes
458
482
  import {
459
483
  CommunicationsApi,
460
484
  Configuration
461
- } from '@kalshi/trading-api';
485
+ } from 'kalshi-typescript';
462
486
 
463
- const configuration = new Configuration();
487
+ const configuration = new Configuration({
488
+ apiKey: 'your-api-key-id',
489
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
490
+ });
464
491
  const apiInstance = new CommunicationsApi(configuration);
465
492
 
466
493
  const { status, data } = await apiInstance.getQuotes();
@@ -504,9 +531,12 @@ Get a single RFQ by ID
504
531
  import {
505
532
  CommunicationsApi,
506
533
  Configuration
507
- } from '@kalshi/trading-api';
534
+ } from 'kalshi-typescript';
508
535
 
509
- const configuration = new Configuration();
536
+ const configuration = new Configuration({
537
+ apiKey: 'your-api-key-id',
538
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
539
+ });
510
540
  const apiInstance = new CommunicationsApi(configuration);
511
541
 
512
542
  let rfqId: string; //RFQ ID (default to undefined)
@@ -558,9 +588,12 @@ Retrieve all RFQs
558
588
  import {
559
589
  CommunicationsApi,
560
590
  Configuration
561
- } from '@kalshi/trading-api';
591
+ } from 'kalshi-typescript';
562
592
 
563
- const configuration = new Configuration();
593
+ const configuration = new Configuration({
594
+ apiKey: 'your-api-key-id',
595
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
596
+ });
564
597
  const apiInstance = new CommunicationsApi(configuration);
565
598
 
566
599
  const { status, data } = await apiInstance.getRFQs();
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
11
11
  ## Example
12
12
 
13
13
  ```typescript
14
- import { CreateApiKeyRequest } from '@kalshi/trading-api';
14
+ import { CreateApiKeyRequest } from 'kalshi-typescript';
15
15
 
16
16
  const instance: CreateApiKeyRequest = {
17
17
  name,
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { CreateApiKeyResponse } from '@kalshi/trading-api';
13
+ import { CreateApiKeyResponse } from 'kalshi-typescript';
14
14
 
15
15
  const instance: CreateApiKeyResponse = {
16
16
  api_key_id,
@@ -5,15 +5,15 @@
5
5
 
6
6
  Name | Type | Description | Notes
7
7
  ------------ | ------------- | ------------- | -------------
8
- **name** | **string** | | [default to undefined]
8
+ **contracts_limit** | **number** | Specifies the maximum number of contracts that can be matched within this group. | [optional] [default to undefined]
9
9
 
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { CreateOrderGroupRequest } from '@kalshi/trading-api';
13
+ import { CreateOrderGroupRequest } from 'kalshi-typescript';
14
14
 
15
15
  const instance: CreateOrderGroupRequest = {
16
- name,
16
+ contracts_limit,
17
17
  };
18
18
  ```
19
19
 
@@ -5,15 +5,15 @@
5
5
 
6
6
  Name | Type | Description | Notes
7
7
  ------------ | ------------- | ------------- | -------------
8
- **order_group** | [**OrderGroup**](OrderGroup.md) | | [optional] [default to undefined]
8
+ **order_group_id** | **string** | The unique identifier for the created order group | [optional] [default to undefined]
9
9
 
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { CreateOrderGroupResponse } from '@kalshi/trading-api';
13
+ import { CreateOrderGroupResponse } from 'kalshi-typescript';
14
14
 
15
15
  const instance: CreateOrderGroupResponse = {
16
- order_group,
16
+ order_group_id,
17
17
  };
18
18
  ```
19
19
 
@@ -16,11 +16,13 @@ Name | Type | Description | Notes
16
16
  **expiration_ts** | **number** | | [optional] [default to undefined]
17
17
  **sell_position_floor** | **number** | | [optional] [default to undefined]
18
18
  **buy_max_cost** | **number** | | [optional] [default to undefined]
19
+ **post_only** | **boolean** | If set to true, the order will be rejected if it crosses the spread and executes immediately | [optional] [default to undefined]
20
+ **order_group_id** | **string** | OrderGroupId specifies the order group this order is part of | [optional] [default to undefined]
19
21
 
20
22
  ## Example
21
23
 
22
24
  ```typescript
23
- import { CreateOrderRequest } from '@kalshi/trading-api';
25
+ import { CreateOrderRequest } from 'kalshi-typescript';
24
26
 
25
27
  const instance: CreateOrderRequest = {
26
28
  ticker,
@@ -34,6 +36,8 @@ const instance: CreateOrderRequest = {
34
36
  expiration_ts,
35
37
  sell_position_floor,
36
38
  buy_max_cost,
39
+ post_only,
40
+ order_group_id,
37
41
  };
38
42
  ```
39
43
 
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { CreateOrderResponse } from '@kalshi/trading-api';
13
+ import { CreateOrderResponse } from 'kalshi-typescript';
14
14
 
15
15
  const instance: CreateOrderResponse = {
16
16
  order,
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
12
12
  ## Example
13
13
 
14
14
  ```typescript
15
- import { CreateQuoteRequest } from '@kalshi/trading-api';
15
+ import { CreateQuoteRequest } from 'kalshi-typescript';
16
16
 
17
17
  const instance: CreateQuoteRequest = {
18
18
  rfq_id,
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { CreateQuoteResponse } from '@kalshi/trading-api';
13
+ import { CreateQuoteResponse } from 'kalshi-typescript';
14
14
 
15
15
  const instance: CreateQuoteResponse = {
16
16
  quote,
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
13
13
  ## Example
14
14
 
15
15
  ```typescript
16
- import { CreateRFQRequest } from '@kalshi/trading-api';
16
+ import { CreateRFQRequest } from 'kalshi-typescript';
17
17
 
18
18
  const instance: CreateRFQRequest = {
19
19
  ticker,
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { CreateRFQResponse } from '@kalshi/trading-api';
13
+ import { CreateRFQResponse } from 'kalshi-typescript';
14
14
 
15
15
  const instance: CreateRFQResponse = {
16
16
  rfq,
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
11
11
  ## Example
12
12
 
13
13
  ```typescript
14
- import { DailySchedule } from '@kalshi/trading-api';
14
+ import { DailySchedule } from 'kalshi-typescript';
15
15
 
16
16
  const instance: DailySchedule = {
17
17
  open_time,
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { DecreaseOrderRequest } from '@kalshi/trading-api';
13
+ import { DecreaseOrderRequest } from 'kalshi-typescript';
14
14
 
15
15
  const instance: DecreaseOrderRequest = {
16
16
  reduce_by,
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { DecreaseOrderResponse } from '@kalshi/trading-api';
13
+ import { DecreaseOrderResponse } from 'kalshi-typescript';
14
14
 
15
15
  const instance: DecreaseOrderResponse = {
16
16
  order,
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { ErrorResponse } from '@kalshi/trading-api';
13
+ import { ErrorResponse } from 'kalshi-typescript';
14
14
 
15
15
  const instance: ErrorResponse = {
16
16
  error,
@@ -7,12 +7,12 @@ Name | Type | Description | Notes
7
7
  ------------ | ------------- | ------------- | -------------
8
8
  **code** | **string** | Error code | [default to undefined]
9
9
  **message** | **string** | Error message | [default to undefined]
10
- **details** | **object** | Additional error details | [optional] [default to undefined]
10
+ **details** | **string** | Additional error details | [optional] [default to undefined]
11
11
 
12
12
  ## Example
13
13
 
14
14
  ```typescript
15
- import { ErrorResponseError } from '@kalshi/trading-api';
15
+ import { ErrorResponseError } from 'kalshi-typescript';
16
16
 
17
17
  const instance: ErrorResponseError = {
18
18
  code,
package/docs/Event.md CHANGED
@@ -15,7 +15,7 @@ Name | Type | Description | Notes
15
15
  ## Example
16
16
 
17
17
  ```typescript
18
- import { Event } from '@kalshi/trading-api';
18
+ import { Event } from 'kalshi-typescript';
19
19
 
20
20
  const instance: Event = {
21
21
  event_ticker,
@@ -0,0 +1,38 @@
1
+ # EventPosition
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **event_ticker** | **string** | Unique identifier for events. | [optional] [default to undefined]
9
+ **total_cost** | **number** | Total spent on this event in cents. | [optional] [default to undefined]
10
+ **total_cost_dollars** | **string** | Total spent on this event in dollars. | [optional] [default to undefined]
11
+ **event_exposure** | **number** | Cost of the aggregate event position in cents. | [optional] [default to undefined]
12
+ **event_exposure_dollars** | **string** | Cost of the aggregate event position in dollars. | [optional] [default to undefined]
13
+ **realized_pnl** | **number** | Locked in profit and loss, in cents. | [optional] [default to undefined]
14
+ **realized_pnl_dollars** | **string** | Locked in profit and loss, in dollars. | [optional] [default to undefined]
15
+ **resting_order_count** | **number** | Aggregate size of resting orders in contract units. | [optional] [default to undefined]
16
+ **fees_paid** | **number** | Fees paid on fill orders, in cents. | [optional] [default to undefined]
17
+ **fees_paid_dollars** | **string** | Fees paid on fill orders, in dollars. | [optional] [default to undefined]
18
+
19
+ ## Example
20
+
21
+ ```typescript
22
+ import { EventPosition } from 'kalshi-typescript';
23
+
24
+ const instance: EventPosition = {
25
+ event_ticker,
26
+ total_cost,
27
+ total_cost_dollars,
28
+ event_exposure,
29
+ event_exposure_dollars,
30
+ realized_pnl,
31
+ realized_pnl_dollars,
32
+ resting_order_count,
33
+ fees_paid,
34
+ fees_paid_dollars,
35
+ };
36
+ ```
37
+
38
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
package/docs/EventsApi.md CHANGED
@@ -19,9 +19,12 @@ Get data about an event by its ticker. An event represents a real-world occurre
19
19
  import {
20
20
  EventsApi,
21
21
  Configuration
22
- } from '@kalshi/trading-api';
22
+ } from 'kalshi-typescript';
23
23
 
24
- const configuration = new Configuration();
24
+ const configuration = new Configuration({
25
+ apiKey: 'your-api-key-id',
26
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
27
+ });
25
28
  const apiInstance = new EventsApi(configuration);
26
29
 
27
30
  let eventTicker: string; //Event ticker (default to undefined)
@@ -76,9 +79,12 @@ Get metadata about an event by its ticker
76
79
  import {
77
80
  EventsApi,
78
81
  Configuration
79
- } from '@kalshi/trading-api';
82
+ } from 'kalshi-typescript';
80
83
 
81
- const configuration = new Configuration();
84
+ const configuration = new Configuration({
85
+ apiKey: 'your-api-key-id',
86
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
87
+ });
82
88
  const apiInstance = new EventsApi(configuration);
83
89
 
84
90
  let eventTicker: string; //Event ticker (default to undefined)
@@ -130,9 +136,12 @@ Get data about all events. An event represents a real-world occurrence that can
130
136
  import {
131
137
  EventsApi,
132
138
  Configuration
133
- } from '@kalshi/trading-api';
139
+ } from 'kalshi-typescript';
134
140
 
135
- const configuration = new Configuration();
141
+ const configuration = new Configuration({
142
+ apiKey: 'your-api-key-id',
143
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
144
+ });
136
145
  const apiInstance = new EventsApi(configuration);
137
146
 
138
147
  let limit: number; //Number of results per page. Defaults to 100. Maximum value is 200. (optional) (default to 100)
@@ -20,9 +20,12 @@ Get all exchange-wide announcements
20
20
  import {
21
21
  ExchangeApi,
22
22
  Configuration
23
- } from '@kalshi/trading-api';
23
+ } from 'kalshi-typescript';
24
24
 
25
- const configuration = new Configuration();
25
+ const configuration = new Configuration({
26
+ apiKey: 'your-api-key-id',
27
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
28
+ });
26
29
  const apiInstance = new ExchangeApi(configuration);
27
30
 
28
31
  const { status, data } = await apiInstance.getExchangeAnnouncements();
@@ -65,9 +68,12 @@ Get the exchange schedule
65
68
  import {
66
69
  ExchangeApi,
67
70
  Configuration
68
- } from '@kalshi/trading-api';
71
+ } from 'kalshi-typescript';
69
72
 
70
- const configuration = new Configuration();
73
+ const configuration = new Configuration({
74
+ apiKey: 'your-api-key-id',
75
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
76
+ });
71
77
  const apiInstance = new ExchangeApi(configuration);
72
78
 
73
79
  const { status, data } = await apiInstance.getExchangeSchedule();
@@ -110,9 +116,12 @@ Get the exchange status
110
116
  import {
111
117
  ExchangeApi,
112
118
  Configuration
113
- } from '@kalshi/trading-api';
119
+ } from 'kalshi-typescript';
114
120
 
115
- const configuration = new Configuration();
121
+ const configuration = new Configuration({
122
+ apiKey: 'your-api-key-id',
123
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
124
+ });
116
125
  const apiInstance = new ExchangeApi(configuration);
117
126
 
118
127
  const { status, data } = await apiInstance.getExchangeStatus();
@@ -147,7 +156,7 @@ No authorization required
147
156
  # **getUserDataTimestamp**
148
157
  > GetUserDataTimestampResponse getUserDataTimestamp()
149
158
 
150
- There is typically a short delay before exchange events are reflected in the API endpoints. Whenever possible, combine API responses to PUT/POST/DELETE requests with websocket data to obtain the most accurate view of the exchange state. This endpoint provides an approximate indication of when the data from the following endpoints was last validated: GetBalance, GetOrder(s), GetFills, GetPositions
159
+ There is typically a short delay before exchange events are reflected in the API endpoints. Whenever possible, combine API responses to PUT/POST/DELETE requests with websocket data to obtain the most accurate view of the exchange state. This endpoint provides an approximate indication of when the data from the following endpoints was last validated: GetBalance, GetOrder(s), GetFills, GetPositions
151
160
 
152
161
  ### Example
153
162
 
@@ -155,9 +164,12 @@ There is typically a short delay before exchange events are reflected in the API
155
164
  import {
156
165
  ExchangeApi,
157
166
  Configuration
158
- } from '@kalshi/trading-api';
167
+ } from 'kalshi-typescript';
159
168
 
160
- const configuration = new Configuration();
169
+ const configuration = new Configuration({
170
+ apiKey: 'your-api-key-id',
171
+ privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
172
+ });
161
173
  const apiInstance = new ExchangeApi(configuration);
162
174
 
163
175
  const { status, data } = await apiInstance.getUserDataTimestamp();
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
11
11
  ## Example
12
12
 
13
13
  ```typescript
14
- import { ExchangeStatus } from '@kalshi/trading-api';
14
+ import { ExchangeStatus } from 'kalshi-typescript';
15
15
 
16
16
  const instance: ExchangeStatus = {
17
17
  exchange_active,
package/docs/Fill.md CHANGED
@@ -18,7 +18,7 @@ Name | Type | Description | Notes
18
18
  ## Example
19
19
 
20
20
  ```typescript
21
- import { Fill } from '@kalshi/trading-api';
21
+ import { Fill } from 'kalshi-typescript';
22
22
 
23
23
  const instance: Fill = {
24
24
  fill_id,
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { GenerateApiKeyRequest } from '@kalshi/trading-api';
13
+ import { GenerateApiKeyRequest } from 'kalshi-typescript';
14
14
 
15
15
  const instance: GenerateApiKeyRequest = {
16
16
  name,
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
11
11
  ## Example
12
12
 
13
13
  ```typescript
14
- import { GenerateApiKeyResponse } from '@kalshi/trading-api';
14
+ import { GenerateApiKeyResponse } from 'kalshi-typescript';
15
15
 
16
16
  const instance: GenerateApiKeyResponse = {
17
17
  api_key_id,
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { GetApiKeysResponse } from '@kalshi/trading-api';
13
+ import { GetApiKeysResponse } from 'kalshi-typescript';
14
14
 
15
15
  const instance: GetApiKeysResponse = {
16
16
  api_keys,
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { GetBalanceResponse } from '@kalshi/trading-api';
13
+ import { GetBalanceResponse } from 'kalshi-typescript';
14
14
 
15
15
  const instance: GetBalanceResponse = {
16
16
  balance,
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { GetCommunicationsIDResponse } from '@kalshi/trading-api';
13
+ import { GetCommunicationsIDResponse } from 'kalshi-typescript';
14
14
 
15
15
  const instance: GetCommunicationsIDResponse = {
16
16
  communications_id,