Repository navigation
docs(migration): add v2.3→v2.4 section - #277
Conversation
…se, http2, extra_headers) Closes #246
Code Review — PR #277: docs(migration): v2.3→v2.4 sectionGood fix for #246. The section covers all five v2.4 features and the examples read clearly. I verified each claim against the implementation. One critical bug in the code examples, plus a couple of minor notes. 🔴 Critical:
|
| Claim | Status |
|---|---|
KalshiConflictError / KalshiTimeoutError / KalshiPoolExhaustedError exist and are exported |
✅ errors.py:65,69,77; __init__.py:11,15,20 |
422 now routes to KalshiValidationError |
✅ _base_client.py:72 |
batch_create → BatchCreateOrdersResponse |
✅ resources/orders.py:487 |
batch_cancel → BatchCancelOrdersResponse |
✅ resources/orders.py:529 |
from_pem / from_key_path / from_env / try_from_env accept password= |
✅ auth.py:84,109,151,192 |
KALSHI_PRIVATE_KEY_PASSPHRASE read by from_env and try_from_env |
✅ auth.py:170,211 |
KalshiConfig(http2=True) with fail-fast on missing h2 |
✅ config.py:68,91-97 |
pip install 'kalshi-sdk[http2]' — package name and extra are correct |
✅ pyproject.toml:2,29 |
extra_headers on KalshiConfig and both transports |
✅ _base_client.py:161,183,205,344,366,386 |
Verdict: The get_by_client_order_id examples must be fixed before merging — they will silently teach users a broken reconciliation flow. Everything else checks out.
Closes #246
Part of #273 (post-v2.4 audit), Wave 0 docs patch.