Repository navigation
feat(markets): flight disruption markets + weather/perps drift (#586) — 22.15.0 - #587
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.CreateFlightDisruptionMarketRequest/Response,GetFlightDisruptionAvailabilityResponse,Flight,FlightCoverEvent,GetFlightsResponse,FlightCoverLiteral,FlightDelayBasisLiteral. Spec marks thesex-excluded(pre-launch).end_dateonCreateWeatherPointMarketRequest/create_weather_point_market(omitted when unset; spec marks it optional).GetWeatherPointAvailabilityResponse.max_window_days/max_window_hoursadded as optional withserver_omits_despite_requiredEXCLUSIONS entries.MarginMarketScheduleDetails.kalshi_trading_schedule(newMarginTradingCronSchedule),MarginMarketCandlestick.ask→ newMarginAskDistributionHistorical(nullable OHLC; fixes parse failure when no asks), WSsubaccount_typeon orderbook delta, fill and user order payloads.Blast radius (hand-written; GitNexus unavailable)
MarketsResource/AsyncMarketsResource: three new methods;create_weather_point_marketgains one optional keyword (defaultNone, not serialized) — existing calls unchanged.GetWeatherPointAvailabilityResponse: two new optional fields — no effect on existing parsing.MarginMarketCandlestick.asktype changes toMarginAskDistributionHistorical; ask values are nowDecimal | None. Callers doing arithmetic under strict mypy may need aNonecheck;isinstance(c.ask, BidAskDistributionHistorical)would now be False.bidunchanged. Consumers:perps.markets.candlesticksparsing only.SubaccountTypeLiteraldocstring only. No removals/renames;kalshi/_generated/regenerated only.Gates
uv run ruff check .— passuv run mypy kalshi/— pass (162 files)uv run pytest tests/ --ignore=tests/integration -q— 5,449 passed, 3 skippeduv run pytest tests/test_contracts.py -W error::UserWarning— 1,002 passed