Repository navigation
feat(spec): FCM IM cap, DLP programs, cover market lifecycle — 22.19.0 (#594) - #596
Closed
TexasCoding wants to merge 4 commits into
Closed
TexasCoding wants to merge 4 commits into
TexasCoding wants to merge 4 commits into
Conversation
Add perps FCM account-level IM cap (GET/PUT/DELETE /margin/fcm/im_cap), core GET /dlp_programs, Settlement.value_dollars, Klear obligation_type and withholding fields, WebSocket cover_market_lifecycle plus milestone_updated on market_lifecycle_v2. Additive only; PUT/DELETE remain non-retried.
Minor bump for the additive OpenAPI 3.39.0 spec-drift work.
Workflows did not queue on the initial PR open or reopen.
Owner
Author
TexasCoding
added a commit
that referenced
this pull request
Dec 2, 2026
… 22.19.0 (#595) * chore(specs): sync OpenAPI 3.39.0 / AsyncAPI / perps / SCM specs (2026-12-02) (#594) * feat: reconcile OpenAPI 3.39.0 spec drift (#594) Add perps FCM account-level IM cap (GET/PUT/DELETE /margin/fcm/im_cap), core GET /dlp_programs, Settlement.value_dollars, Klear obligation_type and withholding fields, WebSocket cover_market_lifecycle plus milestone_updated on market_lifecycle_v2. Additive only; PUT/DELETE remain non-retried. * chore(release): 22.19.0 (#594) Minor bump for the additive OpenAPI 3.39.0 spec-drift work. * ci: retrigger Actions on #595 Workflows did not queue on the initial PR open or reopen. * ci: allow workflow_dispatch so required checks can be run manually pull_request events are not queuing CI or Spec Drift Detection on this repo (confirmed on #595 and #596). workflow_dispatch still works and is needed to land #594.
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 #594
Supersedes #595, which opened successfully but GitHub Actions never queued
pull_requestworkflows (CI / Spec Drift) despite an active repo, a user OAuth token with theworkflowscope, a close/reopen, and an empty retrigger commit.workflow_dispatchof Spec Drift Detection on the same SHA does run (https://github.com/TexasCoding/kalshi-python-sdk/actions/runs/46925634823). This PR is a fresh branch of the same commits to give thepull_requestevent another chance.Reconciles the nightly spec-drift failure on main (OpenAPI 3.39.0; AsyncAPI, perps, and SCM specs also changed). Additive only — releases as 22.19.0 (minor). No breaking changes.
The failing run was https://github.com/TexasCoding/kalshi-python-sdk/actions/runs/46783195129 (
TestWsSpecDrift::test_batch_communications_channel_removedandtest_every_spec_endpoint_is_mapped[perps]; after the local spec sync,test_every_spec_endpoint_is_mapped[core]and SCM response drift onObligationEntry/CorporateActionPaymentDetailalso failed). Those tests now pass.Spec changes → SDK
fcm.get_im_cap(),update_im_cap(*, im_cap=),delete_im_cap()—GET/PUT/DELETE /margin/fcm/im_cap.GetFCMIMCapResponse.im_capandcurrent_imare optionalDollarDecimal(wire namesim_cap/current_im, no_dollarssuffix; both absent when unset or unavailable). PUT body isUpdateFCMIMCapRequest(extra="forbid"); returns no body. PUT/DELETE are never retried.incentive_programs.dlp_programs()(sync + async) —GET /dlp_programs. Public. ReturnsGetDlpProgramsResponsewithbidding_periodsandincentivized_series(null/missing lists parse as[]).Settlement.value_dollars(DollarDecimal | None).value(integer cents) is deprecated and kept.ObligationEntry.obligation_typeand optionalCorporateActionPaymentDetail.withholding_fp/withholding_rate_bps/withholding_reason, withserver_omits_despite_requiredexclusions so older payloads still parse.cover_market_lifecyclechannel andsubscribe_cover_market_lifecycle(). PayloadCoverMarketLifecycleMessage(same msg shape asmarket_lifecycle_v2).market_lifecycle_v2also carriesmilestone_updated(MilestoneUpdatedMessage:milestone_id,last_updated_ts_us, free-formmilestonedict). AsyncAPI 16 → 17 channels; 14 typedsubscribe_*.exchange_statussnapshot note, SCM obligation/withholding docs, "on-request" → "cover") needed no code.Blast radius (manual; GitNexus not installed)
UpdateFCMIMCapRequestis new andextra="forbid"; no existing request body changes.RETRYABLE_METHODSremains GET/HEAD/OPTIONS).market_lifecycle_v2subscribers may now also receive typedmilestone_updatedmessages through the SDK dispatcher (additive; previously this type was not in the spec).Settlement.valueis unchanged.value_dollarsis a new optional field.Gates
uv run ruff check .✅uv run mypy kalshi/✅uv run pytest tests/ --ignore=tests/integration -q✅ 5577 passed, 3 skippeduv run pytest tests/test_contracts.py -W error::UserWarning✅ 1030 passed