Skip to content

Reconcile perps subtrader require_category_cap drift (v20.0.0) - #532

Merged
TexasCoding merged 1 commit into
mainfrom
fix/531-perps-subtrader-require-category-cap
Oct 7, 2026
Merged

TexasCoding merged 1 commit into
mainfrom
fix/531-perps-subtrader-require-category-cap

Conversation

@TexasCoding

Copy link
Copy Markdown
Owner

Closes #531

Upstream perps OpenAPI now lists require_category_cap (boolean) as a required property of CreateMarginFCMSubtraderRequest (POST /margin/fcm/subtraders).

Changes

  • CreateMarginFCMSubtraderRequest.require_category_cap: bool (required; False is serialized, not omitted).
  • Sync + async FcmResource.create_subtrader accept require_category_cap and require it alongside subtrader_suffix when no request= is passed.
  • Re-vendored specs: specs/perps_openapi.yaml (new field + description-only tweak on MarginMarket.market_version), specs/openapi.yaml info.version 3.32.0 → 3.33.0 (no schema change; generate.py produced no _generated/ diff).
  • Tests: happy path, False-is-sent, missing-arg error, wrong-type validation, sync + async.
  • Docs: CHANGELOG 20.0.0, docs/migration.md, docs/perps.md. Version bump to 20.0.0 (new required request field = breaking).

Blast radius (GitNexus unavailable on the maintainer box; assessed manually)

Only kalshi/perps/models/fcm.py::CreateMarginFCMSubtraderRequest, kalshi/perps/resources/fcm.py::_build_create_subtrader_body, and the sync/async create_subtrader methods. No other callers in the package.

Gate

  • uv run ruff check . pass
  • uv run mypy kalshi/ pass
  • uv run pytest tests/ --ignore=tests/integration -q pass (4635 passed, 3 skipped)
  • uv run pytest tests/test_contracts.py -v -W error::UserWarning (nightly strict) pass

@TexasCoding
TexasCoding merged commit fc1e277 into main Oct 7, 2026
6 checks passed
@TexasCoding
TexasCoding deleted the fix/531-perps-subtrader-require-category-cap branch October 7, 2026 14:53
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-10-07)

1 participant