Skip to content

fix: UST endpoints have no pagination/date-range params — align SDK to API - #78

Open
alexpipipi wants to merge 2 commits into
mainfrom
fix/ust-remove-pagination-docs
Open

fix: UST endpoints have no pagination/date-range params — align SDK to API#78
alexpipipi wants to merge 2 commits into
mainfrom
fix/ust-remove-pagination-docs

Conversation

@alexpipipi

Copy link
Copy Markdown
Contributor

Problem

The US Treasury (UST) endpoints (/api/ust/yield-rates, /bill-rates, /real-yield-rates, /long-term-rates) do not support pagination or date-range filtering. Verified against the live API (2026-07-28): page[limit], page[offset], from, and to are all silently ignored — the full dataset for the requested year is always returned. The only real query param is filter[year] (defaults to current year).

The Python SDK previously exposed from_date / to_date params on all four UST methods, misleading users into thinking date-range filtering worked.

Fix

  • Removed from_date / to_date from the four TreasuryAPI methods and the internal helper, plus the apiclient facade wrappers.
  • Updated docstrings; added a class-level note that these endpoints ignore pagination/date-range params.
  • Replaced the test_date_params test (which asserted the ignored params were emitted) with test_no_pagination_or_date_params, asserting the SDK does not emit from / to / page[...].

No pagination params were present in the SDK. No new params invented — filter[year] was not previously exposed and is left as-is (out of scope for this doc-correction).

Tests

python3 -m pytest tests/ — 141 passed.

Ties to DEV-1934.

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