{"uid":"cap_zY1D9TQ-cmVV2nPe6IosC","slug":"x402stock-xyz-d0e686fb","name":"x402stock.xyz Treasury Yields API","description":"The daily US Treasury par yield curve (Constant Maturity Treasury rates) for every maturity from 1 month to 30 years, in percent. Defaults to the latest published day; pass `?limit=` for more recent days (max 250) and `?year=YYYY`. No ticker needed. Use for the risk-free rate, rate-sensitivity context, and yield-curve inversion in macro-aware analysis. From x402stock","url":"https://x402stock.xyz/api/v1/treasury-yields","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["limit"],"properties":{"year":{"type":"integer","maximum":2100,"minimum":1990},"limit":{"type":"integer","default":1,"maximum":250,"exclusiveMinimum":0}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["source","as_of","series","unit","maturities","count","rates"],"properties":{"unit":{"type":"string"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"number"},"rates":{"type":"array","items":{"type":"object","required":["date","rates"],"properties":{"date":{"type":"string"},"rates":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]}}},"additionalProperties":false}},"series":{"type":"string"},"source":{"type":"string","const":"us_treasury"},"maturities":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}}},"responseSchema":{"type":"json","example":{"unit":"percent","as_of":"2026-05-29T00:00:00.000Z","count":1,"rates":[{"date":"2026-05-29","rates":{"1mo":3.72,"1yr":3.47,"2mo":3.66,"2yr":3.47,"3mo":3.65,"3yr":3.55,"4mo":3.62,"5yr":3.74,"6mo":3.58,"7yr":3.95,"10yr":4.19,"20yr":4.81,"30yr":4.86,"1.5mo":3.71}}],"series":"daily_treasury_par_yield_curve","source":"us_treasury","maturities":["1mo","1.5mo","2mo","3mo","4mo","6mo","1yr","2yr","3yr","5yr","7yr","10yr","20yr","30yr"]}},"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"limit":5}}},"response":{"unit":"percent","as_of":"2026-06-10T00:00:00.000Z","count":5,"rates":[{"date":"2026-06-10","rates":{"1mo":3.69,"1yr":3.9,"2mo":3.72,"2yr":4.13,"3mo":3.79,"3yr":4.17,"4mo":3.8,"5yr":4.27,"6mo":3.82,"7yr":4.4,"10yr":4.55,"20yr":5.04,"30yr":5.03,"1.5mo":3.7}},{"date":"2026-06-09","rates":{"1mo":3.69,"1yr":3.9,"2mo":3.71,"2yr":4.13,"3mo":3.79,"3yr":4.16,"4mo":3.79,"5yr":4.26,"6mo":3.82,"7yr":4.39,"10yr":4.53,"20yr":5.02,"30yr":5.01,"1.5mo":3.69}},{"date":"2026-06-08","rates":{"1mo":3.7,"1yr":3.85,"2mo":3.71,"2yr":4.15,"3mo":3.8,"3yr":4.21,"4mo":3.79,"5yr":4.29,"6mo":3.83,"7yr":4.42,"10yr":4.56,"20yr":5.05,"30yr":5.03,"1.5mo":3.7}},{"date":"2026-06-05","rates":{"1mo":3.71,"1yr":3.88,"2mo":3.71,"2yr":4.17,"3mo":3.78,"3yr":4.22,"4mo":3.78,"5yr":4.29,"6mo":3.81,"7yr":4.41,"10yr":4.55,"20yr":5.03,"30yr":5.01,"1.5mo":3.71}},{"date":"2026-06-04","rates":{"1mo":3.71,"1yr":3.82,"2mo":3.7,"2yr":4.05,"3mo":3.78,"3yr":4.1,"4mo":3.76,"5yr":4.18,"6mo":3.78,"7yr":4.32,"10yr":4.47,"20yr":4.98,"30yr":4.97,"1.5mo":3.7}}],"series":"daily_treasury_par_yield_curve","source":"us_treasury","maturities":["1mo","1.5mo","2mo","3mo","4mo","6mo","1yr","2yr","3yr","5yr","7yr","10yr","20yr","30yr"]}},"exampleRequest":{"limit":5},"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"1.00","reviews":0,"stars":null,"state":"rated"},"availabilityStatus":"healthy","priceObserved":{"p10Cents":"1.0000","medianCents":"1.0000","p90Cents":"1.0000","minCents":"1.0000","maxCents":"1.0000","p95Cents":"1.0000","sampleCount":3,"varies":false,"failureChargeRate":null},"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__Xb-oGnawSbl4wwh-ux4O","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the US Treasury par yield curve (CMT rates) for all maturities from 1-month to 30-year, for one or more recent trading days","exampleAgentPrompt":"Pull the US Treasury par yield curve for the last 5 trading days — I want CMT rates for all maturities from 1-month to 30-year to check if the curve is still inverted.","exampleUseCases":[{"title":"Risk-free rate for DCF model","prompt":"I'm building a DCF valuation for a mid-cap tech stock — can you grab today's full US Treasury yield curve so I can pick the right risk-free rate for my discount rate calculation?"},{"title":"Yield curve inversion check","prompt":"Has the yield curve uninverted yet? Pull the latest Treasury CMT rates and tell me what the 2-year vs 10-year spread looks like right now."},{"title":"Macro interest rate context report","prompt":"I'm putting together a weekly macro briefing — fetch the US Treasury par yields across all maturities for the past 5 trading days so I can show how rates have shifted from the short end to the long end."}],"resultDescription":"A JSON object containing an array of daily yield curve snapshots, each with a date and a map of maturity labels (e.g. '1M', '3M', '1Y', '2Y', '5Y', '10Y', '30Y') to their respective par yield rates in percent. Also includes metadata: source ('us_treasury'), series name, unit, as_of date, available maturities list, and count of returned records.","failureModes":["Invalid limit value (must be 1–250) returns validation error","Invalid year value (outside 1990–2100 range) returns validation error","Data not yet published for the current day (Treasury publishes after market close) may return null rates or prior day","Payment failure (insufficient USDC balance or x402 protocol error) blocks the call","Network timeout if Treasury source data is temporarily unavailable"],"whenToPreferThis":"Use this endpoint when you need the full US Treasury par yield curve across all standard maturities in a single call without needing a ticker symbol. Ideal for macro-aware financial analysis, computing the risk-free rate for valuation models, detecting yield-curve inversion (e.g. 2Y vs 10Y spread), or providing interest rate context for equity or bond analysis. Prefer over manually scraping Treasury.gov or separate per-maturity lookups.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":3,"lastUsedAt":"2026-09-02T01:56:07.842Z","lastSuccessfullyRanAt":"2026-09-02T01:56:07.842Z","lastHealthCheckAt":"2026-09-14T12:49:39.038Z","isFirstParty":false}