kalshi-typescript 2.1.1 → 2.1.3
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/api-keys-api.ts +5 -5
- package/api/communications-api.ts +12 -12
- package/api/events-api.ts +4 -4
- package/api/exchange-api.ts +9 -9
- package/api/markets-api.ts +10 -10
- package/api/milestones-api.ts +3 -3
- package/api/multivariate-collections-api.ts +4 -4
- package/api/portfolio-api.ts +95 -21
- package/api/series-api.ts +3 -3
- package/api/structured-targets-api.ts +3 -3
- 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/api-keys-api.js +8 -8
- package/dist/api/communications-api.d.ts +11 -11
- package/dist/api/communications-api.js +22 -22
- package/dist/api/events-api.d.ts +3 -3
- package/dist/api/events-api.js +6 -6
- package/dist/api/exchange-api.d.ts +8 -8
- package/dist/api/exchange-api.js +12 -12
- package/dist/api/markets-api.d.ts +9 -9
- package/dist/api/markets-api.js +14 -14
- package/dist/api/milestones-api.d.ts +2 -2
- package/dist/api/milestones-api.js +4 -4
- package/dist/api/multivariate-collections-api.d.ts +3 -3
- package/dist/api/multivariate-collections-api.js +6 -6
- package/dist/api/portfolio-api.d.ts +52 -19
- package/dist/api/portfolio-api.js +107 -39
- package/dist/api/series-api.d.ts +2 -2
- package/dist/api/series-api.js +4 -4
- package/dist/api/structured-targets-api.d.ts +2 -2
- package/dist/api/structured-targets-api.js +4 -4
- 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/api-keys-api.js +9 -9
- package/dist/esm/api/communications-api.d.ts +11 -11
- package/dist/esm/api/communications-api.js +23 -23
- package/dist/esm/api/events-api.d.ts +3 -3
- package/dist/esm/api/events-api.js +7 -7
- package/dist/esm/api/exchange-api.d.ts +8 -8
- package/dist/esm/api/exchange-api.js +13 -13
- package/dist/esm/api/markets-api.d.ts +9 -9
- package/dist/esm/api/markets-api.js +15 -15
- package/dist/esm/api/milestones-api.d.ts +2 -2
- package/dist/esm/api/milestones-api.js +5 -5
- package/dist/esm/api/multivariate-collections-api.d.ts +3 -3
- package/dist/esm/api/multivariate-collections-api.js +7 -7
- package/dist/esm/api/portfolio-api.d.ts +52 -19
- package/dist/esm/api/portfolio-api.js +108 -40
- package/dist/esm/api/series-api.d.ts +2 -2
- package/dist/esm/api/series-api.js +5 -5
- package/dist/esm/api/structured-targets-api.d.ts +2 -2
- package/dist/esm/api/structured-targets-api.js +5 -5
- 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/MarketsApi.md
CHANGED
|
@@ -21,9 +21,12 @@ Get a single market by its ticker. A market represents a specific binary outcom
|
|
|
21
21
|
import {
|
|
22
22
|
MarketsApi,
|
|
23
23
|
Configuration
|
|
24
|
-
} from '
|
|
24
|
+
} from 'kalshi-typescript';
|
|
25
25
|
|
|
26
|
-
const configuration = new Configuration(
|
|
26
|
+
const configuration = new Configuration({
|
|
27
|
+
apiKey: 'your-api-key-id',
|
|
28
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
29
|
+
});
|
|
27
30
|
const apiInstance = new MarketsApi(configuration);
|
|
28
31
|
|
|
29
32
|
let ticker: string; //Market ticker (default to undefined)
|
|
@@ -75,9 +78,12 @@ Get candlestick data for a market within a series
|
|
|
75
78
|
import {
|
|
76
79
|
MarketsApi,
|
|
77
80
|
Configuration
|
|
78
|
-
} from '
|
|
81
|
+
} from 'kalshi-typescript';
|
|
79
82
|
|
|
80
|
-
const configuration = new Configuration(
|
|
83
|
+
const configuration = new Configuration({
|
|
84
|
+
apiKey: 'your-api-key-id',
|
|
85
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
86
|
+
});
|
|
81
87
|
const apiInstance = new MarketsApi(configuration);
|
|
82
88
|
|
|
83
89
|
let ticker: string; //The series ticker (default to undefined)
|
|
@@ -142,9 +148,12 @@ Get the orderbook for a market
|
|
|
142
148
|
import {
|
|
143
149
|
MarketsApi,
|
|
144
150
|
Configuration
|
|
145
|
-
} from '
|
|
151
|
+
} from 'kalshi-typescript';
|
|
146
152
|
|
|
147
|
-
const configuration = new Configuration(
|
|
153
|
+
const configuration = new Configuration({
|
|
154
|
+
apiKey: 'your-api-key-id',
|
|
155
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
156
|
+
});
|
|
148
157
|
const apiInstance = new MarketsApi(configuration);
|
|
149
158
|
|
|
150
159
|
let ticker: string; //Market ticker (default to undefined)
|
|
@@ -191,7 +200,7 @@ const { status, data } = await apiInstance.getMarketOrderbook(
|
|
|
191
200
|
# **getMarkets**
|
|
192
201
|
> GetMarketsResponse getMarkets()
|
|
193
202
|
|
|
194
|
-
List and discover markets on Kalshi.
|
|
203
|
+
List and discover markets on Kalshi. A market represents a specific binary outcome within an event that users can trade on (e.g., \"Will candidate X win?\"). Markets have yes/no positions, current prices, volume, and settlement rules. This endpoint returns a paginated response. Use the \'limit\' parameter to control page size (1-1000, defaults to 100). The response includes a \'cursor\' field - pass this value in the \'cursor\' parameter of your next request to get the next page. An empty cursor indicates no more pages are available.
|
|
195
204
|
|
|
196
205
|
### Example
|
|
197
206
|
|
|
@@ -199,9 +208,12 @@ List and discover markets on Kalshi. A market represents a specific binary out
|
|
|
199
208
|
import {
|
|
200
209
|
MarketsApi,
|
|
201
210
|
Configuration
|
|
202
|
-
} from '
|
|
211
|
+
} from 'kalshi-typescript';
|
|
203
212
|
|
|
204
|
-
const configuration = new Configuration(
|
|
213
|
+
const configuration = new Configuration({
|
|
214
|
+
apiKey: 'your-api-key-id',
|
|
215
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
216
|
+
});
|
|
205
217
|
const apiInstance = new MarketsApi(configuration);
|
|
206
218
|
|
|
207
219
|
let limit: number; //Number of results per page. Defaults to 100. Maximum value is 1000. (optional) (default to 100)
|
|
@@ -274,9 +286,12 @@ Get all trades for all markets. A trade represents a completed transaction betw
|
|
|
274
286
|
import {
|
|
275
287
|
MarketsApi,
|
|
276
288
|
Configuration
|
|
277
|
-
} from '
|
|
289
|
+
} from 'kalshi-typescript';
|
|
278
290
|
|
|
279
|
-
const configuration = new Configuration(
|
|
291
|
+
const configuration = new Configuration({
|
|
292
|
+
apiKey: 'your-api-key-id',
|
|
293
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
294
|
+
});
|
|
280
295
|
const apiInstance = new MarketsApi(configuration);
|
|
281
296
|
|
|
282
297
|
let limit: number; //Number of results per page. Defaults to 100. Maximum value is 1000. (optional) (default to 100)
|
package/docs/Milestone.md
CHANGED
package/docs/MilestonesApi.md
CHANGED
|
@@ -18,9 +18,12 @@ Get a single milestone by ID
|
|
|
18
18
|
import {
|
|
19
19
|
MilestonesApi,
|
|
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 MilestonesApi(configuration);
|
|
25
28
|
|
|
26
29
|
let milestoneId: string; //Milestone ID (default to undefined)
|
|
@@ -72,9 +75,12 @@ Get all milestones
|
|
|
72
75
|
import {
|
|
73
76
|
MilestonesApi,
|
|
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 MilestonesApi(configuration);
|
|
79
85
|
|
|
80
86
|
let status: string; //Filter by milestone status (optional) (default to undefined)
|
|
@@ -19,9 +19,12 @@ Get a single multivariate event collection by ticker
|
|
|
19
19
|
import {
|
|
20
20
|
MultivariateCollectionsApi,
|
|
21
21
|
Configuration
|
|
22
|
-
} from '
|
|
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 MultivariateCollectionsApi(configuration);
|
|
26
29
|
|
|
27
30
|
let collectionTicker: string; //Collection ticker (default to undefined)
|
|
@@ -73,9 +76,12 @@ Get all multivariate event collections
|
|
|
73
76
|
import {
|
|
74
77
|
MultivariateCollectionsApi,
|
|
75
78
|
Configuration
|
|
76
|
-
} from '
|
|
79
|
+
} from 'kalshi-typescript';
|
|
77
80
|
|
|
78
|
-
const configuration = new Configuration(
|
|
81
|
+
const configuration = new Configuration({
|
|
82
|
+
apiKey: 'your-api-key-id',
|
|
83
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
84
|
+
});
|
|
79
85
|
const apiInstance = new MultivariateCollectionsApi(configuration);
|
|
80
86
|
|
|
81
87
|
let status: string; //Filter by multivariate collection status (optional) (default to undefined)
|
|
@@ -127,9 +133,12 @@ import {
|
|
|
127
133
|
MultivariateCollectionsApi,
|
|
128
134
|
Configuration,
|
|
129
135
|
LookupBundleRequest
|
|
130
|
-
} from '
|
|
136
|
+
} from 'kalshi-typescript';
|
|
131
137
|
|
|
132
|
-
const configuration = new Configuration(
|
|
138
|
+
const configuration = new Configuration({
|
|
139
|
+
apiKey: 'your-api-key-id',
|
|
140
|
+
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
|
|
141
|
+
});
|
|
133
142
|
const apiInstance = new MultivariateCollectionsApi(configuration);
|
|
134
143
|
|
|
135
144
|
let collectionTicker: string; //Collection ticker (default to undefined)
|
|
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
|
|
|
13
13
|
## Example
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { MultivariateEventCollection } from '
|
|
16
|
+
import { MultivariateEventCollection } from 'kalshi-typescript';
|
|
17
17
|
|
|
18
18
|
const instance: MultivariateEventCollection = {
|
|
19
19
|
collection_ticker,
|
|
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
|
|
|
13
13
|
## Example
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { MultivariateEventCollectionEventsInner } from '
|
|
16
|
+
import { MultivariateEventCollectionEventsInner } from 'kalshi-typescript';
|
|
17
17
|
|
|
18
18
|
const instance: MultivariateEventCollectionEventsInner = {
|
|
19
19
|
ticker,
|
package/docs/Order.md
CHANGED
|
@@ -15,7 +15,11 @@ Name | Type | Description | Notes
|
|
|
15
15
|
**yes_price** | **number** | | [optional] [default to undefined]
|
|
16
16
|
**no_price** | **number** | | [optional] [default to undefined]
|
|
17
17
|
**count** | **number** | | [optional] [default to undefined]
|
|
18
|
+
**fill_count** | **number** | The number of contracts that have been filled | [optional] [default to undefined]
|
|
18
19
|
**remaining_count** | **number** | | [optional] [default to undefined]
|
|
20
|
+
**initial_count** | **number** | The initial size of the order (contract units) | [optional] [default to undefined]
|
|
21
|
+
**taker_fees** | **number** | Fees paid on filled taker contracts, in cents | [optional] [default to undefined]
|
|
22
|
+
**maker_fees** | **number** | Fees paid on filled maker contracts, in cents | [optional] [default to undefined]
|
|
19
23
|
**expiration_time** | **string** | | [optional] [default to undefined]
|
|
20
24
|
**created_time** | **string** | | [optional] [default to undefined]
|
|
21
25
|
**updated_time** | **string** | | [optional] [default to undefined]
|
|
@@ -23,7 +27,7 @@ Name | Type | Description | Notes
|
|
|
23
27
|
## Example
|
|
24
28
|
|
|
25
29
|
```typescript
|
|
26
|
-
import { Order } from '
|
|
30
|
+
import { Order } from 'kalshi-typescript';
|
|
27
31
|
|
|
28
32
|
const instance: Order = {
|
|
29
33
|
order_id,
|
|
@@ -36,7 +40,11 @@ const instance: Order = {
|
|
|
36
40
|
yes_price,
|
|
37
41
|
no_price,
|
|
38
42
|
count,
|
|
43
|
+
fill_count,
|
|
39
44
|
remaining_count,
|
|
45
|
+
initial_count,
|
|
46
|
+
taker_fees,
|
|
47
|
+
maker_fees,
|
|
40
48
|
expiration_time,
|
|
41
49
|
created_time,
|
|
42
50
|
updated_time,
|
package/docs/OrderGroup.md
CHANGED
|
@@ -5,21 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
Name | Type | Description | Notes
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**
|
|
9
|
-
**
|
|
10
|
-
**status** | **string** | | [optional] [default to undefined]
|
|
11
|
-
**created_time** | **string** | | [optional] [default to undefined]
|
|
8
|
+
**id** | **string** | Unique identifier for the order group | [default to undefined]
|
|
9
|
+
**is_auto_cancel_enabled** | **boolean** | Whether auto-cancel is enabled for this order group | [optional] [default to undefined]
|
|
12
10
|
|
|
13
11
|
## Example
|
|
14
12
|
|
|
15
13
|
```typescript
|
|
16
|
-
import { OrderGroup } from '
|
|
14
|
+
import { OrderGroup } from 'kalshi-typescript';
|
|
17
15
|
|
|
18
16
|
const instance: OrderGroup = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
status,
|
|
22
|
-
created_time,
|
|
17
|
+
id,
|
|
18
|
+
is_auto_cancel_enabled,
|
|
23
19
|
};
|
|
24
20
|
```
|
|
25
21
|
|
package/docs/OrderbookLevel.md
CHANGED
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