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.
- package/.openapi-generator/FILES +4 -1
- package/.openapi-generator-ignore +9 -1
- package/README.md +6 -3
- 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
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetEventMetadataResponse } from '
|
|
13
|
+
import { GetEventMetadataResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetEventMetadataResponse = {
|
|
16
16
|
metadata,
|
package/docs/GetEventResponse.md
CHANGED
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetExchangeAnnouncementsResponse } from '
|
|
13
|
+
import { GetExchangeAnnouncementsResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetExchangeAnnouncementsResponse = {
|
|
16
16
|
announcements,
|
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetExchangeScheduleResponse } from '
|
|
13
|
+
import { GetExchangeScheduleResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetExchangeScheduleResponse = {
|
|
16
16
|
schedule,
|
|
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
|
|
|
16
16
|
## Example
|
|
17
17
|
|
|
18
18
|
```typescript
|
|
19
|
-
import { GetExchangeScheduleResponseSchedule } from '
|
|
19
|
+
import { GetExchangeScheduleResponseSchedule } from 'kalshi-typescript';
|
|
20
20
|
|
|
21
21
|
const instance: GetExchangeScheduleResponseSchedule = {
|
|
22
22
|
monday,
|
package/docs/GetFillsResponse.md
CHANGED
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetMarketCandlesticksResponse } from '
|
|
13
|
+
import { GetMarketCandlesticksResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetMarketCandlesticksResponse = {
|
|
16
16
|
candlesticks,
|
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetMarketOrderbookResponse } from '
|
|
13
|
+
import { GetMarketOrderbookResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetMarketOrderbookResponse = {
|
|
16
16
|
orderbook,
|
|
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { GetMarketOrderbookResponseOrderbook } from '
|
|
14
|
+
import { GetMarketOrderbookResponseOrderbook } from 'kalshi-typescript';
|
|
15
15
|
|
|
16
16
|
const instance: GetMarketOrderbookResponseOrderbook = {
|
|
17
17
|
_true,
|
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetMultivariateEventCollectionResponse } from '
|
|
13
|
+
import { GetMultivariateEventCollectionResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetMultivariateEventCollectionResponse = {
|
|
16
16
|
collection,
|
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetMultivariateEventCollectionsResponse } from '
|
|
13
|
+
import { GetMultivariateEventCollectionsResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetMultivariateEventCollectionsResponse = {
|
|
16
16
|
collections,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# GetOrderGroupResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**is_auto_cancel_enabled** | **boolean** | Whether auto-cancel is enabled for this order group | [optional] [default to undefined]
|
|
9
|
+
**orders** | **Array<string>** | List of order IDs that belong to this order group | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { GetOrderGroupResponse } from 'kalshi-typescript';
|
|
15
|
+
|
|
16
|
+
const instance: GetOrderGroupResponse = {
|
|
17
|
+
is_auto_cancel_enabled,
|
|
18
|
+
orders,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { GetOrderGroupsResponse } from '
|
|
14
|
+
import { GetOrderGroupsResponse } from 'kalshi-typescript';
|
|
15
15
|
|
|
16
16
|
const instance: GetOrderGroupsResponse = {
|
|
17
17
|
order_groups,
|
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetOrderQueuePositionResponse } from '
|
|
13
|
+
import { GetOrderQueuePositionResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetOrderQueuePositionResponse = {
|
|
16
16
|
queue_position,
|
package/docs/GetOrderResponse.md
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
Name | Type | Description | Notes
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**order** | [**Order**](Order.md) | | [
|
|
8
|
+
**order** | [**Order**](Order.md) | | [default to undefined]
|
|
9
9
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetOrderResponse } from '
|
|
13
|
+
import { GetOrderResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetOrderResponse = {
|
|
16
16
|
order,
|
|
@@ -5,16 +5,18 @@
|
|
|
5
5
|
|
|
6
6
|
Name | Type | Description | Notes
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**
|
|
8
|
+
**market_positions** | [**Array<Position>**](Position.md) | | [optional] [default to undefined]
|
|
9
|
+
**event_positions** | [**Array<EventPosition>**](EventPosition.md) | | [optional] [default to undefined]
|
|
9
10
|
**cursor** | **string** | | [optional] [default to undefined]
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
13
14
|
```typescript
|
|
14
|
-
import { GetPositionsResponse } from '
|
|
15
|
+
import { GetPositionsResponse } from 'kalshi-typescript';
|
|
15
16
|
|
|
16
17
|
const instance: GetPositionsResponse = {
|
|
17
|
-
|
|
18
|
+
market_positions,
|
|
19
|
+
event_positions,
|
|
18
20
|
cursor,
|
|
19
21
|
};
|
|
20
22
|
```
|
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetQueuePositionsRequest } from '
|
|
13
|
+
import { GetQueuePositionsRequest } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetQueuePositionsRequest = {
|
|
16
16
|
order_ids,
|
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetQueuePositionsResponse } from '
|
|
13
|
+
import { GetQueuePositionsResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetQueuePositionsResponse = {
|
|
16
16
|
queue_positions,
|
package/docs/GetQuoteResponse.md
CHANGED
package/docs/GetRFQResponse.md
CHANGED
package/docs/GetRFQsResponse.md
CHANGED
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetSeriesByTickerResponse } from '
|
|
13
|
+
import { GetSeriesByTickerResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetSeriesByTickerResponse = {
|
|
16
16
|
series,
|
|
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { GetSettlementsResponse } from '
|
|
14
|
+
import { GetSettlementsResponse } from 'kalshi-typescript';
|
|
15
15
|
|
|
16
16
|
const instance: GetSettlementsResponse = {
|
|
17
17
|
settlements,
|
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetStructuredTargetResponse } from '
|
|
13
|
+
import { GetStructuredTargetResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetStructuredTargetResponse = {
|
|
16
16
|
structured_target,
|
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetStructuredTargetsResponse } from '
|
|
13
|
+
import { GetStructuredTargetsResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetStructuredTargetsResponse = {
|
|
16
16
|
structured_targets,
|
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetTotalRestingOrderValueResponse } from '
|
|
13
|
+
import { GetTotalRestingOrderValueResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetTotalRestingOrderValueResponse = {
|
|
16
16
|
total_resting_order_value,
|
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import { GetUserDataTimestampResponse } from '
|
|
13
|
+
import { GetUserDataTimestampResponse } from 'kalshi-typescript';
|
|
14
14
|
|
|
15
15
|
const instance: GetUserDataTimestampResponse = {
|
|
16
16
|
timestamp,
|
|
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { LookupBundleRequestBundleInner } from '
|
|
14
|
+
import { LookupBundleRequestBundleInner } from 'kalshi-typescript';
|
|
15
15
|
|
|
16
16
|
const instance: LookupBundleRequestBundleInner = {
|
|
17
17
|
ticker,
|
package/docs/Market.md
CHANGED
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,
|