---
title: "Buy/refi-now vs wait rate-timing decision"
method: POST
path: "/v1/buy-timing"
tags: ["Data & Analytics"]
---

# Buy/refi-now vs wait rate-timing decision

`POST /v1/buy-timing`

## Request

- Base URL: `https://api.rateapi.dev`
- URL: `https://api.rateapi.dev/v1/buy-timing`
- Auth: API key in header `X-API-Key`

Frames a forward 'lock now' vs 'wait for rates to drop' recommendation by combining recent rate movement (direction + magnitude over a 1w/2w/4w window) with break-even sensitivity on the borrower's loan. Returns the best current offer, a wait-scenario projection (a sensitivity, NOT a forecast), the payment swing per 25bps, the cost of waiting, and a buy_now / consider_waiting / neutral / insufficient_data lean. Distinct from `/v1/rate-delta` (raw historical deltas only). This route is the single source of truth; the MCP `assess_buy_timing` tool and the consumer app call it.

**Authentication required**: Pass your API key in the `X-API-Key` header.

## Request body

- object
  - `product_type` 'mortgage' | 'mortgage_arm' | 'auto_loan' | 'heloc' | 'personal_loan' | 'student_loan' | 'credit_card', required: Use `mortgage_arm` for an adjustable-rate mortgage (5/1, 5/5, 7/1, 10/1, ...). ARMs are a separate market from fixed-rate mortgages: an ARM's introductory rate sits structurally below a comparable fixed rate, so a blended list would rank every ARM on top and present it as cheaper — true only until it resets. All initial fixed periods share one `mortgage_arm` bucket. Within `mortgage`, `term_months` selects 15- vs 30-year; it has no meaning for `mortgage_arm`.
  - `state` string, required: 2-letter US state code
  - `loan_amount` number, required: Loan amount in dollars — drives break-even sensitivity
  - `term_months` integer: Loan term in months. Defaults to 360.
  - `current_rate` number: Optional borrower locked/quoted rate (percent) — enables refi-now-vs-wait framing.
  - `closing_costs` number: Optional closing/refi costs in dollars. Defaults to 0.
  - `rate_shift_bps` number: Optional hypothetical bps move if waiting. Defaults to observed movement (or 25bps).
  - `since` '1w' | '2w' | '4w': Movement window. Defaults to 4w.

## Response `200`

Buy-vs-wait assessment. Degrades gracefully: when rate history is thin, `movement` fields are null, `recommendation` is `insufficient_data`, `confidence` is `low`, and a `note` is included.

- object
  - `product_type` string: Loan or deposit product this applies to.
  - `state` string: Two-letter US state code.
  - `window` string: How far back the rate movement was measured, as the `since` value used.
  - `movement` object: How the market moved across the window.
    - `now` object, nullable: Market summary as of today, or null when there is too little data.
    - `then` object, nullable: Market summary at the start of the window, or null when no comparable snapshot survives in retention.
    - `median_delta_pct` number, nullable: Change in median APR across the window, in percentage points. Negative means rates eased.
    - `direction` 'down' | 'up' | 'flat': Which way the value moved over the window.
  - `now` object: The best offer available today.
    - `best_rate` number, nullable: Lowest rate available today, or null when no offer was found.
    - `best_lender` string, nullable: Credit union offering that rate, or null when no offer was found.
    - `monthly_payment` number, nullable: Monthly principal-and-interest payment in US dollars.
  - `wait_scenario` object: What buying later would look like under an assumed rate shift.
    - `assumed_shift_bps` number: The rate shift the wait scenario was modelled at, in basis points.
    - `projected_rate` number, nullable: Rate implied by that shift, or null when no offer was found to shift from.
    - `projected_monthly_payment` number, nullable: Monthly payment at the projected rate, or null when it could not be computed.
    - `monthly_delta` number, nullable: How much the monthly payment changes by waiting, in US dollars. Positive means waiting costs more.
  - `break_even` object: What the wait is worth once the payment difference is accumulated.
    - `break_even_months` integer, nullable: Months until accumulated savings cover the upfront cost.
    - `net_cost_of_waiting` number, nullable: Total cost of waiting over the term, in US dollars, or null when it could not be computed.
    - `payment_swing_per_25bps` number, nullable: How much the monthly payment moves per 25 basis points of rate, in US dollars.
  - `recommendation` 'buy_now' | 'consider_waiting' | 'neutral' | 'insufficient_data': Whether to buy now or wait.
  - `confidence` 'high' | 'medium' | 'low': How much rate history backed the recommendation.
  - `rationale` string: The reasoning behind the recommendation, in plain language.
  - `assumed_defaults` object: Values filled in where the caller supplied none, so the result is reproducible.
  - `next_actions` object[]: Other endpoints or tools that are the natural next step from this result.
  - `disclosures` string[]: Statements that must be shown to a consumer alongside this result.
  - `note` string: Plain-language explanation of what this result means.

## Other responses

- `400`: The request was malformed — a missing required field, an unparseable body, or a parameter outside its allowed range. The `error` field names what was wrong; retrying the identical request will fail identically.
- `401`: No API key, or a key that is unknown or disabled. Send it in the `X-API-Key` header. Free keys are issued instantly by POST /keys with an email address. The response carries `WWW-Authenticate` pointing at this host's protected-resource metadata, and the `RateLimit-*` headers describing the Free-tier budget a key issued now would carry (scope `anonymous`) — a rejected request spends none of it, so `Remaining` equals `Limit`.
- `429`: Quota exhausted for the current window. `Retry-After` gives the seconds to wait; `upgradeInfo` explains how to lift the cap. Retrying before the reset will fail again and still counts as a request.

---

[API](https://skmtc.dev/rateapi/apis/rate-api.md) · [All operations](https://skmtc.dev/rateapi/apis/rate-api/llms.txt) · [OpenAPI document](https://skmtc.dev/rateapi/apis/rate-api/revisions/06a6db76995f?raw)
