{"openapi":"3.1.0","info":{"title":"treasury-yield-curve","version":"0.1.0","description":"US Treasury par yield curve (1mo to 30yr, percent) for one date, or the latest if omitted. Weekend or holiday dates return the nearest prior business day with a note. Data from U.S. Treasury; not financial advice.; US Treasury par yield curves for every business day between startDate and endDate (max 31 calendar days), oldest first. Data from U.S. Treasury; not financial advice.","x-guidance":"Treasury Yield Curve returns the official daily US Treasury par yield curve (1mo to 30yr, percent) from home.treasury.gov. `yield_curve` gives one date or the latest; weekends and holidays resolve to the nearest prior business day and say so. `yield_curve_history` returns up to 31 days of curves. Every response carries source URLs and an asOf timestamp. Data from U.S. Treasury; not financial advice. Tools: `yield_curve`, `yield_curve_history`.","contact":{"email":"jeff@fosterinstruments.com"}},"servers":[{"url":"https://treasury-yield-curve.x402supply.com"}],"paths":{"/mcp":{"post":{"operationId":"treasury-yield-curve_call","summary":"Call treasury-yield-curve via MCP tools/call","tags":["treasury-yield-curve"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"const":"tools/call"},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"const":"yield_curve"},"arguments":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD, 1990-01-02 or later, not in the future. Omit for the latest curve"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"const":"tools/call"},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"const":"yield_curve_history"},"arguments":{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD, 1990-01-02 or later"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD, at most 31 days after startDate. Defaults to startDate plus 30 days, capped at today"}},"required":["startDate"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}]}}}},"responses":{"200":{"description":"Tool result","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"JSON-RPC 2.0 response envelope. `result.content[0].text` is a JSON-encoded string matching the schema in `x-mcp-result-schema`.","properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"result":{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","properties":{"type":{"const":"text"},"text":{"type":"string"}}}}}}},"x-mcp-result-schema":{"type":"object","required":["requestedDate","date","exactMatch","yields","asOf","source"],"properties":{"requestedDate":{"type":["string","null"]},"date":{"type":"string"},"exactMatch":{"type":"boolean"},"note":{"type":"string"},"yields":{"type":"object","description":"Par yield in percent per tenor; null when Treasury did not publish that tenor for the date","properties":{"1mo":{"type":["number","null"]},"1.5mo":{"type":["number","null"]},"2mo":{"type":["number","null"]},"3mo":{"type":["number","null"]},"4mo":{"type":["number","null"]},"6mo":{"type":["number","null"]},"1yr":{"type":["number","null"]},"2yr":{"type":["number","null"]},"3yr":{"type":["number","null"]},"5yr":{"type":["number","null"]},"7yr":{"type":["number","null"]},"10yr":{"type":["number","null"]},"20yr":{"type":["number","null"]},"30yr":{"type":["number","null"]}}},"unit":{"type":"string"},"asOf":{"type":"string"},"source":{"type":"array","items":{"type":"string"}}}}},{"type":"object","description":"JSON-RPC 2.0 response envelope. `result.content[0].text` is a JSON-encoded string matching the schema in `x-mcp-result-schema`.","properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"result":{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","properties":{"type":{"const":"text"},"text":{"type":"string"}}}}}}},"x-mcp-result-schema":{"type":"object","required":["startDate","endDate","count","curves","asOf","source"],"properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"count":{"type":"integer"},"curves":{"type":"array","items":{"type":"object","required":["date","yields"],"properties":{"date":{"type":"string"},"yields":{"type":"object","description":"Par yield in percent per tenor; null when Treasury did not publish that tenor for the date","properties":{"1mo":{"type":["number","null"]},"1.5mo":{"type":["number","null"]},"2mo":{"type":["number","null"]},"3mo":{"type":["number","null"]},"4mo":{"type":["number","null"]},"6mo":{"type":["number","null"]},"1yr":{"type":["number","null"]},"2yr":{"type":["number","null"]},"3yr":{"type":["number","null"]},"5yr":{"type":["number","null"]},"7yr":{"type":["number","null"]},"10yr":{"type":["number","null"]},"20yr":{"type":["number","null"]},"30yr":{"type":["number","null"]}}}}}},"unit":{"type":"string"},"note":{"type":"string"},"asOf":{"type":"string"},"source":{"type":"array","items":{"type":"string"}}}}}]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"accepts":{"type":"array"}}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]}}},"/tools/yield_curve":{"post":{"operationId":"treasury-yield-curve_yield_curve_http","summary":"US Treasury par yield curve (1mo to 30yr, percent) for one date, or the latest if omitted. Weekend or holiday dates return the nearest prior business day with a note. Data from U.S. Treasury; not financial advice.","tags":["treasury-yield-curve"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD, 1990-01-02 or later, not in the future. Omit for the latest curve"}},"additionalProperties":false},"example":{"date":"2026-10-04"}}}},"responses":{"200":{"description":"Tool result (plain JSON, not MCP-wrapped)","content":{"application/json":{"schema":{"type":"object","required":["requestedDate","date","exactMatch","yields","asOf","source"],"properties":{"requestedDate":{"type":["string","null"]},"date":{"type":"string"},"exactMatch":{"type":"boolean"},"note":{"type":"string"},"yields":{"type":"object","description":"Par yield in percent per tenor; null when Treasury did not publish that tenor for the date","properties":{"1mo":{"type":["number","null"]},"1.5mo":{"type":["number","null"]},"2mo":{"type":["number","null"]},"3mo":{"type":["number","null"]},"4mo":{"type":["number","null"]},"6mo":{"type":["number","null"]},"1yr":{"type":["number","null"]},"2yr":{"type":["number","null"]},"3yr":{"type":["number","null"]},"5yr":{"type":["number","null"]},"7yr":{"type":["number","null"]},"10yr":{"type":["number","null"]},"20yr":{"type":["number","null"]},"30yr":{"type":["number","null"]}}},"unit":{"type":"string"},"asOf":{"type":"string"},"source":{"type":"array","items":{"type":"string"}}}},"example":{"requestedDate":"2026-10-04","date":"2026-10-02","exactMatch":false,"note":"No Treasury curve is published for 2026-10-04 (weekend or market holiday). Returning the nearest prior business day, 2026-10-02.","yields":{"1mo":4.04,"1.5mo":4.09,"2mo":4.11,"3mo":4.19,"4mo":4.26,"6mo":4.27,"1yr":4.46,"2yr":4.83,"3yr":4.96,"5yr":5.06,"7yr":5.17,"10yr":5.28,"20yr":5.67,"30yr":5.63},"unit":"percent","asOf":"2026-10-09T17:48:01.778Z","source":["https://home.treasury.gov/resource-center/data-chart-center/interest-rates/pages/xml?data=daily_treasury_yield_curve&field_tdr_date_value_month=202610"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"accepts":{"type":"array"}}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]}}},"/tools/yield_curve_history":{"post":{"operationId":"treasury-yield-curve_yield_curve_history_http","summary":"US Treasury par yield curves for every business day between startDate and endDate (max 31 calendar days), oldest first. Data from U.S. Treasury; not financial advice.","tags":["treasury-yield-curve"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD, 1990-01-02 or later"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD, at most 31 days after startDate. Defaults to startDate plus 30 days, capped at today"}},"required":["startDate"],"additionalProperties":false},"example":{"startDate":"2026-10-01","endDate":"2026-10-02"}}}},"responses":{"200":{"description":"Tool result (plain JSON, not MCP-wrapped)","content":{"application/json":{"schema":{"type":"object","required":["startDate","endDate","count","curves","asOf","source"],"properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"count":{"type":"integer"},"curves":{"type":"array","items":{"type":"object","required":["date","yields"],"properties":{"date":{"type":"string"},"yields":{"type":"object","description":"Par yield in percent per tenor; null when Treasury did not publish that tenor for the date","properties":{"1mo":{"type":["number","null"]},"1.5mo":{"type":["number","null"]},"2mo":{"type":["number","null"]},"3mo":{"type":["number","null"]},"4mo":{"type":["number","null"]},"6mo":{"type":["number","null"]},"1yr":{"type":["number","null"]},"2yr":{"type":["number","null"]},"3yr":{"type":["number","null"]},"5yr":{"type":["number","null"]},"7yr":{"type":["number","null"]},"10yr":{"type":["number","null"]},"20yr":{"type":["number","null"]},"30yr":{"type":["number","null"]}}}}}},"unit":{"type":"string"},"note":{"type":"string"},"asOf":{"type":"string"},"source":{"type":"array","items":{"type":"string"}}}},"example":{"startDate":"2026-10-01","endDate":"2026-10-02","count":2,"curves":[{"date":"2026-10-01","yields":{"1mo":4.06,"1.5mo":4.1,"2mo":4.13,"3mo":4.17,"4mo":4.26,"6mo":4.27,"1yr":4.44,"2yr":4.78,"3yr":4.91,"5yr":5.01,"7yr":5.12,"10yr":5.24,"20yr":5.64,"30yr":5.61}},{"date":"2026-10-02","yields":{"1mo":4.04,"1.5mo":4.09,"2mo":4.11,"3mo":4.19,"4mo":4.26,"6mo":4.27,"1yr":4.46,"2yr":4.83,"3yr":4.96,"5yr":5.06,"7yr":5.17,"10yr":5.28,"20yr":5.67,"30yr":5.63}}],"unit":"percent","asOf":"2026-10-09T17:48:01.949Z","source":["https://home.treasury.gov/resource-center/data-chart-center/interest-rates/pages/xml?data=daily_treasury_yield_curve&field_tdr_date_value_month=202610"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"accepts":{"type":"array"}}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]}}}}}