No surprises at lock
Eligibility runs as a cheap first pass. If the borrower or property is borderline on a 1% LTV change, you see it before you lock — not after.
Stateless rule engine with a three-tier cache, multi-mode pricing (BEST_EX, BY_RATE, BY_PRICE), two-stage eligibility, full per-rule trace, drill-down, and historical replay. Loan-level pricing across every active investor — in milliseconds.
Overview
The pricing engine is stateless. Each request loads the active ratesheet (Caffeine 60s → Redis → MySQL), runs the eligible programs against the loan, and applies AND/OR-composed adjustment rules in deterministic combine strategies (SUM, MAX, MIN, OVERRIDE, REPLACE_DIMENSION). Every rule is data-driven — no investor-specific code. Every quote returns a per-rule trace describing exactly which rule fired, the condition matched, the value contributed, and the running cumulative price.
BEST_EX returns the best execution across every eligible investor; BY_RATE returns the price ladder at a pinned rate; BY_PRICE returns the rate ladder at a pinned price.
Stage 1 runs cheap program-eligibility checks; only survivors run the full pricing ladder. Saves both latency and rule-engine work.
Every quote ships with the ordered list of rules that fired, the condition each matched, and the value each contributed — readable straight to compliance.
Open a quote and re-pin its rate to see the full ladder around it, or expand any adjustment line to its source rule and source ratesheet version.
Reprice as of any prior moment using the ratesheet that was active at that timestamp — useful for disputes, audits, or recreating a lock-day price.
Caffeine local cache (60s) → Redis cluster cache → MySQL source of truth, invalidated on the NATS ratesheets.activated event so every node reflects activations within milliseconds.
How it works
Numbered steps from input to output. Each step maps to a specific subsystem you can inspect via OpenTelemetry.
Borrower, loan, property, transaction, and execution facets. Every facet is documented in the OpenAPI spec, every required field is enforced before any rule runs.
Programs are filtered against the loan profile (occupancy, doc type, LTV, FICO, state, etc.). Survivors progress to Stage 2.
For each survivor, the engine loads the active ratesheet, computes the base price at the requested rate (or scans the rate ladder), then layers AND/OR-composed adjustment rules using the configured combine strategy.
Branch / loan-officer / org-level margin rules apply on top of the base price; MI, buydown, and cap layers fire next, each with their own trace lines.
BEST_EX picks the highest final price across all eligible investors; BY_RATE returns the ladder pinned at a rate; BY_PRICE returns the ladder pinned at a price.
The response includes the per-rule trace; the engine emits pricing.computed on NATS with the same correlationId, so webhooks and downstream consumers can join on it.
Hands on
Live cURL sample — copy, paste, ship.
curl -X POST https://api.ratestack.com/v1/pricing/explain \
-H "X-API-Key: $RATESTACK_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"borrower": { "fico": 752 },
"loan": { "loanAmount": 425000, "loanType": "CONFORMING", "amortizationType": "FIXED" },
"property": { "attachmentType": "DETACHED", "constructionMethod": "SITE_BUILT", "projectLegalStructureType": "NONE", "projectClassificationIdentifier": "NA", "pudIndicator": false, "financedNumberOfUnits": 1, "propertyEstateType": "FEE_SIMPLE", "occupancy": "PRIMARY", "state": "CA", "appraisedValue": 532000 },
"transaction":{ "type": "PURCHASE" },
"execution": { "lockPeriodDays": 30 },
"pricingMode":"BEST_EX"
}'Why this matters
Eligibility runs as a cheap first pass. If the borrower or property is borderline on a 1% LTV change, you see it before you lock — not after.
Per-rule trace converts a number into a defensible answer. Auditors stop asking 'why' because the answer is in the response payload.
Retail, broker, correspondent, and sell-side all run the same engine. The per-channel comp/margin layer is the only thing that changes.
Frequently asked
It is purpose-built for residential mortgage pricing — but the operators and combine strategies are general enough that we have not had to add a hardcoded special case in production. Every adjustment is a row in MySQL, not code.
There is no investor-specific code. Investors are rows in MySQL; their ratesheets are versioned blobs; their adjustments are rules. You can disable an investor with a config change — no deploy required.
Yes. Every pricing endpoint is read-only with respect to investor state; only your own scenarios are persisted, and only when you explicitly save them.
Cold cache + cold ratesheet + 50 active investors lands around 800 ms p99. Warm-path p95 is sub-200 ms. The three-tier cache is invalidated by NATS, not TTL drift, so cold paths are rare in steady state.
Pass an as-of timestamp. The engine uses the ratesheet that was active at that time. Useful for replaying lock-day pricing, regulator requests, or post-mortem on any prior decision.
How we compare
Specific angles, not generic feature checklists. Each row links to a longer side-by-side; we're transparent about where competitors are the better choice.
Per-rule traces and historical replay are first-class on every quote — not an Enterprise-tier add-on.
See the side-by-sideSame modern-UI feel, but BEST_EX and rule traces ship in the free Sandbox tier with no sales call.
See the side-by-sideStateless rule engine you can drive entirely from REST or GraphQL, with idempotency keys end-to-end.
See the side-by-sideOpen APIs and OpenAPI 3 spec — no Encompass dependency, no opaque rules engine.
See the side-by-sideEngineered for capital markets, not LO marketing. Drill-down explains every adjustment, not just the headline rate.
See the side-by-sideComparisons reflect each vendor's public positioning. Where a fact is unverifiable, we mark it "Depends" or "Unknown" instead of guessing.
Related capabilities
Ready to see it on your data?
We'll spin you a sandbox, load your actual ratesheets, and walk you through this capability against your top scenarios.