Safe Rate

v1.0.1
com.saferate/saferate Checked 28 minutes ago Published 8 days ago

US mortgage rate estimates, lender rankings and research, and US Treasury market data.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_quote_estimate Get mortgage rate estimates

Get live mortgage rate estimates for any US location without collecting the borrower's name, email, or phone number. Rates are Safe Rate's non-binding estimates (never quotes; a lender's actual quote may differ), and include an estimate ID that can be checked later to see how rates moved. The ID is a signed token that encodes the scenario itself: nothing is saved, and no account, alert or subscription is created.

ParameterTypeDescription
credit_rangestringBorrower credit score range. Defaults to 720-759.
down_payment_percentDown payment as a percentage. Defaults to 20.
loan_typestringDefaults to conventional.
locationZIP, city + state, or county + state. E.g. "60607", "Austin, TX". If the borrower has not said where, omit it: a client that supports elicitation is asked for it; any other client gets back ok: false…
occupancystringDefaults to primary.
property_typestringDefaults to single_family.
purchase_pricePurchase price or estimated property value, in dollars. Needed to price: if omitted, a client that supports elicitation is asked for it, any other gets back ok: false listing what is missing. Never in…
purposestringDefaults to purchase.

track_quote_estimate Check a rate estimate

Check an earlier Safe Rate rate estimate by its estimate ID. Returns the original scenario, how rates have moved since that estimate, and current rates for the same scenario. Read-only: it decodes the ID and reprices, and saves, subscribes or sends nothing. No account or contact information required.

ParameterTypeDescription
estimate_id *stringAn estimate ID previously returned by get_quote_estimate.

assess_property_context Assess a property's hazards and insurance

Assess hazard exposure and insurance conditions for a US location: FEMA National Risk Index score, flood-zone coverage and whether flood insurance is likely to be required for a mortgage, wildfire and earthquake exposure, and local insurance-market conditions. Describes the area, not a specific property.

ParameterTypeDescription
location *ZIP, city + state, or county + state. E.g. "33139", "Austin, TX".
property_valueOptional property value in dollars. Supplying it turns the premium rates into annual dollar estimates.

get_market_context Get local housing market context

Get local housing-market context for a US location: median home value with its national percentile, median rent, recent price appreciation, and historical mortgage activity from HMDA filings. Use this to answer whether a price or a market is typical.

ParameterTypeDescription
location *ZIP, city + state, or county + state. E.g. "60607", "Austin, TX".

find_lenders_in_market Find top lenders in a market

List the lenders Safe Rate publishes rankings for in a metro area or a whole state, sliced by loan type OR by institution type. Rankings are derived from public federal HMDA filings; placement cannot be purchased. This is a starting list, not a recommendation for a specific borrower.

ParameterTypeDescription
location *A US state ("Ohio", "OH") for statewide rankings, or a ZIP, city + state or county + state inside a metro area.
institution_typestringRank lenders of one institution type, across all loan types. Cannot be combined with loan_type.
limitHow many lenders to return. Defaults to 10, max 25.
loan_typestringRank lenders for one loan type, across all institution types. Cannot be combined with institution_type. Omit both to get the conventional-loans slice, which the response flags as an assumption.

research_lender Research a mortgage lender

Look up any US mortgage lender by name or NMLS ID: origination volume, approval and pull-through rates, product mix and geographic footprint, from federal HMDA data.

ParameterTypeDescription
lender *Lender name or NMLS ID, e.g. "Rocket Mortgage" or "3030".
geographystringOptional two-letter state code to narrow the metrics, e.g. "IL".

fetch Read a Safe Rate page

Fetch one Safe Rate published page by its document id. Returns plain text carrying its own as-of date, canonical URL, data license, and citation notice. Rate index pages are indicative and refreshed daily; they are not a quote for a specific borrower.

ParameterTypeDescription
id *stringA document id from `search`, e.g. "local/austin-city-tx/mortgage-rates" or "lenders/velocio-mortgage".

get_treasury_curve Get the Treasury yield curve

Get the U.S. Treasury yield curve for a single day: the fitted zero-coupon (spot) curve and, on request, the par curve, money-market curve, TIPS real curve, breakeven inflation, the prior trading day for day-over-day moves, and per-CUSIP yields. Omit the date for the most recent published day, which is what you want on a weekend or holiday. Treasury yields are not mortgage rates.

ParameterTypeDescription
datestringTrading day as YYYY-MM-DD. Omit for the most recent published day — most calendar days are not trading days, so omitting is usually right.
includearrayWhich curves to return. Defaults to ["zero"]. "real" is the TIPS curve, "breakeven" the inflation implied between them, "prior" the previous trading day for comparison, "queue_yields" per-CUSIP yields…
queue_kindstringSecurity kind for "queue_yields". Defaults to Note.

get_treasury_rate_history Get Treasury rate history

Get a history of U.S. Treasury yields between two dates: the nominal curve (par yield, zero rate and forward rate at each maturity), the short-end money-market curve, or the TIPS real curve, one row per trading day. Use this for 'how have rates moved' questions. Coverage starts 2008-09-02. Keep ranges tight — a decade is thousands of rows.

ParameterTypeDescription
from *stringStart date, YYYY-MM-DD. Not before 2008-09-02.
to *stringEnd date, YYYY-MM-DD.
curvestringWhich curve. Defaults to "zero", the nominal curve, whose rows carry par_yield, zero_rate and forward_rate. "money_market" covers below one year; "real" is TIPS and its yields sit above inflation.

get_treasury_security Look up a Treasury security

Look up one Treasury security by CUSIP: its terms, price history, and analytics including duration, convexity, DV01 and key-rate durations, plus TIPS and floating-rate analytics where they apply, and the amount outstanding. Takes a CUSIP, not a description such as 'the current 10-year'.

ParameterTypeDescription
cusip *stringNine-character Treasury CUSIP, e.g. "91282CJL6".
outstanding_onstringDate for the amount outstanding. The month-end statement in force on it is used. Defaults to today.
summarizebooleanDefaults to true: the daily price and analytics series are left out and the latest values kept. False returns the full daily history, which for a long bond is thousands of rows.

list_treasury_securities List Treasury securities

List Treasury securities as at a date: which security is on-the-run for each tenor (this is how to resolve 'the current 10-year' to a CUSIP), the full outstanding and priced universe, or just the priced CUSIPs. Omit the date for the most recent day with prices.

ParameterTypeDescription
basisstringWhen a security becomes on-the-run. "auction" is the trading convention and flips sooner; "issue" waits for settlement. Defaults to "issue". Between an auction and its issue the two disagree.
datestringDate as YYYY-MM-DD. Omit for the most recent day with published prices.
includearrayDefaults to ["on_the_run"]. "outstanding" returns every priced security, which is several hundred rows.

price_treasury_security Price a Treasury security

Convert between price and yield for a Treasury bill, note or bond. Supply exactly one side — a price or a yield (a discount rate for a bill) — and the other is returned, with accrued interest, dirty price and the investment rate as applicable. For a note or bond, a CUSIP looks the terms up instead of restating them.

ParameterTypeDescription
instrument *string"bill" for a discount instrument under a year, "coupon" for a note or bond. The maths differs; the wrong choice returns a plausible wrong number.
clean_pricenumberPrice per 100 of face, excluding accrued interest.
coupon_rate_percentnumberAnnual coupon rate. Required for a coupon security without a CUSIP.
cusipstringCUSIP of a note or bond; its terms are looked up.
discount_rate_percentnumberBank discount rate for a bill.
frequencyintegerCoupon payments per year. Defaults to 2.
maturity_datestringMaturity, YYYY-MM-DD. Required for a bill.
trade_datestringSettlement date. Defaults to the most recent trading day.
yield_percentnumberYield to maturity for a coupon security.

value_savings_bond Value a savings bond

Value a U.S. Series I or Series EE savings bond: what it is worth now, how it got there, and what the holder would actually receive. Bonds under five years old forfeit three months of interest on redemption, and bonds under twelve months cannot be redeemed at all, so the amount received can be less than the accrued value. The purchase date is the bond's issue date.

ParameterTypeDescription
purchased *stringThe bond's ISSUE date, YYYY-MM-DD. Not the year printed on the face — a wrong date shifts the whole rate schedule.
series *string"I" is inflation-indexed; "EE" carries the 20-year doubling guarantee.
denominationnumberFace value in dollars, e.g. 100. Defaults to the standard unit.
valued_onstringValuation date. Defaults to today.

get_savings_bond_rates Get savings bond rates

Get current and historical U.S. savings bond rates — the Series I composite, its fixed and inflation components, and Series EE rates by issue cohort — and optionally how many bonds the public holds and how many are being sold. An I bond's headline rate applies for six months only; the fixed component is the part that lasts.

ParameterTypeDescription
includearrayExtras. "ee_cohorts" groups EE bonds by the rate rules of their issue window; "sales" is TreasuryDirect volume, which spikes when the I bond rate is high.
onstringValuation date. Defaults to today.

get_treasury_index Get a Treasury index

Get Safe Rate's Treasury total-return indices — by maturity bucket, plus bills, TIPS, floating-rate and aggregate. Call with no code to list every index with its current level and discover the codes. These are TOTAL RETURN levels, not yields: a rising level usually means yields fell. Constructed by Safe Rate, not an official Treasury statistic.

ParameterTypeDescription
codestringIndex code, e.g. "broad", "1020", "TIPS". Omit to list every index with its latest level.
constituents_onstringRebalance date for constituents. Defaults to the most recent — constituents exist on rebalance dates only, not daily.
includearrayExtras. "fund_comparison" sets each index beside comparable public bond funds and applies to the no-code listing.
onstringWith no code, returns every index's level as at this date instead of the latest.
sincestringStart date for "daily_history".

get_treasury_debt Get the federal debt statement

Get the U.S. federal debt from the monthly Treasury statement: debt held by the public, total public debt outstanding, and its composition, plus the STRIPS float on request. These two headline figures differ by trillions: debt held by the public excludes intragovernmental trust-fund holdings.

ParameterTypeDescription
include_stripsbooleanAlso return how much of the debt is held as STRIPS — separated coupon and principal payments traded as zero-coupon instruments.
onstringAny date; the month-end statement in force on it is returned, so a mid-month date gives the prior month-end. Defaults to today.

get_my_application Read my Universal Application

Requires the shopper's Safe Rate sign-in (scope poppy:read). Read the shopper's own Safe Rate Universal Application, the one application they build to share with the lenders they choose (building it is not applying for a loan): their loan scenario (price, down payment, ZIP, occupancy and so on), how far along it is, and its status. Identity details such as a Social Security number are never returned.

get_my_quotes Read my lender quotes

Requires the shopper's Safe Rate sign-in (scope poppy:read). List the quote requests the shopper sent to lenders and the offers that came back (rate, APR, points, product). Offers from Safe Rate Mortgage stay hidden until the shopper accepts the affiliated business disclosure on saferate.com.

start_my_application Start my Universal Application

Requires the shopper's Safe Rate sign-in (scope poppy:write). Start building the shopper's Universal Application from a loan scenario. If they already have one, nothing changes and it is returned. Holds no personal information: no name, SSN or date of birth.

ParameterTypeDescription
loanPurpose *string
occupancy *string
propertyValue *number
zip *string
costOverridesMonthlyobject
creditBandstring
downPaymentnumber
hasMilitaryServiceboolean
hoaMonthlynumber
loanAmountnumber
numberOfUnitsinteger
propertyAddressstring
propertyAddressPartsobject
propertyTypestring
timelinestring
usdaAreastring
usdaIncomestring

update_my_application Update my Universal Application

Requires the shopper's Safe Rate sign-in (scope poppy:write). Change answers in the loan scenario of the shopper's Universal Application. Send only the fields that change: everything else keeps its saved value, and nothing is saved if the result would be invalid. Cannot share the application or record an SSN — those are the shopper's own click on saferate.com.

ParameterTypeDescription
costOverridesMonthlyobject
creditBandstring
downPaymentnumber
expected_updated_atstringupdated_at from your last read of the application. If the shopper (or anyone) changed it since, nothing is saved and you get error 'conflict': read it again first.
hasMilitaryServiceboolean
hoaMonthlynumber
loanAmountnumber
loanPurposestring
numberOfUnitsinteger
occupancystring
propertyAddressstring
propertyAddressPartsobject
propertyTypestring
propertyValuenumber
timelinestring
usdaAreastring
usdaIncomestring
zipstring