Skip to content

docs(odds): document offset cap, removed_truncated, since_clamped#192

Merged
Mlaz-code merged 1 commit into
mainfrom
docs/odds-offset-cap
Apr 24, 2026
Merged

docs(odds): document offset cap, removed_truncated, since_clamped#192
Mlaz-code merged 1 commit into
mainfrom
docs/odds-offset-cap

Conversation

@Mlaz-code
Copy link
Copy Markdown
Collaborator

Companion to sharp-api-go #44. Documents the three new safety bounds on /odds and /odds/delta.

Pages updated

content/en/api-reference/odds.mdx

  • Query Parameters table: offset row now says "Must be ≤ 500" with pointer to cursor=
  • Pagination section: shows the new `400 offset_too_large` error body shape

content/en/api-reference/odds-delta.mdx

  • Query Parameters table: offset row updated with the 500 cap
  • New Callout on the 10-minute `since` retention window for removals
  • New "Truncation and Clamping Flags" section under the Delta Response Schema documenting `removed_truncated` and `since_clamped`
  • New `400 offset_too_large` example in Error Responses

Server-side context

Production nginx logs showed a small number of clients:

  • paginating /odds at offset=4400..79800 (1.5-2s each)
  • polling /odds/delta with since=2h-ago (3.5 MB responses)

The server-side caps in sharp-api-go #44 bound these pathologies; the docs here tell healthy clients what flags to ignore and misbehaving clients how to migrate.

Test plan

  • `npm run build` compiles
  • Preview renders the new Callouts and error blocks correctly
  • Links to anchor targets resolve

🤖 Generated with Claude Code

Companion to sharp-api-go PR #44. Documents the three new safety
bounds on /odds and /odds/delta:

- offset > 500 now returns 400 offset_too_large on both endpoints.
  /odds clients are directed to cursor= for deeper pagination;
  /odds/delta clients are directed to advance `since` to the
  previous response's `updated_at`.

- /odds/delta responses may include removed_truncated: true when
  the `removed` array hits the 1000-entry cap, and since_clamped:
  true when the client's `since` was older than the 10-minute
  removal retention window.

Both flags are optional — healthy polling clients (rolling `since`
forward each call) never see them, which is called out in a new
Polling note on the delta reference page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs.sharpapi.io Ready Ready Preview, Comment Apr 24, 2026 3:12pm

Request Review

@Mlaz-code Mlaz-code merged commit 5470046 into main Apr 24, 2026
2 checks passed
@Mlaz-code Mlaz-code deleted the docs/odds-offset-cap branch April 24, 2026 15:32
Mlaz-code added a commit that referenced this pull request May 7, 2026
Companion to sharp-api-go PR #44. Documents the three new safety
bounds on /odds and /odds/delta:

- offset > 500 now returns 400 offset_too_large on both endpoints.
  /odds clients are directed to cursor= for deeper pagination;
  /odds/delta clients are directed to advance `since` to the
  previous response's `updated_at`.

- /odds/delta responses may include removed_truncated: true when
  the `removed` array hits the 1000-entry cap, and since_clamped:
  true when the client's `since` was older than the 10-minute
  removal retention window.

Both flags are optional — healthy polling clients (rolling `since`
forward each call) never see them, which is called out in a new
Polling note on the delta reference page.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant