Skip to content

Docs: README pagination quickstart references non-existent Page.has_more (should be has_next) #248

Closed

Description

@TexasCoding

Summary

README is the first runnable example a new user sees. The manual cursor loop raises AttributeError: 'Page' object has no attribute 'has_more' on the second iteration. Reflects badly on a "professional, spec-first" SDK and undermines the quickstart trust signal.

Location

  • README.md:269 — if not page.has_more: break
  • kalshi/models/common.py:30-36 — Page only defines has_next

Evidence

# README.md (current):
while True:
    for market in page:
        ...
    if not page.has_more:
        break
    page = client.markets.list(status="open", limit=200, cursor=page.cursor)
# kalshi/models/common.py:
@property
def has_next(self) -> bool:
    return self.cursor is not None and self.cursor != ""

Every other doc (docs/pagination.md, docs/migration.md, kalshi/models/portfolio.py PositionsResponse) uses has_next.

Recommended fix

Replace page.has_more with page.has_next in the README (or add a has_more = has_next alias on Page if you want to keep both names supported).

Severity & category

high / docs

Activity

  1. added a commit that references this issue on May 21, 2026
    92fa0ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions