|
2 | 2 |
|
3 | 3 | All notable changes to kalshi-sdk will be documented in this file. |
4 | 4 |
|
| 5 | +## 6.0.0 — 2026-07-04 |
| 6 | + |
| 7 | +Syncs the upstream OpenAPI/AsyncAPI specs **3.22.0 → 3.23.0** (#463). The |
| 8 | +headline change is **breaking**: Kalshi removed the multivariate lookup-history |
| 9 | +endpoint from the spec, so the SDK removes the corresponding method and model. |
| 10 | +Every other change is additive and backward-compatible. |
| 11 | + |
| 12 | +### Removed (breaking) |
| 13 | + |
| 14 | +- **`lookup_history()`** on `client.multivariate_collections` (sync + async) and |
| 15 | + the **`LookupPoint`** model (no longer exported from `kalshi` / |
| 16 | + `kalshi.models`). Upstream removed the backing `GET |
| 17 | + /multivariate_event_collections/{collection_ticker}/lookup` operation |
| 18 | + (`GetMultivariateEventCollectionLookupHistory`) and the `LookupPoint` schema in |
| 19 | + 3.23.0 — the endpoint now 404s. The `lookup_tickers()` sibling (the `PUT` on the |
| 20 | + same path) is unaffected. |
| 21 | + |
| 22 | +### Added |
| 23 | + |
| 24 | +- **`ApiKey.subaccount`**, **`CreateApiKeyRequest.subaccount`**, |
| 25 | + **`GenerateApiKeyRequest.subaccount`** (`int | None`) — when set, restricts the |
| 26 | + API key to a single subaccount. `api_keys.create()` / `generate()` (sync + |
| 27 | + async) accept a `subaccount` kwarg that threads into the body. The request |
| 28 | + models bound it to the spec's `0-63` range (`ge=0, le=63`) client-side; the |
| 29 | + response model stays permissive. |
| 30 | +- **`ApplySubaccountTransferRequest.exchange_index`** (`int | None`) — exchange |
| 31 | + shard to apply the transfer on (spec `ExchangeIndex`; defaults to 0). |
| 32 | +- **`SubaccountTransfer`** additive fields: `exchange_index` and `transfer_type` |
| 33 | + (`"cash"`/`"position"`, both required), plus the position-transfer-only |
| 34 | + `market_ticker` / `side` (`"yes"`/`"no"`) / `count` / `price_cents`. |
| 35 | +- **`MarginPosition.is_portfolio`** and **`MarginRiskPosition.is_portfolio`** |
| 36 | + (`bool`, required) — true when the position is hedged within a portfolio. |
| 37 | +- **`MarginOrder.order_reason`** (`"liquidation"`/`"take_profit_stop_loss"`, |
| 38 | + optional) — reason for a system-generated order. |
| 39 | +- **`MarketLifecyclePayload.price_ranges`** (WS `market_lifecycle_v2`) — valid |
| 40 | + price bands emitted alongside `price_level_structure`. |
| 41 | +- **`subaccounts.transfer_position(...)`** (sync + async) — new |
| 42 | + `POST /portfolio/subaccounts/positions/transfer` endpoint (spec 3.23.0): moves |
| 43 | + an open **position** (contracts) between subaccounts, distinct from the |
| 44 | + cash-only `transfer()`. Returns `ApplySubaccountPositionTransferResponse` |
| 45 | + (`position_transfer_id`). New models `ApplySubaccountPositionTransferRequest` / |
| 46 | + `ApplySubaccountPositionTransferResponse` are exported from `kalshi` / |
| 47 | + `kalshi.models`. |
| 48 | +- **`subaccounts.create(exchange_index=...)`** — `POST /portfolio/subaccounts` |
| 49 | + gained an optional `CreateSubaccountRequest` body (spec 3.23.0); `create()` |
| 50 | + now accepts an optional `exchange_index` to target a specific exchange shard. |
| 51 | + New `CreateSubaccountRequest` model exported from `kalshi` / `kalshi.models`. |
| 52 | + |
| 53 | +### Fixed |
| 54 | + |
| 55 | +- **Defensive optional-ization of fields 3.23.0 removed/relaxed.** The drift |
| 56 | + suite is spec→SDK only, so a field the spec drops but the SDK still *requires* |
| 57 | + is a latent `ValidationError` if the server stops emitting it. Three such |
| 58 | + fields are now `... | None = None`: |
| 59 | + - `Market.fractional_trading_enabled` (removed from spec), |
| 60 | + - `MarketPosition.resting_orders_count` (removed from spec), |
| 61 | + - `MarginPosition.margin_used` (relaxed from required to optional). |
| 62 | + |
5 | 63 | ## 5.0.1 — 2026-06-27 |
6 | 64 |
|
7 | 65 | Spec-drift catch-up (#460). Kalshi added fields to the `ExchangeStatus` schema |
|
0 commit comments