Skip to content

feat(markets): weather point markets (#578) — 22.12.0 - #579

Merged
TexasCoding merged 2 commits into
mainfrom
fix/578-weather-point-markets
Nov 11, 2026
Merged

TexasCoding merged 2 commits into
mainfrom
fix/578-weather-point-markets

Conversation

@TexasCoding

Copy link
Copy Markdown
Owner

Closes #578

Spec Drift Detection run 43029001489 went red: test_every_spec_endpoint_is_mapped[core] flagged two new core operations (OpenAPI v3.36.0).

What changed (user-facing, additive → 22.12.0)

  • client.markets.create_weather_point_market(...) (sync + async) — POST /weather_point_markets. Authenticated, never retried. Accepts request=CreateWeatherPointMarketRequest(...) or keyword fields (same overload pattern as multivariate.create_market). Request model is extra="forbid"; unset floor_value/cap_value are omitted.
  • client.markets.weather_point_availability() (sync + async) — GET /weather_point_markets/availability. Public.
  • New models exported from kalshi / kalshi.models: CreateWeatherPointMarketRequest, CreateWeatherPointMarketResponse, GetWeatherPointAvailabilityResponse, WeatherPointDomain, WeatherPointVariableAvailability, WeatherPointVariableLiteral. List fields use NullableList (null → []).
  • Spec sync: specs/openapi.yaml (the two operations + 6 schemas); specs/perps_scm_openapi.yaml description-only (markdown links). No perps / AsyncAPI changes.
  • Docs: docs/resources/markets.md section + table rows; operation counts in README / docs/index.md / CLAUDE.md updated to 136 of 137 (v3.36.0). CHANGELOG ## 22.12.0 — 2026-11-11; version bumped in pyproject.toml and kalshi/__init__.py.

Blast radius (hand-written; GitNexus unavailable)

  • kalshi/resources/markets.py: two new methods on MarketsResource / AsyncMarketsResource + one module-private body builder. No existing method touched; reuses _check_request_exclusive, _post, _get, _require_auth.
  • kalshi/models/markets.py: new classes appended; existing models untouched.
  • kalshi/models/__init__.py, kalshi/__init__.py: new exports only.
  • kalshi/_contract_map.py, tests/_contract_support.py, tests/test_contracts.py: new entries only.
  • No changes to transport, retry, auth, WS, perps, FIX, or kalshi/_generated/.

Gates (local)

  • uv run ruff check . — pass
  • uv run mypy kalshi/ — pass (162 files)
  • uv run pytest tests/ --ignore=tests/integration -q — 5219 passed, 3 skipped
  • uv run pytest tests/test_contracts.py -W error::UserWarning — 954 passed
  • New tests/test_weather_point_markets.py: happy / error (409, 400) / edge (request form, exclusivity, missing fields, forbid, no retry on 503, empty + null lists), sync + async.

@TexasCoding
TexasCoding merged commit a6b0e88 into main Nov 11, 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-11)

1 participant