Repository navigation
feat(incentive_programs): incentive schedules + series/event filters (#580) — 22.13.0 - #581
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 #580
Reconciles the 2026-11-12 spec drift (Spec Drift Detection run 43237744594) and releases as 22.13.0 (additive minor).
Changes
incentive_programs.list_schedules()(sync + async) —GET /incentive_schedules, returnslist[IncentiveSchedule]. New modelsIncentiveSchedule,GetIncentiveSchedulesResponse(exported). Public GET, normal GET retry.incentive_programs.list/list_all(sync + async): new keyword-only optionalseries_ticker,event_tickerquery params, sent only when set.IncentiveProgram: new optionalseries_ticker,event_tickerfields.GetMarginBalanceResponse.settled_funds→DollarDecimal | None(spec dropped it from required; omitted for subaccount-restricted keys).PerpsLastUpdateReasongainsCloseCancel,HaltCancel,SettlementBoundsCancel(spec enum; the first two were already missing).subaccountparam inlined (same name/type) and description-only text changes: no code change.METHOD_ENDPOINT_MAPentry for/incentive_schedules;_contract_map.pyentries for both new models;server_omits_despite_requiredexclusions forIncentiveSchedule.event_ticker/event_title(empty for whole-series schedules) andGetIncentiveSchedulesResponse.schedules(defaults to[]).docs/resources/incentive-programs.md, op counts (137 mapped of 138) in README / docs/index.md / CLAUDE.md, CHANGELOG 22.13.0. Version bump inpyproject.toml+kalshi/__init__.py.Blast radius (hand-written; GitNexus unavailable)
IncentiveProgramsResource/AsyncIncentiveProgramsResource: new kwargs are keyword-only withNonedefaults — existing calls send identical requests. New method is additive.IncentiveProgram: two optional fields; existing payloads parse unchanged.GetMarginBalanceResponse.settled_funds: nowOptional. Runtime: payloads that previously raised validation errors (restricted keys) now parse. Typing: strict-mypy callers doing arithmetic on it may need aNonecheck. Only consumer in SDK is the perps margin account resource (returns the model as-is).PerpsLastUpdateReason: Literal widened; only used by the perps WS orderbook delta model. Previously these values failed validation.kalshi/_generated/(gitignored, regenerated).Gates (local)
uv run ruff check .— passuv run mypy kalshi/— pass (162 files)uv run pytest tests/ --ignore=tests/integration -q— 5251 passed, 3 skippeduv run pytest tests/test_contracts.py -W error::UserWarning— 960 passed