Build a mortgage rates bot for X
the weekly rate, housing news, payment math
Rates went from 6.65% in August to 7.40% in October and are coming back down, and buyers check every week. A free data source, a 35-line script and one RSS feed keep an account posting through it, with no X developer account.
Card required, cancel any time.
The short answer
Read https://fred.stlouisfed.org/graph/fredgraph.csv?id=MORTGAGE30US,MORTGAGE15US (Freddie Mac's weekly survey, no key) every hour on release day, and when a new week appears, post the rates and the change to POST https://opentweet.io/api/v1/posts. For daily headlines, add https://www.mortgagenewsdaily.com/rss/full to the OpenTweet RSS connector. Report averages with their source, and treat any post that quotes your own rate as an ad.
Housing accounts already run on OpenTweet. In the last 30 days, paying accounts posted mortgage industry news (one made more than 100 posts, such as "What two decades of mortgage cycles teach lenders and technology providers"), housing data ("U.S. existing-home sales rose 1.5% in September to a 3.99M annualized pace") and rate forecasts. On Google Trends over the last three months, "mortgage news" drew about 11 times the searches of "twitter bot".
The 30-year rate since September
| Week of (2026) | 30-year fixed | 15-year fixed |
|---|---|---|
| Sep 10 | 6.76% | 6.09% |
| Sep 17 | 6.95% | 6.26% |
| Sep 24 | 7.03% | 6.42% |
| Oct 1 | 7.28% | 6.60% |
| Oct 8 | 7.40% | 6.73% |
| Oct 15 | 7.40% | 6.71% |
| Oct 22 | 7.32% | 6.68% |
| Oct 29 | 7.24% | 6.60% |
| Nov 5 | 7.18% | 6.57% |
Freddie Mac Primary Mortgage Market Survey via FRED (MORTGAGE30US, MORTGAGE15US), read November 10, 2026. 7.40% was the highest in nearly three years, per AP. A year earlier the 30-year was 6.22%.
Six posts a rate account runs on
The script covers the weekly rate. The RSS connector covers headlines and data releases. Scheduled and evergreen posts cover the explainers.
Weekly rate
Thursday30-year and 15-year, the change from last week and a year ago, with the source. The script below writes it.
Rate headline
Most weekdaysWhat moved rates today (a jobs report, inflation data, a Fed decision) in one or two sentences.
Housing data
On release daysExisting-home sales, starts, prices: the number and what it means for buyers.
Payment math
WeeklyWhat the weekly rate means on a $400,000 loan. Buyers save and share these.
Explainer
WeeklyPoints, APR vs rate, ARM vs fixed. Evergreen posts you can recycle.
Local market
MonthlyYour metro's inventory and prices, for an agent or broker account.
The weekly rate post in Python
Downloads both series from FRED, compares the newest week with the week before and the same week a year earlier, posts once, and remembers the week so the next hourly run does nothing. We ran it on November 10, 2026 with the post call swapped for a print: it wrote the post below from the November 5 survey, and a second run stopped with "no new survey yet".
import os, csv, io, pathlib, requests
OT = {"Authorization": f"Bearer {os.environ['OPENTWEET_API_KEY']}"}
LAST = pathlib.Path("last_pmms_date.txt")
resp = requests.get(
"https://fred.stlouisfed.org/graph/fredgraph.csv",
params={"id": "MORTGAGE30US,MORTGAGE15US"},
headers={"User-Agent": "Mozilla/5.0 (mortgage-rate-bot; you@example.com)"},
timeout=60,
)
rows = [r for r in csv.DictReader(io.StringIO(resp.text)) if r["MORTGAGE30US"] not in ("", ".")]
week, prev, year_ago = rows[-1], rows[-2], rows[-53]
if LAST.exists() and LAST.read_text().strip() == week["observation_date"]:
raise SystemExit("no new survey yet")
def move(now, before):
d = float(now) - float(before)
return "unchanged" if abs(d) < 0.005 else f"{'up' if d > 0 else 'down'} {abs(d):.2f}"
text = (
f"30-year fixed mortgage rate: {float(week['MORTGAGE30US']):.2f}% "
f"({move(week['MORTGAGE30US'], prev['MORTGAGE30US'])} from last week)\n"
f"15-year fixed: {float(week['MORTGAGE15US']):.2f}% "
f"({move(week['MORTGAGE15US'], prev['MORTGAGE15US'])})\n\n"
f"A year ago the 30-year was {float(year_ago['MORTGAGE30US']):.2f}%.\n"
f"Source: Freddie Mac PMMS, week of {week['observation_date']}"
)
requests.post("https://opentweet.io/api/v1/posts", headers=OT,
json={"text": text, "publish_now": True}).raise_for_status()
LAST.write_text(week["observation_date"])What it posted
30-year fixed mortgage rate: 7.18% (down 0.06 from last week)
15-year fixed: 6.57% (down 0.03)
A year ago the 30-year was 6.22%.
Source: Freddie Mac PMMS, week of 2026-11-05Run it on release days
# Every hour from 8:00 to 18:00 New York time on Wednesdays and Thursdays
CRON_TZ=America/New_York
0 8-18 * * 3,4 cd /opt/mortgage-bot && python3 post_rate.pyWednesday is in the schedule for holiday weeks, when Freddie Mac publishes a day early. The post is plain text with no link, so it doesn't use a link post on any plan. To add payment math, compute the monthly principal and interest on a sample loan from the new rate and append one line.
FRED is sometimes slow, and picky about clients. In our tests the CSV usually came back in under a second but timed out once at 60 seconds, so let a failed run retry on the next hour. It refused the OpenTweet RSS connector's User-Agent, and the connector reads RSS, not CSV, so the rate needs a script; send a normal User-Agent with a contact address. Freddie Mac allows its survey to be used with attribution, so keep "Source: Freddie Mac" in every post.
Mortgage and housing RSS feeds that work
We requested each feed with the OpenTweet connector's own User-Agent on November 10, 2026. Latest is the date of the newest item.
| Source | Feed URL | Latest | Note |
|---|---|---|---|
| Mortgage News Daily | mortgagenewsdaily.com/rss/full | Nov 9 | Daily rate and bond market commentary; the best fit for a rate account |
| HousingWire | housingwire.com/feed/ | Nov 10 | Lending and real estate industry news; for a loan officer audience |
| Calculated Risk | calculatedrisk.substack.com/feed | Nov 9 | Housing data releases, explained; the old blogspot feed stopped in October |
| CNBC Real Estate | cnbc.com/id/10000115/device/rss/rss.html | Nov 10 | Mainstream housing and rate headlines |
| Realtor.com News | realtor.com/news/feed/ | Nov 9 | Buyer-facing market news and celebrity listings |
| Redfin News | redfin.com/news/feed/ | Nov 9 | Redfin's own data reports; a few a week |
| Scotsman Guide | scotsmanguide.com/rss/ | Nov 7 | Mortgage originator trade news |
Did not work: Inman, The Real Deal, the MBA newsroom and Freddie Mac's press release feed returned 403 to automated requests; NAR's newsroom feed returned 404; National Mortgage News returned an empty feed. More feeds for other beats are in news RSS feeds that work.
Set it up in the RSS connector
Connectors -> New connector -> Blog or newsletter (RSS)
Feed URL: https://www.mortgagenewsdaily.com/rss/full
Prompt: One post for home buyers: what happened to rates
or the housing market today, in one or two plain
sentences, with the number if there is one. Name
the source. No advice, no "now is the time to buy".
Frequency: Every hour
X account: @yourratewatchMortgage News Daily publishes a few items a day, so an hourly check is enough. Scheduled runs skip items older than 48 hours, and each run posts at most the number of posts you set (1, 5 or 10), so a new connector won't flood the account with last week's news.
Freddie Mac release days through December
Freddie Mac publishes on Thursdays, and on Wednesday when a US holiday falls on the Thursday. Check its PMMS release calendar for the holiday weeks.
| Date (2026) | Release |
|---|---|
| Thu Nov 12 | Freddie Mac PMMS: the week after three straight declines |
| Thu Nov 19 | Freddie Mac PMMS |
| Wed Nov 25 | Freddie Mac PMMS moves to Wednesday for Thanksgiving |
| Thu Dec 3, 10, 17 | Freddie Mac PMMS, weekly |
| Week of Dec 21 and Dec 28 | Christmas and New Year weeks: check Freddie Mac's release calendar, holidays can move the day |
Write the week's explainers with an AI agent
Connect Claude, ChatGPT or Cursor to the OpenTweet MCP server and ask: "The 30-year is 7.18% this week. Write five short posts for first-time buyers (payment on a $400,000 loan, points vs no points, APR vs rate, ARM vs fixed, what moves rates), no advice, and schedule them Monday to Friday at 8:00 ET." Read the drafts before they go out; numbers are where AI slips.
Which plan fits your account
Flat monthly price, no per-post fee. The deciding numbers are posts a day and how many carry a link.
| Setup | Typical volume | Plan |
|---|---|---|
| One loan officer or agent: the weekly rate, headlines in your words, explainers | Up to 20 posts a day | Pro, $19.99/mo |
| A housing news account with source links, or a brokerage running 3 accounts | Up to 100 posts a day, 10 link posts, 3 X accounts | Advanced, $29/mo |
| A team of loan officers or a set of metro accounts | Up to 300 posts a day, 20 link posts, 10 X accounts | Agency, $49/mo |
Pro includes 1 link post a day, and link credits add more on any plan. See pricing.
Market news is not a rate ad. "The Freddie Mac average is 7.18%" with its source reports the market. "Get 6.5% with me" is an advertisement: under Regulation Z an ad that states a rate generally has to show the APR, and terms like a payment amount trigger more disclosures. Keep the bot on averages, and let compliance review anything that names your own pricing.
Show who you are. If you are a licensed loan officer, most states and lenders expect your NMLS ID on the profile. Turn on X's Automated label for the bot and name who runs it. More in X automation rules.
No advice from a bot. Leave "now is the time to buy" and "rates will fall" out of the prompt. Say what happened and where the number came from.
Your words, their credit. A one-sentence summary that names the source is news. Pasting the article is copying. See running a news aggregator account.
Frequently asked questions
How do I auto-post mortgage rates to X?
Run a short script once an hour on Thursdays that reads Freddie Mac's weekly survey from FRED (https://fred.stlouisfed.org/graph/fredgraph.csv?id=MORTGAGE30US,MORTGAGE15US, no key needed), checks whether a new week has appeared, and posts the 30-year and 15-year rates with the week-over-week change to POST https://opentweet.io/api/v1/posts. For daily housing headlines, add a mortgage RSS feed such as Mortgage News Daily or HousingWire to the OpenTweet RSS connector. OpenTweet posts through a normal X login, so you need no X developer account.
Is there a free mortgage rates API?
Yes, for the weekly national average. FRED, the St. Louis Fed's data service, republishes Freddie Mac's Primary Mortgage Market Survey as series MORTGAGE30US (30-year fixed) and MORTGAGE15US (15-year fixed). The fredgraph.csv download needs no key; the JSON API at api.stlouisfed.org needs a free key. Daily or lender-level rates are not free: those come from paid sources such as Optimal Blue or a rate-table vendor.
When does Freddie Mac publish mortgage rates?
Once a week, usually on Thursday. Freddie Mac moves the release to Wednesday when a US holiday falls on Thursday, so Thanksgiving week's survey comes out on Wednesday, November 25, 2026. FRED usually adds the new week the same day. Have your script check every hour on release day instead of guessing a time.
What are mortgage rates right now?
On the Freddie Mac survey dated November 5, 2026, the 30-year fixed averaged 7.18%, down 0.06 from 7.24% the week before and the third weekly decline in a row, and the 15-year fixed averaged 6.57%. The 30-year peaked at 7.40% on October 8 and 15, its highest in nearly three years per AP, and was 6.22% a year earlier. The next survey is due Thursday, November 12.
Can a loan officer post mortgage rates on X?
Market news, yes; your own rates, carefully. Reporting the Freddie Mac average with its source is news. A post that quotes a rate you or your lender offer is an advertisement, and under Regulation Z (the Truth in Lending Act) an ad that states a rate generally has to state it as an APR, and some terms trigger more disclosures. Most states and lenders also want your NMLS ID on the profile or the post. Ask your compliance team before automating anything that names your own pricing.
Which mortgage news RSS feeds work?
On November 10, 2026 these returned fresh items to an automated request: mortgagenewsdaily.com/rss/full, housingwire.com/feed/, calculatedrisk.substack.com/feed, redfin.com/news/feed/, realtor.com/news/feed/, CNBC real estate (cnbc.com/id/10000115/device/rss/rss.html) and scotsmanguide.com/rss/. Inman, The Real Deal, the MBA newsroom and Freddie Mac's press release feed returned 403, and NAR's old newsroom feed returned 404.
Real estate agent? See X for real estate. Markets and earnings instead? See the stock market bot, the earnings call bot and the SEC filings bot.
Everything you can build on X with OpenTweet
Post to X from your code, a watcher, or an AI agent. Start anywhere in the cluster.
OpenTweet vs the X API
Post, schedule, and automate X without a developer account or the $200/mo minimum.
X DM outreach, human-approved
Find and qualify leads, AI-draft DMs, approve each one, and drip-send from your own account via API or MCP.
Post to X without an API
The clean, account-safe way to post to X from your code or an AI agent.
Twitter MCP Server
Give Claude, Cursor, and OpenClaw the ability to post to X. 44 tools included.
Developer docs
Quickstart, API keys, MCP setup, and the REST reference for posting to X from code or an agent.
Cross-posting reference
One call posts to X, Bluesky and LinkedIn. The platforms field, per-network results, and why a network gets skipped.
Social media API for AI agents
Three ways an agent can post to X, Bluesky and LinkedIn, and the trade-offs of each.
LinkedIn MCP server
Post and schedule to a LinkedIn profile from Claude or Cursor through the official LinkedIn API.
XMCP vs OpenTweet
X's official MCP server bills per API call and cannot schedule. Compare it with the flat-fee hosted MCP.
MCP for AI agents
Connect your AI client to X in under two minutes, no X developer account.
Developer API and keys
REST endpoints, one bearer key, and usage tracking. Build on OpenTweet.
OpenTweet for AI agents
The posting layer for autonomous agents and automations that live on X.
Build an AI Twitter persona
Give your AI agent its own X account. Setup, cadence, and the rules that keep it safe.
Best MCP servers for social media
The 2026 ranked list. How the hosted OpenTweet MCP compares with the official X MCP and others.
Best API to post to X
Seven options priced at real volumes, and why links decide the bill.
Cheapest way to post to X via code
Flat fee vs pay-per-use. Why the $0.20 per-link fee flips the math past ~145 link posts a month.
X API pricing 2026
Every pay-per-use X API endpoint price from docs.x.com in one searchable table.
Bluesky posting API
Post and schedule to Bluesky with one REST call and OAuth, and cross-post to X and LinkedIn in the same request.
Automate LinkedIn posts
Post to LinkedIn from an AI agent, n8n or a script through the official Posts API, with one REST or MCP call.
This Thursday's rate, posted the hour it comes out
Connect X, run the script, add one housing feed, and the account keeps itself current.