Reconcile perps exit-trigger price drift (v16.0.1) - #523
Merged
Merged
Conversation
Re-vendor perps OpenAPI and enforce gt=0 on optional stop_loss_price/take_profit_price for the three exit-trigger request models so the client matches the upstream "strictly positive when supplied" constraint (Closes #521).
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.
Summary
Closes #521.
Re-vendors upstream perps OpenAPI after a description-only drift on exit-trigger price fields (
stop_loss_price/take_profit_pricemust be strictly positive when supplied). Aligns the three request models with that constraint viaField(default=None, gt=0)and bumps to 16.0.1.Core OpenAPI / AsyncAPI /
kalshi/_generated/are unchanged. ResponseExitTriggeris unchanged. Valid positive callers are unaffected; zero/negative values now raiseValidationErrorat construction (the server already rejected them).Blast radius (GitNexus unavailable)
SetCrossExitTriggerRequest,SetIsolatedExitTriggerRequest, andUpdateExitTriggerRequestinkalshi/perps/models/portfolio.py.perps.portfolio.set_cross_exit_trigger/update_cross_exit_trigger/set_isolated_exit_trigger(sync + async).Test plan
uv run ruff check .uv run mypy kalshi/uv run pytest tests/ --ignore=tests/integration -q(4594 passed)Note on #522
Nightly Spec Drift Detection failed at
uv sync(PyPI timeout fetchingclick), not on contract tests. The report-failure job reproduced 838 passed. Leaving that tracker for the next green scheduled run.