{"openapi":"3.1.0","security":[{"bearerAuth":[]}],"info":{"title":"Safe Rate Markets API","version":"0.1.0","description":"U.S. Treasury market data from Safe Rate: fitted curves, securities, analytics and indices. End-of-day records for business days from 2008-09-02, not live prices. Manage keys at https://saferate.markets/dashboard/keys. The same data is available to AI assistants over MCP at https://api.saferate.markets/mcp."},"servers":[{"url":"https://api.saferate.markets"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your API key, from the dashboard. Send it as `Authorization: Bearer srm_live_...`. The same key authenticates the MCP server at /mcp."}},"schemas":{"ZeroCurve":{"type":"object","properties":{"date":{"type":"string","description":"The trading day fitted."},"diagnostics":{"$ref":"#/components/schemas/CurveFitDiagnostics"},"points":{"type":"array","items":{"$ref":"#/components/schemas/ZeroCurvePoint"}}},"required":["date","diagnostics","points"],"additionalProperties":false},"CurveFitDiagnostics":{"type":"object","properties":{"date":{"type":"string"},"has_converged":{"type":"boolean"},"rmse_basis_points":{"type":"number","description":"Fit error across the securities used. Typically about 3 bp; treat a day much above that with care."},"rmse_price_cents":{"type":"number"},"security_count":{"type":"integer"},"theta0":{"type":"number"},"theta1":{"type":"number"},"theta2":{"type":"number"},"theta3":{"type":"number"},"lambda1":{"type":"number"},"lambda2":{"type":"number"}},"required":["date","has_converged","rmse_basis_points","rmse_price_cents","security_count","theta0","theta1","theta2","theta3","lambda1","lambda2"],"additionalProperties":false},"ZeroCurvePoint":{"type":"object","properties":{"date":{"type":"string","example":"2026-09-25"},"tenor_years":{"type":"number","description":"One of 1, 2, 3, 5, 7, 10, 15, 20, 25, 30.","example":10},"zero_rate":{"type":"number","description":"Continuously compounded spot rate, percent."},"par_yield":{"type":"number","description":"Par yield, percent."},"forward_rate":{"type":"number","description":"Instantaneous forward rate, percent."}},"required":["date","tenor_years","zero_rate","par_yield","forward_rate"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"string","enum":["bad_request","unauthorized","payment_required","no_data","unavailable","rate_limited","internal"]},"message":{"type":"string"},"code":{"type":"string"},"is_correctable":{"type":"boolean","description":"On a calculator refusal: whether different inputs can succeed (a bad date) or not (a valuation the series will never answer)."}},"required":["error","message"]},"ParCurve":{"type":"object","properties":{"date":{"type":"string"},"has_converged":{"type":"boolean"},"max_residual_basis_points":{"type":"number"},"rates":{"type":"array","items":{"$ref":"#/components/schemas/CurveRate"}},"rmse_basis_points":{"type":"number"},"security_count":{"type":"integer"}},"required":["date","has_converged","max_residual_basis_points","rates","rmse_basis_points","security_count"],"additionalProperties":false},"CurveRate":{"type":"object","properties":{"label":{"type":"string","example":"10Y"},"rate":{"type":"number","description":"Percent."},"tenor_years":{"type":"number"}},"required":["label","rate","tenor_years"],"additionalProperties":false},"MoneyMarketCurve":{"type":"object","properties":{"bill_count":{"type":"integer"},"convention":{"type":"string","description":"The yield convention the rates are quoted in.","example":"bond equivalent"},"date":{"type":"string"},"has_converged":{"type":"boolean"},"implied_overnight":{"type":"number","description":"The curve's intercept: an implied overnight rate, percent."},"max_residual_basis_points":{"type":"number"},"rates":{"type":"array","items":{"$ref":"#/components/schemas/CurveRate"}},"rmse_basis_points":{"type":"number"}},"required":["bill_count","convention","date","has_converged","implied_overnight","max_residual_basis_points","rates","rmse_basis_points"],"additionalProperties":false},"RealCurve":{"type":"object","properties":{"date":{"type":"string"},"has_converged":{"type":"boolean"},"max_price_error_cents":{"type":"number"},"rates":{"type":"array","items":{"$ref":"#/components/schemas/CurveRate"}},"rmse_basis_points":{"type":"number","description":"Fit error. Treat a day above 9 bp with care."},"tips_count":{"type":"integer"}},"required":["date","has_converged","max_price_error_cents","rates","rmse_basis_points","tips_count"],"additionalProperties":false},"DieboldLiCurve":{"type":"object","properties":{"date":{"type":"string"},"beta_0":{"type":"number","description":"Level factor coefficient."},"beta_1":{"type":"number","description":"Slope factor coefficient."},"beta_2":{"type":"number","description":"Curvature factor coefficient."},"level":{"type":"number"},"slope":{"type":"number"},"curvature":{"type":"number"},"lambda":{"type":"number","description":"The fixed decay parameter."},"implied_short_rate":{"type":"number"},"rates":{"type":"array","items":{"$ref":"#/components/schemas/CurveRate"}},"rmse_basis_points":{"type":"number","description":"Fit error. Three factors cannot bend as many ways as six, so this runs higher than the par curve's; treat a day above 19 bp with care."},"security_count":{"type":"integer"}},"required":["date","beta_0","beta_1","beta_2","level","slope","curvature","lambda","implied_short_rate","rates","rmse_basis_points","security_count"],"additionalProperties":false},"BreakevenInflation":{"type":"object","properties":{"date":{"type":"string"},"missing_tenors":{"type":"array","items":{"type":"number"},"description":"Tenors among 2, 3, 5, 7, 10 and 20 years with no breakeven that day, because one of the two curves published no rate there. Never interpolated."},"points":{"type":"array","items":{"type":"object","properties":{"tenor_years":{"type":"number"},"nominal":{"type":"number","description":"Nominal zero rate, percent."},"real":{"type":"number","description":"Real zero rate, percent."},"breakeven":{"type":"number","description":"nominal minus real, percent. Exact, since both are continuously compounded."}},"required":["tenor_years","nominal","real","breakeven"],"additionalProperties":false}}},"required":["date","missing_tenors","points"],"additionalProperties":false},"ZeroCurveHistory":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"points":{"type":"array","items":{"$ref":"#/components/schemas/ZeroCurvePoint"}}},"required":["from","to","points"],"additionalProperties":false},"MoneyMarketCurveHistory":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"array","items":{"$ref":"#/components/schemas/MoneyMarketCurve"}}},"required":["from","to","days"],"additionalProperties":false},"RealCurveHistory":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"array","items":{"$ref":"#/components/schemas/RealCurve"}}},"required":["from","to","days"],"additionalProperties":false},"ParCurveHistory":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"array","items":{"$ref":"#/components/schemas/ParCurve"}}},"required":["from","to","days"],"additionalProperties":false},"DieboldLiCurveHistory":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"array","items":{"$ref":"#/components/schemas/DieboldLiCurve"}}},"required":["from","to","days"],"additionalProperties":false},"IndexList":{"type":"object","properties":{"indices":{"type":"array","items":{"$ref":"#/components/schemas/IndexSummary"}}},"required":["indices"],"additionalProperties":false},"IndexSummary":{"type":"object","properties":{"code":{"type":"string","example":"broad"},"name":{"type":"string","example":"US Treasury"},"ticker":{"type":"string","example":"SR-UST-TR"},"former_ticker":{"type":"string","nullable":true,"description":"A retired ticker, kept so old citations can be traced. Null when there was none."},"covers":{"type":"string","example":"Nominal notes and bonds, one year and over"},"latest":{"$ref":"#/components/schemas/IndexDailyLevel"},"last_month_end":{"$ref":"#/components/schemas/IndexMonthEndLevel"}},"required":["code","name","ticker","former_ticker","covers","latest","last_month_end"],"additionalProperties":false},"IndexDailyLevel":{"type":"object","nullable":true,"properties":{"date":{"type":"string"},"level":{"type":"number","description":"Total-return index level."},"is_provisional":{"type":"boolean","description":"True while the day's prices may still be revised, so the level can change. Month-end levels are final."},"rebalance_date":{"type":"string","description":"Start of the rebalance period this day belongs to."},"return_since_rebalance_percent":{"type":"number"}},"required":["date","level","is_provisional","rebalance_date","return_since_rebalance_percent"],"additionalProperties":false,"description":"The most recent business day's level (or the day asked for with `date`). Null when none is published."},"IndexMonthEndLevel":{"type":"object","nullable":true,"properties":{"date":{"type":"string","description":"The month-end the level is for."},"level":{"type":"number","description":"Total-return index level at the close of that month. A rising level usually means yields fell; it is not a yield."},"month_return_percent":{"type":"number","description":"Return over that month, percent."},"constituent_count":{"type":"integer"},"methodology_version":{"type":"string"},"is_back_tested":{"type":"boolean","description":"True when this level was computed under a 0.x methodology, i.e. reconstructed rather than published live."}},"required":["date","level","month_return_percent","constituent_count","methodology_version","is_back_tested"],"additionalProperties":false,"description":"The latest COMPLETED month-end, with its month return. Null with `date`, or when none is published."},"IndexLevels":{"type":"object","properties":{"code":{"type":"string"},"levels":{"type":"array","items":{"$ref":"#/components/schemas/IndexDailyLevel"}}},"required":["code","levels"],"additionalProperties":false},"IndexReturns":{"type":"object","properties":{"code":{"type":"string"},"as_of":{"type":"string"},"mtd_percent":{"type":"number","nullable":true},"qtd_percent":{"type":"number","nullable":true},"ytd_percent":{"type":"number","nullable":true,"description":"Null when the index does not yet span the period, for example a year-to-date return before the index has a year-start level."}},"required":["code","as_of","mtd_percent","qtd_percent","ytd_percent"],"additionalProperties":false},"IndexAnalyticsList":{"type":"object","properties":{"code":{"type":"string"},"analytics":{"type":"array","items":{"$ref":"#/components/schemas/IndexAnalytics"}}},"required":["code","analytics"],"additionalProperties":false},"IndexAnalytics":{"type":"object","properties":{"date":{"type":"string"},"rebalance_date":{"type":"string","description":"The period START: analytics anchored here describe the portfolio struck on this date and held to the next rebalance."},"constituent_count":{"type":"integer"},"market_value":{"type":"number"},"par_amount":{"type":"number"},"average_price":{"type":"number"},"average_maturity":{"type":"number","description":"Years."},"coupon_rate_percent":{"type":"number"},"yield_to_maturity_percent":{"type":"number"},"modified_duration":{"type":"number"},"spread_duration":{"type":"number"},"duration_basis":{"type":"string"},"convexity":{"type":"number","description":"In the published convention (the textbook quantity divided by 100), so the second-order price change for a 1-point yield move is half this value, in percent."},"basis_share_percent":{"type":"number"},"key_rate_durations":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","example":"10y"},"years":{"type":"number"},"value":{"type":"number"}},"required":["label","years","value"],"additionalProperties":false}}},"required":["date","rebalance_date","constituent_count","market_value","par_amount","average_price","average_maturity","coupon_rate_percent","yield_to_maturity_percent","modified_duration","spread_duration","duration_basis","convexity","basis_share_percent","key_rate_durations"],"additionalProperties":false},"IndexConstituentsOpen":{"type":"object","properties":{"code":{"type":"string"},"rebalance_date":{"type":"string","description":"When the current portfolio was struck."},"as_of_date":{"type":"string","description":"The last day the running returns are measured to."},"constituents":{"type":"array","items":{"$ref":"#/components/schemas/IndexConstituent"}}},"required":["code","rebalance_date","as_of_date","constituents"],"additionalProperties":false},"IndexConstituent":{"type":"object","properties":{"cusip":{"type":"string"},"maturity":{"type":"string"},"coupon_percent":{"type":"number"},"weight_percent":{"type":"number"},"market_value":{"type":"number"},"par_auctioned":{"type":"number"},"par_bought_back":{"type":"number"},"par_held_in_soma":{"type":"number"},"float_par":{"type":"number","description":"Par in public hands: auctioned, less bought back, less held by the Federal Reserve (SOMA)."},"start_clean_bid":{"type":"number"},"start_accrued":{"type":"number"},"start_dirty":{"type":"number"},"end_dirty":{"type":"number"},"coupons_received":{"type":"number"},"security_return_percent":{"type":"number"},"contribution_percent":{"type":"number","description":"This security's contribution to the index return, percent."}},"required":["cusip","maturity","coupon_percent","weight_percent","market_value","par_auctioned","par_bought_back","par_held_in_soma","float_par","start_clean_bid","start_accrued","start_dirty","end_dirty","coupons_received","security_return_percent","contribution_percent"],"additionalProperties":false},"IndexConstituentsClosed":{"type":"object","properties":{"code":{"type":"string"},"date":{"type":"string","description":"The period END. The list is the portfolio struck at the PREVIOUS rebalance and held through this date."},"constituents":{"type":"array","items":{"$ref":"#/components/schemas/IndexConstituent"}}},"required":["code","date","constituents"],"additionalProperties":false},"Security":{"type":"object","properties":{"cusip":{"type":"string"},"family":{"type":"string","nullable":true,"enum":["bill","note","bond","tips","frn",null]},"terms":{"$ref":"#/components/schemas/SecurityTerms"},"latest_price":{"$ref":"#/components/schemas/SecurityPrice"},"analytics_basis":{"type":"string","nullable":true,"enum":["nominal","tips","frn",null],"description":"Which analytics a security has. TIPS and FRNs are not in the nominal table; each has its own fields."},"latest_analytics":{"anyOf":[{"$ref":"#/components/schemas/NominalAnalytics"},{"$ref":"#/components/schemas/TipsAnalytics"},{"$ref":"#/components/schemas/FrnAnalytics"},{"nullable":true}]}},"required":["cusip","family","terms","latest_price","analytics_basis","latest_analytics"],"additionalProperties":false},"SecurityTerms":{"type":"object","properties":{"detail_security_type":{"type":"string","example":"Note"},"original_security_term":{"type":"string","example":"10-Year"},"coupon_percent":{"type":"number","nullable":true},"maturity_date":{"type":"string"},"dated_date":{"type":"string","nullable":true},"first_interest_payment_date":{"type":"string","nullable":true},"payment_frequency":{"type":"string","nullable":true},"has_floating_rate":{"type":"boolean"},"spread":{"type":"number","nullable":true,"description":"An FRN's fixed spread over its index. Null for other kinds."},"is_callable":{"type":"boolean"},"auctions":{"type":"array","items":{"type":"object","properties":{"auction_date":{"type":"string"},"issue_date":{"type":"string"},"original_security_term":{"type":"string"},"is_reopening":{"type":"boolean"},"high_yield":{"type":"number","nullable":true,"description":"Percent. Notes, bonds and TIPS; null for a bill or FRN, whose clearing rate is below."},"high_discount_rate":{"type":"number","nullable":true,"description":"Bills: the clearing discount rate, percent."},"high_investment_rate":{"type":"number","nullable":true,"description":"Bills: the clearing rate as a bond-equivalent yield, percent, comparable with a note's yield."},"high_discount_margin":{"type":"number","nullable":true,"description":"FRNs: the clearing discount margin over the index, percent."},"bid_to_cover_ratio":{"type":"number","nullable":true},"offering_amount":{"type":"number","nullable":true},"total_accepted":{"type":"number","nullable":true}},"required":["auction_date","issue_date","original_security_term","is_reopening","high_yield","high_discount_rate","high_investment_rate","high_discount_margin","bid_to_cover_ratio","offering_amount","total_accepted"],"additionalProperties":false}}},"required":["detail_security_type","original_security_term","coupon_percent","maturity_date","dated_date","first_interest_payment_date","payment_frequency","has_floating_rate","spread","is_callable","auctions"],"additionalProperties":false},"SecurityPrice":{"type":"object","nullable":true,"properties":{"date":{"type":"string"},"security_type":{"type":"string","example":"MARKET BASED NOTE"},"coupon_percent":{"type":"number"},"bid":{"type":"number","nullable":true,"description":"Per 100 face, as FedInvest published it: the lower of the two quotes. Null when no bid was posted that day, which is rare."},"offer":{"type":"number","nullable":true,"description":"Per 100 face: the higher of the two quotes. Null when no offer was posted that day, which is common within six months of maturity."},"close":{"type":"number","description":"End-of-day price per 100 face."}},"required":["date","security_type","coupon_percent","bid","offer","close"],"additionalProperties":false},"NominalAnalytics":{"type":"object","properties":{"date":{"type":"string"},"ytm":{"type":"number","nullable":true,"description":"Yield to maturity, percent."},"dirty_price":{"type":"number"},"macaulay_duration":{"type":"number"},"modified_duration":{"type":"number"},"convexity":{"type":"number","description":"Published convention: the textbook quantity divided by 100."},"dv01":{"type":"number"},"key_rate_durations":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"years":{"type":"number"},"value":{"type":"number"}},"required":["label","years","value"],"additionalProperties":false}},"price_residual_cents":{"type":"number","description":"Observed price less the price on the fitted nominal zero curve, cents per 100. POSITIVE = RICH (priced above the curve)."},"residual_basis_points":{"type":"number","nullable":true,"description":"The same gap in yield, basis points, with the OPPOSITE sign: POSITIVE = CHEAP. Null within a month of maturity, where dividing by a near-zero duration makes it meaningless; quote the cents there."},"residual_z_score":{"type":"number","nullable":true,"description":"The bp residual against this security's OWN history, so it follows the bp sign: positive = unusually cheap. NULL means not computed (every bill), never zero."}},"required":["date","ytm","dirty_price","macaulay_duration","modified_duration","convexity","dv01","key_rate_durations","price_residual_cents","residual_basis_points","residual_z_score"],"additionalProperties":false},"TipsAnalytics":{"type":"object","properties":{"date":{"type":"string"},"real_yield":{"type":"number","nullable":true,"description":"Percent."},"index_ratio":{"type":"number"},"indexed_principal":{"type":"number"},"real_clean_price":{"type":"number","description":"Per 100 of REAL (unindexed) face, as FedInvest quotes a TIPS: the price series' close for a TIPS is this number. Not what a holder pays; see money_clean_price."},"real_dirty_price":{"type":"number"},"money_clean_price":{"type":"number","description":"Real clean price times the index ratio: what a holder pays per 100 of original face, before accrued interest."},"accrued_real":{"type":"number"},"macaulay_duration":{"type":"number"},"modified_duration":{"type":"number"},"convexity":{"type":"number"},"dv01":{"type":"number","description":"Dollars per basis point of REAL yield, per 100 of real face: modified duration times the real dirty price, over 10,000. Times index_ratio for the dollars per 100 of original face."},"price_residual_cents":{"type":"number","description":"Observed price less the price on the fitted real (TIPS) curve, cents per 100 of real face. POSITIVE = RICH (priced above the curve)."},"residual_basis_points":{"type":"number","nullable":true,"description":"The same gap in real yield, basis points, with the OPPOSITE sign: POSITIVE = CHEAP. Null within a month of maturity, where dividing by a near-zero duration makes it meaningless; quote the cents there."},"residual_z_score":{"type":"number","nullable":true,"description":"The bp residual against this TIPS's OWN history, so it follows the bp sign: positive = unusually cheap. Null means not computed (too little history, or within a month of maturity), never zero."}},"required":["date","real_yield","index_ratio","indexed_principal","real_clean_price","real_dirty_price","money_clean_price","accrued_real","macaulay_duration","modified_duration","convexity","dv01","price_residual_cents","residual_basis_points","residual_z_score"],"additionalProperties":false},"FrnAnalytics":{"type":"object","properties":{"date":{"type":"string"},"clean_price":{"type":"number"},"dirty_price":{"type":"number"},"accrued_interest":{"type":"number"},"index_rate_percent":{"type":"number"},"quoted_spread_bp":{"type":"number"},"discount_margin_bp":{"type":"number"},"rate_duration_years":{"type":"number"},"spread_duration_years":{"type":"number"},"spread_dv01":{"type":"number"},"margin_z_score":{"type":"number","nullable":true,"description":"Null means not computed, never zero."}},"required":["date","clean_price","dirty_price","accrued_interest","index_rate_percent","quoted_spread_bp","discount_margin_bp","rate_duration_years","spread_duration_years","spread_dv01","margin_z_score"],"additionalProperties":false},"SecurityPrices":{"type":"object","properties":{"cusip":{"type":"string"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/SecurityPrice"}}},"required":["cusip","prices"],"additionalProperties":false},"SecurityAnalyticsSeries":{"type":"object","properties":{"cusip":{"type":"string"},"family":{"type":"string","nullable":true,"enum":["bill","note","bond","tips","frn",null]},"basis":{"type":"string","enum":["nominal","tips","frn"],"description":"Which analytics a security has. TIPS and FRNs are not in the nominal table; each has its own fields."},"analytics":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/NominalAnalytics"},{"$ref":"#/components/schemas/TipsAnalytics"},{"$ref":"#/components/schemas/FrnAnalytics"}]}}},"required":["cusip","family","basis","analytics"],"additionalProperties":false},"SecurityList":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"integer"},"securities":{"type":"array","items":{"$ref":"#/components/schemas/ListedSecurity"}}},"required":["date","count","securities"],"additionalProperties":false},"ListedSecurity":{"type":"object","properties":{"cusip":{"type":"string"},"family":{"type":"string","nullable":true,"enum":["bill","note","bond","tips","frn",null]},"coupon_percent":{"type":"number"},"maturity_date":{"type":"string"},"price":{"type":"number","description":"End-of-day clean price per 100 face. A TIPS is quoted in real terms, before its index ratio."}},"required":["cusip","family","coupon_percent","maturity_date","price"],"additionalProperties":false},"OnTheRun":{"type":"object","properties":{"date":{"type":"string"},"basis":{"type":"string","enum":["auction","issue"]},"queues":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["Bill","Note","Bond","TIPS","FRN"]},"original_security_term":{"type":"string","example":"10-Year"},"members":{"type":"array","items":{"type":"object","properties":{"run_rank":{"type":"integer","description":"0 is on the run; 1 the first off-the-run; up to 10."},"cusip":{"type":"string"},"coupon_percent":{"type":"number","nullable":true},"maturity_date":{"type":"string","nullable":true,"description":"Null only if the security has no price that day."}},"required":["run_rank","cusip","coupon_percent","maturity_date"],"additionalProperties":false}}},"required":["kind","original_security_term","members"],"additionalProperties":false}}},"required":["date","basis","queues"],"additionalProperties":false},"RichCheap":{"type":"object","properties":{"date":{"type":"string","description":"The trading day ranked."},"ranked_by":{"type":"string","enum":["abs_z_score"]},"min_years":{"type":"number","description":"The years-to-maturity floor applied: yours, or `1` by default."},"matched_count":{"type":"integer","description":"Scored securities matching the filters, before `limit`."},"unscored_count":{"type":"integer","description":"Securities matching the filters with NO z-score, left out of the ranking rather than ranked as ordinary: anything inside its first twenty observations (every new issue for about a month), and anything inside a month of maturity."},"securities":{"type":"array","items":{"$ref":"#/components/schemas/RichCheapSecurity"}}},"required":["date","ranked_by","min_years","matched_count","unscored_count","securities"],"additionalProperties":false},"RichCheapSecurity":{"type":"object","properties":{"rank":{"type":"integer"},"cusip":{"type":"string","example":"91282CMM0"},"family":{"type":"string","enum":["note","bond"],"description":"From the day's price record."},"coupon_percent":{"type":"number"},"maturity_date":{"type":"string"},"years_to_maturity":{"type":"number"},"price":{"type":"number","description":"End-of-day clean price per 100 face."},"yield_percent":{"type":"number","description":"Yield to maturity, percent."},"residual_basis_points":{"type":"number","description":"Yield minus the fitted nominal curve, bp. POSITIVE MEANS CHEAP."},"price_residual_cents":{"type":"number","description":"Price minus the model price, cents per 100. POSITIVE MEANS RICH: the opposite sign to residual_basis_points for the same fact."},"z_score":{"type":"number","description":"The residual against this security's own history, in standard deviations. Positive: cheaper than usual; negative: richer. The ranking key, by absolute value."},"vs_curve":{"type":"string","nullable":true,"enum":["rich","cheap",null],"description":"Today, against the curve: the sign of residual_basis_points in words. Null when the residual is exactly zero."},"vs_history":{"type":"string","nullable":true,"enum":["richer","cheaper",null],"description":"Against its own history: the sign of z_score in words. Can disagree with vs_curve: a bond that always trades rich can be rich today and still cheaper than usual. Null when the z-score is exactly zero."}},"required":["rank","cusip","family","coupon_percent","maturity_date","years_to_maturity","price","yield_percent","residual_basis_points","price_residual_cents","z_score","vs_curve","vs_history"],"additionalProperties":false},"Auctions":{"type":"object","properties":{"as_of":{"type":"string","description":"The newest priced day, which `status` is measured against."},"from":{"type":"string"},"to":{"type":"string"},"count":{"type":"integer"},"auctions":{"type":"array","items":{"$ref":"#/components/schemas/Auction"},"description":"Newest auction date first."}},"required":["as_of","from","to","count","auctions"],"additionalProperties":false},"Auction":{"type":"object","properties":{"cusip":{"type":"string","example":"912797VP9"},"kind":{"type":"string","nullable":true,"enum":["Bill","Note","Bond","TIPS","FRN",null],"description":"Bill, Note, Bond, TIPS or FRN, derived from the auction. Null only when it cannot be told."},"term":{"type":"string","description":"The term it is grouped under: for a bill the term offered (a 4-week reopening of a 17-week bill is a 4-week auction); for everything else the original term (a reopened 10-year is still a 10-year).","example":"4-Week"},"original_security_term":{"type":"string"},"security_term":{"type":"string","nullable":true,"description":"The term as offered at this auction."},"is_reopening":{"type":"boolean"},"status":{"type":"string","enum":["announced","auctioned","settled"],"description":"Against the newest priced day: announced (not yet held), auctioned (held, not yet issued) or settled."},"auction_date":{"type":"string"},"issue_date":{"type":"string"},"maturity_date":{"type":"string","nullable":true,"description":"Null for a NEW security not yet issued: it is not on record until then."},"coupon_percent":{"type":"number","nullable":true,"description":"Percent. Null for a new note or bond before issue (its coupon is set at the auction) and for bills."},"offering_amount":{"type":"number","nullable":true,"description":"Dollars."},"total_tendered":{"type":"number","nullable":true,"description":"Dollars."},"total_accepted":{"type":"number","nullable":true,"description":"Dollars."},"bid_to_cover_ratio":{"type":"number","nullable":true},"clearing_rate":{"type":"object","properties":{"measure":{"type":"string","enum":["discount","yield","real yield","discount margin"],"description":"What the auction cleared on: a bill's DISCOUNT rate (Treasury's headline for bills, and the only bill rate with a published median), a note's or bond's yield, a TIPS's real yield, or a floating-rate note's discount margin."},"high_percent":{"type":"number","nullable":true,"description":"The stop: the highest rate accepted, percent. Null until the auction is held."},"median_percent":{"type":"number","nullable":true,"description":"The median accepted rate, percent, on the same measure. Null for floating-rate notes and before the auction."},"investment_rate_percent":{"type":"number","nullable":true,"description":"Bills only: the coupon-equivalent investment rate, comparable with a note's yield. Null for everything else."}},"required":["measure","high_percent","median_percent","investment_rate_percent"],"additionalProperties":false},"high_less_median_basis_points":{"type":"number","nullable":true,"description":"How far the stop sat above the median accepted rate, in basis points, on the clearing measure. Not the tail, which is measured against the when-issued yield."},"bidders":{"type":"object","nullable":true,"properties":{"primary_dealer_percent":{"type":"number","nullable":true},"direct_percent":{"type":"number","nullable":true},"indirect_percent":{"type":"number","nullable":true}},"required":["primary_dealer_percent","direct_percent","indirect_percent"],"additionalProperties":false,"description":"Shares of the COMPETITIVE award (primary dealers, direct and indirect bidders), percent. The Fed's SOMA rollover and non-competitive bids are left out: they do not bid on price. Null until reported."},"soma_accepted":{"type":"number","nullable":true,"description":"Dollars: the Fed's rollover, on top of the offering."},"allocation_percent":{"type":"number","nullable":true,"description":"Share of bids AT the stop that were filled, percent. Low means the stop was crowded."}},"required":["cusip","kind","term","original_security_term","security_term","is_reopening","status","auction_date","issue_date","maturity_date","coupon_percent","offering_amount","total_tendered","total_accepted","bid_to_cover_ratio","clearing_rate","high_less_median_basis_points","bidders","soma_accepted","allocation_percent"],"additionalProperties":false},"AuctionsLatest":{"type":"object","properties":{"as_of":{"type":"string"},"terms":{"type":"array","items":{"$ref":"#/components/schemas/AuctionTermLatest"},"description":"Bills shortest first, then notes, bonds, TIPS and FRNs by term."}},"required":["as_of","terms"],"additionalProperties":false},"AuctionTermLatest":{"type":"object","properties":{"group":{"type":"string","example":"Bill 4-Week"},"kind":{"type":"string","nullable":true,"enum":["Bill","Note","Bond","TIPS","FRN",null]},"term":{"type":"string"},"auction":{"$ref":"#/components/schemas/Auction"},"bid_to_cover_change":{"type":"number","nullable":true,"description":"This auction's bid-to-cover less the mean of up to 6 previous auctions of the same term."},"bid_to_cover_compared_with":{"type":"integer","description":"How many previous auctions that mean actually averaged (auctions missing the figure are skipped)."},"primary_dealer_change_points":{"type":"number","nullable":true,"description":"The primary-dealer share less its mean over up to 6 previous auctions, percentage points. Dealers take what others do not, so a rise is weaker demand at the price."},"primary_dealer_compared_with":{"type":"integer"},"demand":{"$ref":"#/components/schemas/AuctionDemand"}},"required":["group","kind","term","auction","bid_to_cover_change","bid_to_cover_compared_with","primary_dealer_change_points","primary_dealer_compared_with","demand"],"additionalProperties":false},"AuctionDemand":{"type":"object","nullable":true,"properties":{"verdict":{"type":"string","nullable":true,"enum":["strong","average","weak",null],"description":"How many of the four measures sit in the top third (strong) or bottom third (weak) of this term's recent auctions. It counts measures rather than averaging them, so mixed demand reads as average. Null when the term is unranked or fewer than two measures could be ranked."},"unranked":{"type":"string","nullable":true,"enum":["sample","stale",null],"description":"Why the term has no ranking, or null when it has one. sample: fewer than min_sample prior auctions in the window. stale: no auction in more than max_stale_days. An unranked term has a null verdict and no measures."},"sample_size":{"type":"integer","description":"Prior auctions of the same term in the window, this one excluded. A verdict over a few auctions is a weaker claim than one over many."},"min_sample":{"type":"integer","nullable":true,"description":"Prior auctions a term needs before it is ranked.","example":8},"days_since_last":{"type":"integer","nullable":true,"description":"Days from the term's latest auction to the as-of date."},"max_stale_days":{"type":"integer","nullable":true,"description":"A term with no auction for longer than this is unranked as stale.","example":180},"window_months":{"type":"integer","description":"How far back the comparison reaches, in months.","example":24},"measures":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","example":"bidToCover"},"label":{"type":"string"},"percentile":{"type":"number","nullable":true,"description":"0 to 100, and 100 is strong demand on every measure: dealer takedown and high-less-median are stronger when lower and are flipped before publication."},"value":{"type":"number","nullable":true,"description":"The measure itself: the bid-to-cover ratio, a share as a fraction, or high-less-median in basis points."},"sample_size":{"type":"integer"}},"required":["key","label","percentile","value","sample_size"]}}},"required":["verdict","unranked","sample_size","min_sample","days_since_last","max_stale_days","window_months","measures"],"description":"This auction's demand ranked against the same term's recent history. A term too new or too dormant to rank says why in unranked. Null when the ranking is unavailable."},"CouponPrice":{"type":"object","properties":{"cusip":{"type":"string","nullable":true},"coupon_rate_percent":{"type":"number"},"maturity_date":{"type":"string"},"settlement_date":{"type":"string","description":"T+1 from the trade date, on a business day."},"clean_price":{"type":"number","description":"Per 100 face; the quoted price."},"accrued_interest":{"type":"number"},"dirty_price":{"type":"number","description":"Clean plus accrued: what settles."},"yield_to_maturity_percent":{"type":"number"},"macaulay_duration":{"type":"number"},"modified_duration":{"type":"number"},"dv01":{"type":"number","description":"Price change per 1bp, per 100 face."},"convexity":{"type":"number","description":"Published convention: textbook convexity / 100."},"coupons_remaining":{"type":"integer"},"is_final_period":{"type":"boolean"}},"required":["cusip","coupon_rate_percent","maturity_date","settlement_date","clean_price","accrued_interest","dirty_price","yield_to_maturity_percent","macaulay_duration","modified_duration","dv01","convexity","coupons_remaining","is_final_period"],"additionalProperties":false},"BillPrice":{"type":"object","properties":{"maturity_date":{"type":"string"},"settlement_date":{"type":"string"},"days_to_maturity":{"type":"integer"},"days_in_year":{"type":"integer"},"price":{"type":"number","description":"Per 100 face."},"discount_rate_percent":{"type":"number","description":"Bank-discount rate: the quoting convention, on a 360-day year."},"investment_rate_percent":{"type":"number","description":"Coupon-equivalent yield: the rate comparable with a note's yield. NOT the same number as the discount rate."}},"required":["maturity_date","settlement_date","days_to_maturity","days_in_year","price","discount_rate_percent","investment_rate_percent"],"additionalProperties":false},"DebtSummary":{"type":"object","properties":{"record_date":{"type":"string","description":"The statement's month-end. Quote this, not the date you asked for."},"headline":{"$ref":"#/components/schemas/DebtLine"},"marketable_total":{"$ref":"#/components/schemas/DebtLine"},"nonmarketable_total":{"$ref":"#/components/schemas/DebtLine"},"marketable":{"type":"array","items":{"$ref":"#/components/schemas/DebtLine"}},"nonmarketable":{"type":"array","items":{"$ref":"#/components/schemas/DebtLine"}},"marketable_tie":{"$ref":"#/components/schemas/DebtTieOut"},"nonmarketable_tie":{"$ref":"#/components/schemas/DebtTieOut"}},"required":["record_date","headline","marketable_total","nonmarketable_total","marketable","nonmarketable","marketable_tie","nonmarketable_tie"],"additionalProperties":false},"DebtLine":{"type":"object","nullable":true,"properties":{"record_date":{"type":"string"},"security_type":{"type":"string","example":"Marketable"},"security_class":{"type":"string","description":"The class, e.g. \"Notes\"; \"_\" on a total line.","example":"Notes"},"debt_held_public":{"type":"number","description":"Dollars."},"intragovernmental":{"type":"number","description":"Dollars."},"total":{"type":"number","description":"Dollars."},"is_total":{"type":"boolean"},"is_headline_total":{"type":"boolean"}},"required":["record_date","security_type","security_class","debt_held_public","intragovernmental","total","is_total","is_headline_total"],"additionalProperties":false,"description":"Total public debt outstanding. Its debt_held_public (borrowed from investors) and total (which adds the government's debts to its own trust funds) differ by trillions: say which one you quote."},"DebtTieOut":{"type":"object","nullable":true,"properties":{"published":{"type":"number"},"summed":{"type":"number"},"gap":{"type":"number"},"relative_gap":{"type":"number","nullable":true}},"required":["published","summed","gap","relative_gap"],"additionalProperties":false,"description":"The class lines summed against the published total: a check on the statement, not a correction of it."},"StripsFloat":{"type":"object","properties":{"latest":{"type":"object","properties":{"record_date":{"type":"string"},"outstanding":{"type":"number","description":"Dollars, strippable securities."},"stripped":{"type":"number","description":"Dollars held in stripped form."},"stripped_share_percent":{"type":"number","nullable":true},"reconstituted":{"type":"number","description":"Dollars reconstituted that month."},"security_count":{"type":"integer"}},"required":["record_date","outstanding","stripped","stripped_share_percent","reconstituted","security_count"],"additionalProperties":false},"by_class":{"type":"array","items":{"type":"object","properties":{"security_class":{"type":"string"},"outstanding":{"type":"number"},"stripped":{"type":"number"},"stripped_share_percent":{"type":"number","nullable":true}},"required":["security_class","outstanding","stripped","stripped_share_percent"],"additionalProperties":false}},"most_stripped":{"type":"array","items":{"type":"object","properties":{"cusip":{"type":"string"},"security_class":{"type":"string"},"maturity_date":{"type":"string"},"record_date":{"type":"string"},"outstanding":{"type":"number"},"stripped":{"type":"number"},"stripped_share_of_size":{"type":"number","nullable":true,"description":"Percent of this security held stripped."},"reconstituted":{"type":"number"}},"required":["cusip","security_class","maturity_date","record_date","outstanding","stripped","stripped_share_of_size","reconstituted"],"additionalProperties":false}},"trailing_reconstituted":{"type":"number","description":"Dollars reconstituted over the last trailing_statements months."},"trailing_statements":{"type":"integer"},"series":{"type":"array","items":{"type":"object","properties":{"record_date":{"type":"string"},"outstanding":{"type":"number","description":"Dollars, strippable securities."},"stripped":{"type":"number","description":"Dollars held in stripped form."},"stripped_share_percent":{"type":"number","nullable":true},"reconstituted":{"type":"number","description":"Dollars reconstituted that month."},"security_count":{"type":"integer"}},"required":["record_date","outstanding","stripped","stripped_share_percent","reconstituted","security_count"],"additionalProperties":false},"description":"Every monthly statement since January 2001, oldest first."}},"required":["latest","by_class","most_stripped","trailing_reconstituted","trailing_statements","series"],"additionalProperties":false},"SavingsBondRates":{"type":"object","properties":{"on":{"type":"string"},"series_i":{"$ref":"#/components/schemas/SavingsBondRate"},"series_ee":{"$ref":"#/components/schemas/SavingsBondRate"},"series_i_history":{"type":"array","items":{"$ref":"#/components/schemas/SavingsBondRate"},"description":"Every Series I rate period started by `on`, oldest first."}},"required":["on","series_i","series_ee","series_i_history"],"additionalProperties":false},"SavingsBondRate":{"type":"object","nullable":true,"properties":{"series":{"type":"string"},"period_start":{"type":"string","description":"Rates announced for bonds bought from this date (1 May, 1 November)."},"composite_percent":{"type":"number","description":"What the bond pays for the current six-month period only."},"fixed_percent":{"type":"number","description":"Series I: set at purchase and kept for the bond's life. Compare vintages on this."},"semiannual_inflation_percent":{"type":"number","nullable":true,"description":"Series I only; null for EE."}},"required":["series","period_start","composite_percent","fixed_percent","semiannual_inflation_percent"],"additionalProperties":false},"SeriesIValuation":{"type":"object","properties":{"on":{"type":"string"},"purchased":{"type":"string","description":"The bond's ISSUE date. A year read off the face instead gives the wrong schedule."},"principal":{"type":"number"},"accrued_value":{"type":"number"},"redemption_value":{"type":"number","nullable":true,"description":"What the holder would receive: accrued value less any penalty. Null inside the first twelve months, when it cannot be redeemed at all."},"penalty_months":{"type":"integer"},"penalty_amount":{"type":"number","description":"Under five years old, the last three months of interest are forfeit."},"is_redeemable":{"type":"boolean"},"redeemable_from":{"type":"string"},"has_matured":{"type":"boolean"},"final_maturity":{"type":"string"},"completed_periods":{"type":"integer"},"months_into_current_period":{"type":"integer"},"value_at_last_completed_period":{"type":"number"},"current_period":{"type":"object","nullable":true,"properties":{"earning_period_start":{"type":"string"},"earning_period_end":{"type":"string"},"composite_rate":{"type":"number","description":"Decimal, annualized."},"fixed_rate":{"type":"number","description":"Decimal."},"semiannual_inflation_rate":{"type":"number","description":"Decimal."},"fixed_rate_set_on":{"type":"string"},"inflation_rate_set_on":{"type":"string"}},"required":["earning_period_start","earning_period_end","composite_rate","fixed_rate","semiannual_inflation_rate","fixed_rate_set_on","inflation_rate_set_on"],"additionalProperties":false}},"required":["on","purchased","principal","accrued_value","redemption_value","penalty_months","penalty_amount","is_redeemable","redeemable_from","has_matured","final_maturity","completed_periods","months_into_current_period","value_at_last_completed_period","current_period"],"additionalProperties":false},"SeriesEEValuation":{"type":"object","properties":{"on":{"type":"string"},"purchased":{"type":"string","description":"The bond's ISSUE date. A year read off the face instead gives the wrong schedule."},"principal":{"type":"number"},"accrued_value":{"type":"number"},"redemption_value":{"type":"number","nullable":true,"description":"What the holder would receive: accrued value less any penalty. Null inside the first twelve months, when it cannot be redeemed at all."},"penalty_months":{"type":"integer"},"penalty_amount":{"type":"number","description":"Under five years old, the last three months of interest are forfeit."},"is_redeemable":{"type":"boolean"},"redeemable_from":{"type":"string"},"has_matured":{"type":"boolean"},"final_maturity":{"type":"string"},"cohort":{"type":"string","description":"The issue window whose rate rules the bond follows."},"rate_percent":{"type":"number"},"annualised_yield_percent":{"type":"number"},"doubling_years":{"type":"number"},"guarantee_date":{"type":"string","description":"When Treasury guarantees the bond is worth double its price."},"guarantee_uplift":{"type":"number","description":"What the doubling guarantee adds on that date, over the rate alone."},"has_guarantee_applied":{"type":"boolean"},"is_rate_assumed_after_twenty":{"type":"boolean","description":"Past twenty years the rate is not yet announced; true when the value assumes the current one continues."}},"required":["on","purchased","principal","accrued_value","redemption_value","penalty_months","penalty_amount","is_redeemable","redeemable_from","has_matured","final_maturity","cohort","rate_percent","annualised_yield_percent","doubling_years","guarantee_date","guarantee_uplift","has_guarantee_applied","is_rate_assumed_after_twenty"],"additionalProperties":false},"Series":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"observations":{"type":"array","items":{"$ref":"#/components/schemas/SeriesObservation"},"description":"Long format: one row per series per date, by series then date."},"missing":{"type":"array","items":{"$ref":"#/components/schemas/SeriesMissing"},"description":"Requested ids not served, and why. \"restricted\" is a licence refusal, not a key problem."},"licence_notice":{"type":"string","description":"Present only when the response includes licence-restricted data, which is for Safe Rate's internal use."},"attribution_notices":{"type":"array","items":{"type":"object","properties":{"notice":{"type":"string"},"series_ids":{"type":"array","items":{"type":"string"}}},"required":["notice","series_ids"]},"description":"Present when the response includes series whose source requires a notice (the New York Fed's and the OFR's rates). Their terms allow redistribution only with the notice attached, so keep it with the data wherever you show or pass it on."}},"required":["from","to","observations","missing"],"additionalProperties":false},"SeriesObservation":{"type":"object","properties":{"series_id":{"type":"string","example":"DGS10"},"date":{"type":"string","example":"2026-11-05"},"value":{"type":"number","nullable":true},"licence":{"type":"string","description":"The series' terms as treasury records them: \"public-domain\" or \"attribution\" for a customer (an \"attribution\" series carries a notice in attribution_notices)."},"redistributable":{"type":"boolean"}},"required":["series_id","date","value","licence","redistributable"],"additionalProperties":false},"SeriesMissing":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string","enum":["unknown-series","restricted","no-data-in-range"]},"detail":{"type":"string"}},"required":["id","reason","detail"],"additionalProperties":false},"SeriesCatalogue":{"type":"object","properties":{"series":{"type":"array","items":{"$ref":"#/components/schemas/SeriesCatalogueEntry"}}},"required":["series"]},"SeriesCatalogueEntry":{"type":"object","properties":{"series_id":{"type":"string"},"title":{"type":"string","nullable":true},"units":{"type":"string","nullable":true},"frequency":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"licence":{"type":"string"},"observation_start":{"type":"string","nullable":true},"observation_end":{"type":"string","nullable":true},"notice":{"type":"string","description":"The notice this series' source requires wherever its data appears."}},"required":["series_id","title","units","frequency","source","licence","observation_start","observation_end"]},"NoiseSeries":{"type":"object","properties":{"source":{"type":"string","enum":["fedinvest","authors"]},"curve":{"type":"string","enum":["svensson","safe-rate"]},"from":{"type":"string","nullable":true},"to":{"type":"string","nullable":true},"attribution":{"type":"string"},"days":{"type":"array","items":{"$ref":"#/components/schemas/NoiseDay"}}},"required":["source","curve","from","to","attribution","days"],"additionalProperties":false},"NoiseDay":{"type":"object","properties":{"date":{"type":"string"},"noise_bp":{"type":"number","description":"Root mean square distance of 1-10 year notes and bonds from the fitted curve, basis points, after the 4-standard-deviation outlier filter."},"noise_unfiltered_bp":{"type":"number","nullable":true,"description":"Before the outlier filter. Null for the authors' series."},"noise_20d_bp":{"type":"number","description":"Trailing 20 trading-day mean of noise_bp, this day included."},"z_1y":{"type":"number","nullable":true,"description":"noise_bp against the previous 252 trading days, excluding this one. Null until the window fills."},"z_2y":{"type":"number","nullable":true,"description":"Against the previous 504 trading days."},"z_5y":{"type":"number","nullable":true,"description":"Against the previous 1,260 trading days."},"fit_count":{"type":"integer","nullable":true,"description":"Bills, notes and bonds the curve was fitted to. Null for the authors."},"bill_count":{"type":"integer","nullable":true},"noise_count":{"type":"integer","nullable":true,"description":"Notes and bonds the noise was measured on, after the filter."},"filtered_count":{"type":"integer","nullable":true}},"required":["date","noise_bp","noise_unfiltered_bp","noise_20d_bp","z_1y","z_2y","z_5y","fit_count","bill_count","noise_count","filtered_count"],"additionalProperties":false}},"parameters":{}},"paths":{"/v1/curves/zero":{"get":{"summary":"Treasury zero curve for one day","description":"The fitted zero-coupon (spot) curve at ten tenors, with the day's fit diagnostics. Omit `date` for the most recent fitted day, which is what you want on a weekend or holiday. Coverage starts 2008-09-02.","tags":["Curves"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":false,"name":"date","in":"query"}],"responses":{"200":{"description":"The curve.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZeroCurve"}}}},"400":{"description":"Malformed date, or one outside coverage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No curve was fitted that day: a weekend, a federal holiday, or a day not yet published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/curves/par":{"get":{"summary":"Treasury par curve for one day","description":"The par yield curve from 3 months to 30 years: the coupon at which a bond at each maturity would price at par. Fitted from coupon securities. Omit `date` for the most recent fitted day. Coverage starts 2008-09-02.","tags":["Curves"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":false,"name":"date","in":"query"}],"responses":{"200":{"description":"The curve.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParCurve"}}}},"400":{"description":"Malformed date, or one outside coverage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No par curve that day: a weekend, a federal holiday, or a day not yet published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/curves/money-market":{"get":{"summary":"Treasury bill (money market) curve for one day","description":"The short end from one week to one year, fitted to Treasury bills rather than extrapolated from coupons. Read rates under a year here, not off the zero curve. Omit `date` for the most recent fitted day. Coverage starts 2008-09-02.","tags":["Curves"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":false,"name":"date","in":"query"}],"responses":{"200":{"description":"The curve.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoneyMarketCurve"}}}},"400":{"description":"Malformed date, or one outside coverage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No money market curve that day: a weekend, a federal holiday, or a day not yet published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/curves/real":{"get":{"summary":"TIPS real yield curve for one day","description":"Real zero rates from 2 to 30 years, fitted to TIPS. Real yields sit above inflation rather than including it, so they are not comparable to the nominal curve without the breakeven. Omit `date` for the most recent fitted day. Coverage starts 2008-09-02.","tags":["Curves"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":false,"name":"date","in":"query"}],"responses":{"200":{"description":"The curve.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealCurve"}}}},"400":{"description":"Malformed date, or one outside coverage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No real (TIPS) curve that day: a weekend, a federal holiday, or a day not yet published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/curves/diebold-li":{"get":{"summary":"Diebold-Li level, slope and curvature for one day","description":"The three-factor Diebold-Li fit: level, slope and curvature, their coefficients, and the rates they imply from 3 months to 30 years. The family to use in a regression or forecast: its factors move smoothly from day to day, unlike the six-parameter fit behind the par curve. Omit `date` for the most recent fitted day. Coverage starts 2008-09-02.","tags":["Curves"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":false,"name":"date","in":"query"}],"responses":{"200":{"description":"The curve.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DieboldLiCurve"}}}},"400":{"description":"Malformed date, or one outside coverage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No Diebold-Li (LSC) curve that day: a weekend, a federal holiday, or a day not yet published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/curves/breakeven":{"get":{"summary":"Breakeven inflation for one day","description":"Nominal minus real zero rate at 2, 3, 5, 7, 10 and 20 years: the average inflation over each horizon at which TIPS and nominal Treasuries would return the same. It includes an inflation risk premium and a TIPS liquidity premium, so it is a market price, not a forecast. Omit `date` for the most recent fitted day. Coverage starts 2008-09-02.","tags":["Curves"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":false,"name":"date","in":"query"}],"responses":{"200":{"description":"The curve.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakevenInflation"}}}},"400":{"description":"Malformed date, or one outside coverage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No breakeven inflation that day: a weekend, a federal holiday, or a day not yet published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/curves/zero/history":{"get":{"summary":"The zero curve over a date range","description":"One row per tenor per fitted day, oldest first. At most one year per request; page through longer ranges. Coverage starts 2008-09-02.","tags":["Curves"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-01"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":true,"name":"to","in":"query"}],"responses":{"200":{"description":"The series. Empty only if no day in the range was fitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZeroCurveHistory"}}}},"400":{"description":"Malformed dates, from after to, before coverage, or too long a range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/curves/money-market/history":{"get":{"summary":"The money market curve over a date range","description":"One entry per fitted day, oldest first. At most five years per request; page through longer ranges. Coverage starts 2008-09-02.","tags":["Curves"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-01"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":true,"name":"to","in":"query"}],"responses":{"200":{"description":"The series. Empty only if no day in the range was fitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoneyMarketCurveHistory"}}}},"400":{"description":"Malformed dates, from after to, before coverage, or too long a range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/curves/real/history":{"get":{"summary":"The real (TIPS) curve over a date range","description":"One entry per fitted day, oldest first. At most five years per request; page through longer ranges. Coverage starts 2008-09-02.","tags":["Curves"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-01"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":true,"name":"to","in":"query"}],"responses":{"200":{"description":"The series. Empty only if no day in the range was fitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealCurveHistory"}}}},"400":{"description":"Malformed dates, from after to, before coverage, or too long a range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/curves/par/history":{"get":{"summary":"The par curve over a date range","description":"One entry per fitted day, oldest first. At most five years per request; page through longer ranges. Coverage starts 2008-09-02.","tags":["Curves"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-01"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":true,"name":"to","in":"query"}],"responses":{"200":{"description":"The series. Empty only if no day in the range was fitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParCurveHistory"}}}},"400":{"description":"Malformed dates, from after to, before coverage, or too long a range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/curves/diebold-li/history":{"get":{"summary":"The Diebold-Li (LSC) curve over a date range","description":"One entry per fitted day, oldest first. At most five years per request; page through longer ranges. Coverage starts 2008-09-02.","tags":["Curves"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-01"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":true,"name":"to","in":"query"}],"responses":{"200":{"description":"The series. Empty only if no day in the range was fitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DieboldLiCurveHistory"}}}},"400":{"description":"Malformed dates, from after to, before coverage, or too long a range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/indices":{"get":{"tags":["Indices"],"summary":"Every index, with its latest daily and month-end levels","description":"The eleven Safe Rate Treasury total-return indices: the broad nominal index, five maturity bands, bills, short, inflation-linked, aggregate and floating rate. `latest` is the most recent business day; `last_month_end` is the latest completed month, which is final where recent daily levels can still be provisional. Pass `date` for every index's daily level on that day. Constructed by Safe Rate; not official U.S. Treasury statistics.","parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Levels as of this day instead of the latest."},"required":false,"description":"Levels as of this day instead of the latest.","name":"date","in":"query"}],"responses":{"200":{"description":"The indices.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexList"}}}},"400":{"description":"A malformed parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"An unknown index code, or nothing published for what was asked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/indices/{code}":{"get":{"tags":["Indices"],"summary":"One index, with its latest daily and month-end levels","parameters":[{"schema":{"type":"string","description":"Index code. One of: broad, 0103, 0307, 0710, 1020, 20PL, BILL, SHRT, TIPS, AGG, FRN.","example":"broad"},"required":true,"description":"Index code. One of: broad, 0103, 0307, 0710, 1020, 20PL, BILL, SHRT, TIPS, AGG, FRN.","name":"code","in":"path"}],"responses":{"200":{"description":"The index.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexSummary"}}}},"400":{"description":"A malformed parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"An unknown index code, or nothing published for what was asked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/indices/{code}/levels":{"get":{"tags":["Indices"],"summary":"Daily total-return levels","description":"One row per business day, oldest first. The full history of the broad index is about 4,500 rows; pass `from` and `to` to narrow it.","parameters":[{"schema":{"type":"string","description":"Index code. One of: broad, 0103, 0307, 0710, 1020, 20PL, BILL, SHRT, TIPS, AGG, FRN.","example":"broad"},"required":true,"description":"Index code. One of: broad, 0103, 0307, 0710, 1020, 20PL, BILL, SHRT, TIPS, AGG, FRN.","name":"code","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-01"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Daily levels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexLevels"}}}},"400":{"description":"A malformed parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"An unknown index code, or nothing published for what was asked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/indices/{code}/returns":{"get":{"tags":["Indices"],"summary":"Month-, quarter- and year-to-date returns","parameters":[{"schema":{"type":"string","description":"Index code. One of: broad, 0103, 0307, 0710, 1020, 20PL, BILL, SHRT, TIPS, AGG, FRN.","example":"broad"},"required":true,"description":"Index code. One of: broad, 0103, 0307, 0710, 1020, 20PL, BILL, SHRT, TIPS, AGG, FRN.","name":"code","in":"path"}],"responses":{"200":{"description":"Period returns.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexReturns"}}}},"400":{"description":"A malformed parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"An unknown index code, or nothing published for what was asked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/indices/{code}/analytics":{"get":{"tags":["Indices"],"summary":"Yield, duration, convexity and key-rate durations","description":"Portfolio analytics for the index. Without `date`, the latest rebalance period; with it, the period anchored at that rebalance date.","parameters":[{"schema":{"type":"string","description":"Index code. One of: broad, 0103, 0307, 0710, 1020, 20PL, BILL, SHRT, TIPS, AGG, FRN.","example":"broad"},"required":true,"description":"Index code. One of: broad, 0103, 0307, 0710, 1020, 20PL, BILL, SHRT, TIPS, AGG, FRN.","name":"code","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"date","in":"query"}],"responses":{"200":{"description":"Analytics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexAnalyticsList"}}}},"400":{"description":"A malformed parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"An unknown index code, or nothing published for what was asked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/indices/{code}/constituents":{"get":{"tags":["Indices"],"summary":"Current constituents (the open period)","description":"The securities in the index now, struck at the last rebalance, with returns measured to `as_of_date`. Heaviest first.","parameters":[{"schema":{"type":"string","description":"Index code. One of: broad, 0103, 0307, 0710, 1020, 20PL, BILL, SHRT, TIPS, AGG, FRN.","example":"broad"},"required":true,"description":"Index code. One of: broad, 0103, 0307, 0710, 1020, 20PL, BILL, SHRT, TIPS, AGG, FRN.","name":"code","in":"path"}],"responses":{"200":{"description":"Constituents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexConstituentsOpen"}}}},"400":{"description":"A malformed parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"An unknown index code, or nothing published for what was asked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/indices/{code}/constituents/{date}":{"get":{"tags":["Indices"],"summary":"Constituents for a completed period","description":"⚠️ `date` is the period END, a month-end. The list is the portfolio struck at the PREVIOUS month-end and held through `date`, with each security's return over that month. So 2026-08-31 returns the portfolio struck 2026-07-31. Analytics are labeled the other way, by the period start.","parameters":[{"schema":{"type":"string","description":"Index code. One of: broad, 0103, 0307, 0710, 1020, 20PL, BILL, SHRT, TIPS, AGG, FRN.","example":"broad"},"required":true,"description":"Index code. One of: broad, 0103, 0307, 0710, 1020, 20PL, BILL, SHRT, TIPS, AGG, FRN.","name":"code","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-08-31"},"required":true,"name":"date","in":"path"}],"responses":{"200":{"description":"Constituents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexConstituentsClosed"}}}},"400":{"description":"A malformed parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"An unknown index code, or nothing published for what was asked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/securities/{cusip}":{"get":{"tags":["Securities"],"summary":"Look up a CUSIP","description":"Terms and auction history, the latest price and the latest analytics for one Treasury security. Analytics follow the security's kind: nominal (notes, bonds and bills), TIPS or FRN.","parameters":[{"schema":{"type":"string","pattern":"^[0-9A-Za-z]{9}$","example":"91282CMM0"},"required":true,"name":"cusip","in":"path"}],"responses":{"200":{"description":"The security.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Security"}}}},"400":{"description":"A malformed CUSIP or date.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such CUSIP, or nothing in the range asked for.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/securities/{cusip}/prices":{"get":{"tags":["Securities"],"summary":"Daily prices","description":"FedInvest end-of-day bid, offer and close per 100 face, oldest first.","parameters":[{"schema":{"type":"string","pattern":"^[0-9A-Za-z]{9}$","example":"91282CMM0"},"required":true,"name":"cusip","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-01"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Prices.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityPrices"}}}},"400":{"description":"A malformed CUSIP or date.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such CUSIP, or nothing in the range asked for.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/securities/{cusip}/analytics":{"get":{"tags":["Securities"],"summary":"Daily analytics, including rich/cheap to the curve","description":"Yield, duration, convexity, DV01 and key-rate durations, with the residual to the fitted zero curve, oldest first. The rows' fields depend on `basis`.","parameters":[{"schema":{"type":"string","pattern":"^[0-9A-Za-z]{9}$","example":"91282CMM0"},"required":true,"name":"cusip","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-01-01"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Analytics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityAnalyticsSeries"}}}},"400":{"description":"A malformed CUSIP or date.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such CUSIP, or nothing in the range asked for.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/securities":{"get":{"summary":"Every Treasury security priced on a day","description":"The outstanding marketable stock as priced that day, several hundred securities, shortest maturity first, with family, coupon and price. Filter with `family`. Omit `date` for the most recent priced day. Look any one up at /v1/securities/{cusip}.","tags":["Securities"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":false,"name":"date","in":"query"},{"schema":{"type":"string","enum":["bill","note","bond","tips","frn"]},"required":false,"name":"family","in":"query"}],"responses":{"200":{"description":"The list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityList"}}}},"400":{"description":"Malformed parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Nothing priced that day: a weekend, a federal holiday, or a day not yet published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/on-the-run":{"get":{"summary":"On-the-run and off-the-run Treasuries by tenor","description":"For each security kind and original term, the most recently issued security (rank 0) and up to ten before it. `basis=issue` (the default) moves a security on the run when it settles; `basis=auction` when it is auctioned, which is what market commentary means by 'the new 10-year'. Between an auction and its settlement the two disagree. Omit `date` for the most recent priced day.","tags":["Securities"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":false,"name":"date","in":"query"},{"schema":{"type":"string","enum":["auction","issue"],"default":"issue"},"required":false,"name":"basis","in":"query"}],"responses":{"200":{"description":"The queues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnTheRun"}}}},"400":{"description":"Malformed parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Nothing priced that day: a weekend, a federal holiday, or a day not yet published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rich-cheap":{"get":{"summary":"Rich/cheap: securities furthest from the curve","description":"Every Treasury note and bond's distance from the fitted nominal curve on one day, ranked by how unusual that distance is for the security (|z-score|), not by its size, so a bond that always trades a little cheap does not crowd out one that has just moved. Bills are never scored. TIPS are scored against the real curve, not the nominal one, so they are not in this ranking. By default only securities at least a year from maturity are ranked: below that the curve is extrapolated and a cent of price becomes many basis points, so the shortest notes would fill the list. Pass `min_years=0` to include them. Omit `date` for the most recent day with analytics.","tags":["Rich/cheap"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":false,"name":"date","in":"query"},{"schema":{"type":"string","enum":["richer","cheaper"],"description":"Only securities that have richened (negative z) or cheapened (positive z) against their own history."},"required":false,"description":"Only securities that have richened (negative z) or cheapened (positive z) against their own history.","name":"direction","in":"query"},{"schema":{"type":"string","enum":["note","bond"]},"required":false,"name":"family","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0,"maximum":40,"default":1,"description":"Minimum years to maturity. Default 1; 0 includes the shortest notes."},"required":false,"description":"Minimum years to maturity. Default 1; 0 includes the shortest notes.","name":"min_years","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0,"maximum":40,"description":"Maximum years to maturity."},"required":false,"description":"Maximum years to maturity.","name":"max_years","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":25},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"The ranking.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RichCheap"}}}},"400":{"description":"Malformed parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No analytics that day: a weekend, a federal holiday, or a day not yet computed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auctions":{"get":{"summary":"Treasury auctions in a date window","description":"Every Treasury auction with an auction date in [`from`, `to`]: what is announced, what has been auctioned and is not yet issued, and what has settled, with each auction's results. Omit both dates for the last 30 days and everything announced. New securities appear as soon as they are announced, before they are issued, with `maturity_date` and `coupon_percent` null until then. A window may be at most 400 days.","tags":["Auctions"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-01"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-10-31"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","enum":["Bill","Note","Bond","TIPS","FRN"]},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string","maxLength":40,"description":"Only this term, as in `term` on each auction (\"4-Week\", \"10-Year\"). Case-insensitive."},"required":false,"description":"Only this term, as in `term` on each auction (\"4-Week\", \"10-Year\"). Case-insensitive.","name":"term","in":"query"},{"schema":{"type":"string","enum":["announced","auctioned","settled"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"The auctions, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Auctions"}}}},"400":{"description":"Malformed parameters, or a window wider than 400 days.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auctions/latest":{"get":{"summary":"The latest auction result of every term","description":"For each term auctioned in the last 400 days, its most recent held auction, with `demand`: bid-to-cover, indirect share, dealer takedown and high-less-median ranked against that term's last 24 months, and a strong, average or weak verdict. Also the change in bid-to-cover and in the primary-dealer share against the mean of up to 6 previous auctions of that term, each saying how many it averaged.","tags":["Auctions"],"parameters":[{"schema":{"type":"string","enum":["Bill","Note","Bond","TIPS","FRN"]},"required":false,"name":"kind","in":"query"}],"responses":{"200":{"description":"One entry per term.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuctionsLatest"}}}},"400":{"description":"Malformed parameters, or a window wider than 400 days.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/price/coupon":{"get":{"summary":"Price or yield a note or bond","description":"Give exactly one of `clean_price` or `yield_percent`, and either a `cusip` (terms looked up: the safer route) or both `coupon_rate_percent` and `maturity_date`. Returns the other side with accrued interest, durations, DV01 and convexity. `trade_date` defaults to the most recent trading day.","tags":["Calculators"],"parameters":[{"schema":{"type":"string","pattern":"^[0-9A-Za-z]{9}$","example":"91282CMM0"},"required":false,"name":"cusip","in":"query"},{"schema":{"type":"number","minimum":0,"exclusiveMinimum":true,"example":96.53125},"required":false,"name":"clean_price","in":"query"},{"schema":{"type":"number","nullable":true},"required":false,"name":"yield_percent","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0},"required":false,"name":"coupon_rate_percent","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"maturity_date","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Coupons a year, for hand-entered terms. Default 2."},"required":false,"description":"Coupons a year, for hand-entered terms. Default 2.","name":"frequency","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-25"},"required":false,"name":"trade_date","in":"query"}],"responses":{"200":{"description":"The valuation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponPrice"}}}},"400":{"description":"Missing or conflicting inputs, or inputs the calculator refused (a date outside the security's life, say). `is_correctable` says whether changing them can help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such CUSIP, or no price data to value on.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/price/bill":{"get":{"summary":"Price or yield a Treasury bill","description":"Give `maturity_date` and exactly one of `discount_rate_percent` or `price`. Returns both the bank-discount rate and the investment rate, which differ. `trade_date` defaults to the most recent trading day.","tags":["Calculators"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2027-03-18"},"required":true,"name":"maturity_date","in":"query"},{"schema":{"type":"number","nullable":true,"example":4},"required":false,"name":"discount_rate_percent","in":"query"},{"schema":{"type":"number","minimum":0,"exclusiveMinimum":true},"required":false,"name":"price","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"trade_date","in":"query"}],"responses":{"200":{"description":"The valuation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillPrice"}}}},"400":{"description":"Missing or conflicting inputs, or inputs the calculator refused (a date outside the security's life, say). `is_correctable` says whether changing them can help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such CUSIP, or no price data to value on.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/debt":{"get":{"summary":"U.S. federal debt, from the monthly statement","description":"Debt held by the public, intragovernmental holdings and their total, by security type and class, from the Monthly Statement of the Public Debt in force on `on`.","tags":["Debt"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Any date; the month-end statement in force on it. Default today.","example":"2026-09-25"},"required":false,"description":"Any date; the month-end statement in force on it. Default today.","name":"on","in":"query"}],"responses":{"200":{"description":"The statement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebtSummary"}}}},"400":{"description":"Malformed date.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No statement in force on that date: it precedes the first one on file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/strips":{"get":{"summary":"How much Treasury debt is held as STRIPS","description":"STRIPS are notes and bonds separated into their coupon and principal payments, each traded as a zero-coupon instrument. The stripped stock, by class, the ten most-stripped securities, and the monthly history, from the statement in force on `on`.","tags":["Debt"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Any date; the month-end statement in force on it. Default today.","example":"2026-09-25"},"required":false,"description":"Any date; the month-end statement in force on it. Default today.","name":"on","in":"query"}],"responses":{"200":{"description":"The STRIPS float.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripsFloat"}}}},"400":{"description":"Malformed date.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No STRIPS statement in force on that date: it precedes the first one on file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/savings-bonds/rates":{"get":{"summary":"Series I and EE savings bond rates","description":"The rates in force for bonds bought on `on` (default today), and every Series I period since 1998. A Series I composite rate is a fixed rate kept for life plus an inflation rate reset every six months; a Series EE bond earns a fixed rate, but the doubling guarantee at twenty years usually matters more.","tags":["Savings bonds"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"on","in":"query"}],"responses":{"200":{"description":"The rates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsBondRates"}}}},"400":{"description":"Malformed date.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No rate tables or valuation are available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/savings-bonds/i/value":{"get":{"summary":"Value a Series I savings bond","description":"What a Series I bond issued on `purchased` is worth on `valued_on`: accrued value, and what redeeming it would actually pay after the early-redemption penalty.","tags":["Savings bonds"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Issue date.","example":"2022-05-01"},"required":true,"description":"Issue date.","name":"purchased","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Default today."},"required":false,"description":"Default today.","name":"valued_on","in":"query"},{"schema":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"What was paid for the bond, in dollars. For an electronic bond, or any I bond, that is the face value. A paper EE bond was sold at half its face, so pass half the amount printed on it: a $100 paper EE bond is 50 (passing the face doubles its value). Default 100.","example":1000},"required":false,"description":"What was paid for the bond, in dollars. For an electronic bond, or any I bond, that is the face value. A paper EE bond was sold at half its face, so pass half the amount printed on it: a $100 paper EE bond is 50 (passing the face doubles its value). Default 100.","name":"denomination","in":"query"}],"responses":{"200":{"description":"The valuation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesIValuation"}}}},"400":{"description":"Malformed inputs, or a date pair the series cannot value (before the series began, say). `is_correctable` says whether different inputs can succeed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No valuation is available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/savings-bonds/ee/value":{"get":{"summary":"Value a Series EE savings bond","description":"What a Series EE bond issued on `purchased` is worth on `valued_on`: accrued value, and what redeeming it would actually pay after the early-redemption penalty.","tags":["Savings bonds"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Issue date.","example":"2022-05-01"},"required":true,"description":"Issue date.","name":"purchased","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Default today."},"required":false,"description":"Default today.","name":"valued_on","in":"query"},{"schema":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"What was paid for the bond, in dollars. For an electronic bond, or any I bond, that is the face value. A paper EE bond was sold at half its face, so pass half the amount printed on it: a $100 paper EE bond is 50 (passing the face doubles its value). Default 100.","example":1000},"required":false,"description":"What was paid for the bond, in dollars. For an electronic bond, or any I bond, that is the face value. A paper EE bond was sold at half its face, so pass half the amount printed on it: a $100 paper EE bond is 50 (passing the face doubles its value). Default 100.","name":"denomination","in":"query"}],"responses":{"200":{"description":"The valuation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesEEValuation"}}}},"400":{"description":"Malformed inputs, or a date pair the series cannot value (before the series began, say). `is_correctable` says whether different inputs can succeed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No valuation is available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/series":{"get":{"summary":"Economic series from FRED","description":"Daily, weekly and monthly economic series (Treasury yields, inflation, employment and more) between `from` and `to`, in long format. Only series whose licence allows redistribution are served.","tags":["Series"],"parameters":[{"schema":{"type":"string","description":"Series ids, comma separated, up to 40. GET /v1/series/catalogue lists them.","example":"DGS10,CPIAUCSL"},"required":true,"description":"Series ids, comma separated, up to 40. GET /v1/series/catalogue lists them.","name":"ids","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Default: a year before `to`.","example":"2025-11-05"},"required":false,"description":"Default: a year before `to`.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Default: today.","example":"2026-11-05"},"required":false,"description":"Default: today.","name":"to","in":"query"}],"responses":{"200":{"description":"The observations, and any ids not served.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Series"}}}},"400":{"description":"No ids, too many, or a malformed date.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/series/catalogue":{"get":{"summary":"The economic series available","description":"Every series GET /v1/series will serve you, with its title, units, frequency, source and coverage.","tags":["Series"],"responses":{"200":{"description":"The catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesCatalogue"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/signals/noise":{"get":{"summary":"The Treasury noise measure, an illiquidity signal","description":"Hu, Pan & Wang's noise measure, one entry per day, oldest first, with its trailing 20-day mean and trailing z-scores. The noise is the scatter of bond yields around a Svensson zero-coupon curve fitted to the day's prices. curve=svensson (default) fits it with no constraints, the authors' own method; curve=safe-rate fits the same form regularised (smoothness penalties and a cap on coefficient size), as Safe Rate's published Treasury curve is. source=fedinvest (default) is ours, from 2008-09-02, on either curve. source=authors is the authors' published series, 1987 to 2025, curve=svensson only. It moves with market stress rather than ahead of it; see /methodology/treasury-noise. Omit from and to for the whole series.","tags":["Signals"],"parameters":[{"schema":{"type":"string","enum":["fedinvest","authors"],"default":"fedinvest","example":"fedinvest"},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","enum":["svensson","safe-rate"],"default":"svensson","example":"svensson","description":"svensson: a Svensson zero curve fitted to prices with no constraints, the authors' method. safe-rate: the same form regularised, as Safe Rate's published curve is."},"required":false,"description":"svensson: a Svensson zero curve fitted to prices with no constraints, the authors' method. safe-rate: the same form regularised, as Safe Rate's published curve is.","name":"curve","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2020-01-01"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2020-12-31"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"The series. Empty when no day in the range is covered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoiseSeries"}}}},"400":{"description":"Malformed dates, from after to, a range before the source's coverage, or the authors' series asked for on the safe-rate curve.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or not a valid one.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Always `Bearer realm=\"saferate-markets\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A valid key whose organization has no active subscription. Subscribe in the dashboard; the same key then works.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached for your organization's plan (Individual 60/min, Team 300/min), counting the REST API and MCP together.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait. Always 60."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The Treasury data service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}