docs: 100% accuracy pass for v4.0.0 (cfbenchmarks WS, Klear Bearer, account/perps additions)#446
Conversation
Reconcile every doc with the shipped v4.0.0 surface: - WS channel count 11 -> 12 + a new cfbenchmarks_value section (websockets.md, index.md, README; perps.md "no perps counterpart" list). - Klear (SCM) Bearer migration prose across README + index (cookie-session/MFA -> Bearer; Klear ops 10 -> 9). - account.md: upgrade() + AccountApiLimits.grants / ApiUsageLevelGrant section. - perps.md: margin.api_limits(), notional/leverage fields, Bearer-token repr note. - subaccount range 1-32 -> 1-63 (subaccounts.md, concepts.md). - New docs/migrations/v3-to-v4.md (+ migration.md section + mkdocs nav) for the breaking Klear auth change. reference.md uses module-level autodoc, so the new models are auto-included. Verified: doc-example field names match the shipped models; `mkdocs build --strict` passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code Review: docs/v4.0.0-accuracySummary: Docs-only PR (225 additions, 19 deletions across 10 files). All code examples were checked against the actual shipped models and client code — field names, method signatures, and auth flows are accurate. The migration guide is thorough and well-structured. What's good
Issues1. Changed from: To: The implementation ( # kalshi/perps/klear/auth.py:47-49
def __repr__(self) -> str:
return f"KlearAuth(admin_user_id={self._admin_user_id!r}, access_token=<redacted>)"The new phrasing is technically accurate but may mislead users into thinking both credentials are hidden when only 2.
Reads awkwardly — the parenthetical HTTP status mixed into a prose sentence. Suggest: 3. The row: The "(routing only)" qualifier has no explanation inline. A reader unfamiliar with v3 won't know what it means. The detailed Minor nits
VerdictReady to merge after addressing issue #1 (the 🤖 Generated with Claude Code |
…_env note (PR #446) - perps.md: repr() shows admin_user_id, redacts only access_token (was ambiguous). - account.md: "returns None on success (HTTP 201)" reads cleaner than "(201)". - migration.md: explain "(URL routing only — no credential env vars)". - v3-to-v4.md: note the MFA code=... variant in the TL;DR for consistency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code Review — docs: 100% accuracy pass for v4.0.0Overview: Documentation-only PR (226 additions, 19 deletions across 10 files) that synchronises all ~25 doc files with the v4.0.0 surface. No code changes. I verified the key claims against the actual implementation before writing this. What's correct and well done
Minor suggestions1. CF Benchmarks example — The example shows: avg60 = msg.msg.avg_60s_data.value # trailing 60s average (Decimal)
q15 = msg.msg.last_60s_windowed_average_15min # None outside the final minute
q15_avg = msg.msg.last_60s_windowed_average_15min
q15_value = q15_avg.value if q15_avg else None # Decimal or NoneOr at minimum update the comment to clarify the type: 2. The cheat sheet only covers - | `KlearClient(demo=True)` + `client.login(...)` | `KlearClient(admin_user_id=..., access_token=..., demo=True)` |
+ | `KlearClient(demo=True)` + `client.login(...)` | `KlearClient(admin_user_id=..., access_token=..., demo=True)` |
+ | `AsyncKlearClient(demo=True)` + `await client.login(...)` | `AsyncKlearClient(admin_user_id=..., access_token=..., demo=True)` |No issues found
Verdict: Ready to merge. Both suggestions are minor — the |
Documentation accuracy pass for v4.0.0
Brings every doc to 100% accuracy against the v4.0.0 surface that shipped in #444. Found via a parallel audit of all ~25 doc files; each finding verified against the actual code (doc-example field names checked against the shipped models).
WebSocket (11 → 12 channels)
docs/websockets.md: channel count 11→12, added thecfbenchmarks_valuetable row + a CF Benchmarks index values section (subscribe, union-returnisinstancediscrimination,json.loads(msg.data), theCFBenchmarks*models); corrected a stale "channel count stays 11" note.docs/index.md+README.md: 11→12 (incl. the#the-12-channelsanchor) andsubscribe_cfbenchmarks_valuein the channel list.Klear (SCM) Bearer migration
README.md+docs/index.md: cookie-session/MFA → Bearer; Klear ops 10 → 9.docs/perps.md: Bearer-tokenreprredaction note (was "session cookie").docs/migrations/v3-to-v4.md(full before/after) + av3 → v4.0.0section indocs/migration.md+ themkdocs.ymlnav entry.New REST surface
docs/resources/account.md:upgrade()row + API usage-level grants section (AccountApiLimits.grants,ApiUsageLevelGrant).docs/perps.md:margin.api_limits(), and the newMarginMarket/candlestick/ticker notional +leverage_estimatesfields.Prose
docs/resources/subaccounts.md,docs/concepts.md).docs/reference.mdneeds no change — it uses module-level mkdocstrings autodoc, so the new models are auto-included.mkdocs build --strictpasses.🤖 Generated with Claude Code