Repository navigation
fix: UST endpoints have no pagination/date-range params — align spec to live API - #14
Open
alexpipipi wants to merge 2 commits into
Open
alexpipipi wants to merge 2 commits into
alexpipipi wants to merge 2 commits into
Conversation
…to live API
The 4 US Treasury endpoints ignore page[limit]/page[offset], from/to and fmt=csv;
they return the full dataset for the selected year (filter[year], default current year).
Remove the phantom params and replace the flat-array response schema with the real
{meta:{total}, data:[...], links:{next:null}} envelope and real per-endpoint fields.
Refs DEV-1934.
…lter[year] Refs DEV-1934.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The 4 US Treasury (UST) endpoints (
/api/ust/{yield-rates,bill-rates,real-yield-rates,long-term-rates}) were documented with query params and a response schema that do not match the live API. Verified against production 2026-07-28.Removed (phantom — API silently ignores them):
page[limit]/page[offset]— no pagination; the full dataset for the year is always returned (ties to DEV-1934)from/to— date-range filtering not supportedfmt(csv) —fmt=csvcurrently returns JSON (separate API bug, flagged; dropped from spec to avoid a false promise)Fixed response schema — was a flat array with fictitious fields (
1_month,4_weeks_bank_discount, …). Real shape is a JSON:API-style envelope:with real per-endpoint fields (yield/real-yield: date/tenor/rate; bill: date/tenor/discount/coupon/avg_discount/avg_coupon/maturity_date/cusip; long-term: date/rate_type/rate/extrapolation_factor).
Kept:
filter[year](integer, defaults to current year) — the only real filter.Validation
npm run validate(redocly lint) ✓npm run check(conventions) ✓ — 14 endpoint files passPart of a cross-repo UST doc-accuracy sweep (WordPress page, SDKs, MCP servers, plugin). Refs DEV-1934.