Live
Precio Dólar RD — every bank's rate in one place
Personal project: it gathers the dollar rate from Dominican banks, computes the average and shows the Central Bank's official reference.
- Year
- 2026
- Role
- Personal project, solo
- Stack
- Next.js · TypeScript · Cheerio · Tailwind CSS

Context
In the Dominican Republic each bank sets its own dollar rate, and the gap between the best and the worst can be several pesos. Anyone about to exchange money ends up opening five tabs to compare, or exchanges at the first place they find and loses money without noticing. I gathered every rate onto a single page, with the market average and the Central Bank's official reference beside it.
The problem
The data doesn't come from any API: it has to be read off each institution's page. And the Central Bank, which is the official reference, doesn't publish its rate in the HTML — it loads it behind the scenes from an internal endpoint that rejects anyone who doesn't look like its own page.
The solution
The site polls the sources every minute and assembles the full table: banks, exchange agents, the average and the Central Bank. Each institution also gets its own page, meant for someone searching directly for «dollar at Banreservas» instead of arriving through the front page.
Technical decisions
- For the Central Bank you have to visit its page first and keep the session cookies; without them the endpoint answers 200 with an empty body. It sends the cookie twice and only the last one counts, so it has to be deduplicated keeping the second.
- Three cascading sources for the scraping: direct, and if that fails, two proxies. One blocked server can't be allowed to leave the page blank.
- If a request fails, the last good rate held in memory is served, and if there isn't one, a static fallback. A rate from a minute ago is worth more than an empty card.
- The system logs a warning if an institution stops being found because the source renamed it. Without that, that bank's page would quietly go dataless.
Results
- More than twenty institutions comparable at a glance, refreshed every minute.
- One page per bank, with structured data and FAQs for search engines.
- No source outage leaves the page without rates.
Project screenshots
Click any image to enlarge it.