manuelernestog/exchange-rate-api — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a simple free API that gives exchange rates in Cuba in a way apps can consume easily. It should pull data from public third party sources and expose clean JSON endpoints for both formal and informal rates. I want endpoints like /api/v2/formal/source/{symbol}.json and /api/v2/formal/target/{symbol}.json, and the same idea for informal rates, with the symbols shown in the docs such as usd, eur, cup, mlc, cad, chf, gbp, jpy, and mxn where they apply.

Please make it work well as a static deploy by default, since the data only changes daily, but leave it able to run server rendered too if I want fresh data on demand. If it is static, set it up so it is easy to rebuild on a schedule every 12 or 24 hours. Keep the code simple, readable, and easy to change if I want to swap data sources later. Add basic docs in the README with how to run it locally and what each endpoint returns. Look up current Astro docs online if you need to.

Want more depth? Deep Reverse