Conversation
Kalshi deprecated the order_type field — only limit orders are supported, so specifying "type" is redundant and should not be sent. This change: - Removes "type": "limit" from order payloads in _build_order_data - Strips "type" from batch order dicts in _build_batch_orders (backward-compat) - Removes OrderType from README examples - Updates docstrings and tests accordingly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Kalshi API no longer accepts the "type" field, and the client-side market order simulation (hardcoded $0.99/$0.01) was misleading. Instead of quietly dropping documentation, properly deprecate order_type with a DeprecationWarning following the existing compat layer pattern. - Move order_type to keyword-only with DeprecationWarning when used - Remove market order simulation from _build_order_data - Update examples to remove OrderType usage - Add deprecation test in test_compat.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pre-1.0 library — no need for a deprecation cycle. Kalshi removed the "type" field from CreateOrder in Feb 2026. Verified against the live API: the field is silently ignored. The OrderType enum and Order.type property are kept since the API still returns "type" in order responses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
order_type/"type"field — only limit orders are supported, so specifying"type": "limit"is redundant and should not be sent"type": "limit"from order payloads in_build_order_data"type"from user-provided batch order dicts in_build_batch_orders(backward-compatible — users can still pass it, it just gets dropped)OrderTypefrom README examples and cleans up docstringsTest plan
🤖 Generated with Claude Code