Repository navigation
feat(markets): concert cancellation markets + perps estimate quantity_fp (#582) — 22.14.0 - #583
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 #582
Reconciles the 2026-11-13 Spec Drift Detection failure (run 43436779911). Release: 22.14.0 (minor, additive only).
What changed
markets), sync + async onmarkets:create_concert_cancellation_market(...)→POST /concert_cancellation_markets(auth, never retried;request=model or keyword fields; bodyCreateConcertCancellationMarketRequest,extra="forbid")concert_cancellation_availability(*, date_from=None, date_to=None)→GET /concert_cancellation_markets/availability(public)list_concerts(*, metro_id, date_from=None, date_to=None, page=None)→GET /concert_cancellation_markets/concerts(auth)search_concerts(*, q)→GET /concert_cancellation_markets/concerts/search(auth)ConcertCoverLiteral,CreateConcertCancellationMarketRequest/Response,ConcertMetro,GetConcertCancellationAvailabilityResponse,ConcertMarket,Concert,GetConcertsResponse,SearchConcertsResponse(lists areNullableList→[]on null).EstimatePortfolioMaintenanceMarginPosition:quantitynow optional, new optionalquantity_fp(FixedPointCount, sent as a string). At least one is required; zero is rejected.Market.expiration_timedropped upstream, SDK field kept to avoid a breaking change), asyncapi (description-only), perps openapi (description-only), perps_scm.METHOD_ENDPOINT_MAP,BODY_MODEL_MAP,_contract_map.py. Docs:docs/resources/markets.md,docs/perps.md, op counts 141 mapped of 142 (README, docs/index.md, CLAUDE.md), CHANGELOG 22.14.0. Version bump 22.14.0.Blast radius (hand-written; GitNexus unavailable)
kalshi/resources/markets.py: four new methods + one new body-builder helper onMarketsResource/AsyncMarketsResource. No existing method touched. Risk: LOW.kalshi/models/markets.py: new classes appended only. LOW.kalshi/perps/klear/models/margin.pyEstimatePortfolioMaintenanceMarginPosition: used only byperps.klear.margin.estimate_maintenance_margin(sync/async). Existing callers passingquantitybehave unchanged; body unchanged whenquantity_fpunset (exclude_none). Type of.quantitybecomesint | None(only matters for code reading the attribute off a request model). LOW–MEDIUM.kalshi/__init__.py/kalshi/models/__init__.py: additions only.Gates (local, final code)
uv run ruff check .— passeduv run mypy kalshi/— passed (162 files)uv run pytest tests/ --ignore=tests/integration -q— 5352 passed, 3 skippeduv run pytest tests/test_contracts.py -W error::UserWarning— 983 passed