Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

All notable changes to kalshi-sdk will be documented in this file.

## 7.1.0 — 2026-07-17

Syncs the upstream OpenAPI/AsyncAPI specs **3.24.0 → 3.25.0** (Closes #475).
Additive only — no breaking public-API changes.

### Added

- **`MarginMarket.schedule`** (perps) — required field on margin market responses.
Typed as `MarginMarketSchedule | None` (null for markets that trade 24/7).
Nested `MarginMarketSchedule` exposes `is_open: bool` and
`next_close_ts` / `next_open_ts` (`int | None`, Unix epoch seconds; null
while the corresponding phase is active). Exported from `kalshi.perps` and
`kalshi.perps.models`.

### Spec notes

- Core OpenAPI gained `POST /portfolio/intra_exchange_instance_transfer`
(same path/schema as the perps transfer). The endpoint is still marked
**currently not available** upstream; the core client records it in
`_UNIMPLEMENTED_ENDPOINTS`. Use
`PerpsClient.transfers.transfer_instance()` for the margin product surface.

## 7.0.0 — 2026-07-10

Syncs the upstream OpenAPI/AsyncAPI specs **3.23.0 → 3.24.0** (Closes #467, #470).
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ tests/

## API Reference

- OpenAPI spec: https://docs.kalshi.com/openapi.yaml (v3.24.0, 101 operations)
- OpenAPI spec: https://docs.kalshi.com/openapi.yaml (v3.25.0, 102 operations; 101 mapped in the core SDK — `POST /portfolio/intra_exchange_instance_transfer` is currently not available upstream)
- AsyncAPI spec: https://docs.kalshi.com/asyncapi.yaml (13 WebSocket channels)
- Base URL: https://api.elections.kalshi.com/trade-api/v2
- Demo URL: https://demo-api.kalshi.co/trade-api/v2
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ A professional, spec-first Python SDK for the [Kalshi](https://kalshi.com) predi
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Type checked: mypy strict](https://img.shields.io/badge/mypy-strict-blue.svg)](https://mypy.readthedocs.io/)

- **Full coverage** of the Kalshi REST API (101 operations across 19 resources, OpenAPI v3.24.0) and WebSocket API (12 typed `subscribe_*` channels + 2 escape-hatch).
- **Perps (margin) API**: standalone `PerpsClient` / `AsyncPerpsClient` + `PerpsWebSocket` for the perpetual-futures exchange (34 REST operations, 6 WS channels), plus a `KlearClient` for the Self-Clearing-Member "Klear" settlement API (9 operations). See [Perps (margin) trading](#perps-margin-trading).
- **Full coverage** of the Kalshi REST API (101 operations across 19 resources, OpenAPI v3.25.0) and WebSocket API (12 typed `subscribe_*` channels + 2 escape-hatch).
- **Perps (margin) API**: standalone `PerpsClient` / `AsyncPerpsClient` + `PerpsWebSocket` for the perpetual-futures exchange (35 REST operations, 6 WS channels), plus a `KlearClient` for the Self-Clearing-Member "Klear" settlement API (11 operations). See [Perps (margin) trading](#perps-margin-trading).
- **FIX protocol**: an async-first FIX engine (FIXT.1.1 / FIX50SP2) for both products — order-entry, drop-copy, market-data, post-trade (prediction), and RFQ (prediction) sessions (plus order-group management over the order-entry session) with typed message models, sequence recovery, and order-book / settlement reassembly. `from kalshi import FixClient` / `MarginFixClient`. See [FIX protocol](#fix-protocol-low-latency-trading).
- **V2 event-market orders**: `create_v2` / `amend_v2` / `decrease_v2` / `cancel_v2` plus batched variants on `/portfolio/events/orders/*` — the only order-write surface.
- **Funding & cost introspection**: `portfolio.deposits()`, `portfolio.withdrawals()`, `account.endpoint_costs()`.
Expand Down
10 changes: 10 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## Shipped

- **v7.1.0 (2026-07-17)** — OpenAPI sync v3.24.0 → v3.25.0 (#475 / #476).
Additive: `MarginMarket.schedule` + nested `MarginMarketSchedule` (null for
24/7 markets). Core `POST /portfolio/intra_exchange_instance_transfer`
recorded unimplemented (currently not available; live on
`PerpsClient.transfers.transfer_instance`).
- **v7.0.0 (2026-07-10)** — OpenAPI sync v3.23.0 → v3.24.0 (#467 / #470 / #472).
**Breaking:** position-transfer `price_cents` → `price` (fixed-point dollars).
Soft-deprecate `exchange.announcements()`. Additive endpoints and fields
(RFQ-scoped quote get, Klear active-obligations plural + settlement-by-asset-class,
`portfolio.balance(exchange_index=)`, etc.).
- **v6.0.0 (2026-07-04)** — OpenAPI sync v3.22.0 → v3.23.0 (#463). **Breaking:**
removed the multivariate lookup-history endpoint (`lookup_history()` +
`LookupPoint`), deleted upstream. Additive: subaccount-scoped API keys
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A professional, spec-first Python SDK for the [Kalshi](https://kalshi.com) prediction
markets API.

- **Full REST coverage** — 101 operations across 19 resources (OpenAPI v3.24.0),
- **Full REST coverage** — 101 operations across 19 resources (OpenAPI v3.25.0),
every kwarg drift-tested against the spec.
- **V2 event-market orders** — new `create_v2` / `amend_v2` / `decrease_v2` /
`cancel_v2` family on `/portfolio/events/orders/*`. Legacy `/portfolio/orders`
Expand All @@ -15,9 +15,9 @@ markets API.
backpressure strategies, and an in-memory orderbook builder. Async-only —
access via `AsyncKalshiClient.ws`.
- **Perps (margin) API** — standalone `PerpsClient` / `AsyncPerpsClient` +
`PerpsWebSocket` for the perpetual-futures exchange (34 REST operations, 6 WS
`PerpsWebSocket` for the perpetual-futures exchange (35 REST operations, 6 WS
channels), and a `KlearClient` for the Self-Clearing-Member settlement API
(9 operations, Bearer token auth). See [Perps](perps.md).
(11 operations, Bearer token auth). See [Perps](perps.md).
- **FIX protocol** — a hand-rolled, async-first FIX engine (FIXT.1.1 / FIX50SP2)
for both products: order-entry, drop-copy, market-data, post-trade (prediction),
and RFQ (prediction) sessions — plus order-group management over the order-entry
Expand Down
21 changes: 21 additions & 0 deletions docs/migration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Migration

## v7.0 → v7.1.0

Syncs the SDK to OpenAPI/AsyncAPI spec **3.25.0**. **No breaking changes.**

### Added

- **`MarginMarket.schedule`** (`MarginMarketSchedule | None`, required key) —
current trading hours for a margin market. `None` means 24/7. Nested fields:
`is_open`, `next_close_ts`, `next_open_ts` (Unix seconds; nullable by phase).
If you construct `MarginMarket` instances by hand in tests, pass
`schedule=None` or a `MarginMarketSchedule(...)`.

### Deferred

- Core OpenAPI lists `POST /portfolio/intra_exchange_instance_transfer`, still
marked **currently not available**. The core client does not expose it; use
`PerpsClient.transfers.transfer_instance()` on the margin product.

See the [changelog](https://github.com/TexasCoding/kalshi-python-sdk/blob/main/CHANGELOG.md)
for the full list.

## v6 → v7.0.0

Syncs the SDK to OpenAPI/AsyncAPI spec **3.24.0**. One breaking change on the
Expand Down
6 changes: 6 additions & 0 deletions docs/perps.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ Orders create/cancel/decrease/amend are POSTs/DELETEs and are **never retried**.
(`DollarDecimal`, a `FixedPointDollars` USD string) and `ts_ms` (the source
timestamp in epoch **milliseconds**, `int`). All three are absent from the spec
`required` list, so they are `None` when the upstream price is unavailable.
- **Trading schedule** (since the v3.25.0 spec sync / SDK v7.1.0) — `MarginMarket`
carries a **required** `schedule` key typed `MarginMarketSchedule | None`.
`None` means the market trades 24/7. When present, `MarginMarketSchedule` has
`is_open: bool` plus `next_close_ts` / `next_open_ts` (`int | None`, Unix
epoch **seconds**): `next_close_ts` is null while closed, `next_open_ts` is
null while open.
- **Subaccounts** (since the v3.21.0 spec sync) — `MarginPosition` (the
`portfolio.positions()` rows) carries a **required** `subaccount` (`int`)
identifying which subaccount holds the position.
Expand Down
2 changes: 1 addition & 1 deletion kalshi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,4 +379,4 @@
"Withdrawal",
]

__version__ = "7.0.0"
__version__ = "7.1.0"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "kalshi-sdk"
version = "7.0.0"
version = "7.1.0"
description = "A professional Python SDK for the Kalshi prediction markets and Perps (margin) APIs"
readme = "README.md"
license = { text = "MIT" }
Expand Down
Loading