docs: bring docs up to date with v2.1.0 surface#156
Conversation
Closes documentation gaps surfaced by a four-agent audit after the v2.1.0 spec sync merged via #155. Findings reorganized into per-file edits below. README.md - Feature list: V2 orders callout, funding/cost introspection, OpenAPI v3.18.0 + 85 endpoints, 13 WebSocket channels (was 11). - New "V2 event-market orders" section under Placing orders with a working `create_v2()` example. docs/index.md - Feature list parity with README. docs/migration.md - New `## v2.0 → v2.1` section covering: Balance.balance_dollars construction-time soft break, V2 orders family + client_order_id idempotency semantics, spec-driven subaccount/exchange_index asymmetry on amend_v2/decrease_v2, new optional kwargs, additive endpoints, new public types. docs/resources/orders.md - Quick reference table split into V1 (legacy) + V2 sections. - New "V2 event-market orders" section covering V1→V2 differences, create/cancel/amend/decrease/batch_create/batch_cancel examples, and the spec-driven subaccount-vs-exchange_index asymmetry table. - Legacy deprecation callout (no earlier than May 6, 2026). docs/resources/portfolio.md - Balance section now covers balance_dollars (required), balance_breakdown (optional), the cents-vs-DollarDecimal type collision, and the construction-site migration note. - New "Deposits and withdrawals" section. docs/resources/account.md - New `endpoint_costs()` entry + section. docs/resources/communications.md - list_quotes filter warning enumerates all four valid satisfiers. - New "Filtering shortcuts (v2.1.0)" with user_filter / rfq_user_filter examples and the UserFilterLiteral note. - New "Post-only quotes" section for the CreateQuoteRequest.post_only field. docs/resources/incentive-programs.md - list() example adds incentive_description. docs/resources/order-groups.md - Quick-reference signatures gain exchange_index on create/delete. - New "Exchange index (v2.1.0)" section. docs/types.md - Integer-cents table now lists Deposit/Withdrawal cents fields. - New warning callout for Balance.balance vs IndexedBalance.balance type collision (same name, cents vs dollars). - Literal aliases table adds BookSideLiteral, UserFilterLiteral, PaymentStatusLiteral, PaymentTypeLiteral. docs/request-models.md - Inventory table adds 5 V2 request models. - New "V2 surface: model-only" subsection explaining why V2 dropped the kwarg overload and what client_order_id idempotency means. - Cross-field invariants mentions DecreaseOrderV2Request. docs/concepts.md - Order section now distinguishes V1 vs V2 families. ROADMAP.md - v2.1.0 entry in Shipped section. - Next-milestone candidate: response-side spec drift detection (the Balance.balance_dollars miss is the motivating case). CLAUDE.md - Spec version bumped 3.13.0 → 3.18.0 in two places; endpoint count 85; channel count 13. Test count refreshed to ~1920. Validation: - `uv run mkdocs build` clean (no anchor warnings). - `uv run mypy kalshi/` clean. - `uv run ruff check .` clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code Review — PR #156: docs: bring docs up to date with v2.1.0 surfaceThis is a docs-only PR (521 additions, 25 deletions, 14 files). No production code is changed. Overall the coverage is comprehensive, the warnings and asymmetry callouts are excellent, and the migration guide is actionable. A few small items worth addressing before merge: Issues1. Imprecise test count in CLAUDE.md -pytest + pytest-asyncio + respx (httpx mock); 1455 tests collected (1407 passing, 48 skipped without live credentials).
+pytest + pytest-asyncio + respx (httpx mock); ~1920 tests across unit + contract drift suites.The old line was an exact count; the new one uses 2.
Currently the table leaves readers guessing what type 3. The V2 quick-reference table shows: No 4. The diff swaps Minor
What's done well
The three items above (test count, |
Summary
Documentation coverage pass for the v2.1.0 spec sync that merged via #155. Four parallel docs agents audited the docs tree against the implementation; this PR closes every gap they found across 14 files.
What's covered
## v2.0 → v2.1section covering theBalance.balance_dollarsconstruction-time soft break, V2 orders family +client_order_ididempotency, the spec-drivensubaccount/exchange_indexplacement asymmetry, and the new optional kwargs.balance_dollars,balance_breakdown, and the cents-vs-DollarDecimal type collision; new "Deposits and withdrawals" section.endpoint_costs()documented.list_quotesfilter warning updated; new "Filtering shortcuts (v2.1.0)" + "Post-only quotes" sections.incentive_descriptionkwarg surfaced.exchange_indexon create/delete + a new section.BookSideLiteral,UserFilterLiteral,PaymentStatusLiteral,PaymentTypeLiteral.Test plan
uv run mkdocs build— clean (no anchor warnings).uv run mypy kalshi/— clean.uv run ruff check .— clean.🤖 Generated with Claude Code