Skip to content

feat(markets): flight disruption markets + weather/perps drift (#586) — 22.15.0 - #587

Merged
TexasCoding merged 2 commits into
mainfrom
fix/586-flight-disruption
Nov 19, 2026
Merged

TexasCoding merged 2 commits into
mainfrom
fix/586-flight-disruption

Conversation

@TexasCoding

Copy link
Copy Markdown
Owner

Closes #586

Reconciles the 2026-11-19 spec drift (core OpenAPI 3.36.0 → 3.37.0, AsyncAPI, perps, perps SCM). Release 22.15.0 (minor, additive).

What changed

  • Flight disruption markets (sync + async, on markets):
    • create_flight_disruption_market(...) — POST /flight_disruption_markets, authenticated, extra="forbid" request model (request= or keyword fields), never retried.
    • flight_disruption_availability() — GET /flight_disruption_markets/availability, public.
    • list_flights(*, carrier, flight_number, date) — GET /flight_disruption_markets/flights, authenticated.
    • New models CreateFlightDisruptionMarketRequest/Response, GetFlightDisruptionAvailabilityResponse, Flight, FlightCoverEvent, GetFlightsResponse, FlightCoverLiteral, FlightDelayBasisLiteral. Spec marks these x-excluded (pre-launch).
  • Weather point: optional end_date on CreateWeatherPointMarketRequest / create_weather_point_market (omitted when unset; spec marks it optional). GetWeatherPointAvailabilityResponse.max_window_days / max_window_hours added as optional with server_omits_despite_required EXCLUSIONS entries.
  • Perps: MarginMarketScheduleDetails.kalshi_trading_schedule (new MarginTradingCronSchedule), MarginMarketCandlestick.ask → new MarginAskDistributionHistorical (nullable OHLC; fixes parse failure when no asks), WS subaccount_type on orderbook delta, fill and user order payloads.
  • Docs: markets.md, perps.md, op counts (145 ops / 144 mapped, v3.37.0), CHANGELOG 22.15.0, version bump.

Blast radius (hand-written; GitNexus unavailable)

  • MarketsResource / AsyncMarketsResource: three new methods; create_weather_point_market gains one optional keyword (default None, not serialized) — existing calls unchanged.
  • GetWeatherPointAvailabilityResponse: two new optional fields — no effect on existing parsing.
  • MarginMarketCandlestick.ask type changes to MarginAskDistributionHistorical; ask values are now Decimal | None. Callers doing arithmetic under strict mypy may need a None check; isinstance(c.ask, BidAskDistributionHistorical) would now be False. bid unchanged. Consumers: perps.markets.candlesticks parsing only.
  • Perps WS payloads: one new optional field each (extra="allow" already tolerated it).
  • SubaccountTypeLiteral docstring only. No removals/renames; kalshi/_generated/ regenerated only.

Gates

  • uv run ruff check . — pass
  • uv run mypy kalshi/ — pass (162 files)
  • uv run pytest tests/ --ignore=tests/integration -q — 5,449 passed, 3 skipped
  • uv run pytest tests/test_contracts.py -W error::UserWarning — 1,002 passed

@TexasCoding
TexasCoding merged commit 093bda8 into main Nov 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nightly spec-drift: strict contract tests failing (since 2026-11-19)

1 participant