Summary
Add a new GET /ui/ endpoint following the same pattern used by /dolar/.
Guide
Follow CONTRIBUTING.md, especially the section named Creating A New Indicator Route.
Expected pattern
- add a new service in app/services/
- add a new router in app/routers/
- export the router from app/routers/init.py
- register the router in app/main.py
- inject HttpxClientDep in the route function signature
- keep scraping logic in the service layer
- return a JSON-friendly dict from the route
Acceptance criteria
- GET /ui/ exists
- the route is visible in /docs
- the route uses the same router/service split as /dolar/
- async helper calls are properly awaited
- the endpoint returns structured JSON, not a coroutine and not raw HTML unless intentionally designed that way
- the scraping selector is documented in the code if it is not obvious
Notes for contributors
Start by copying the /dolar flow and rename everything carefully. The easiest safe path is:
- create the service
- create the router
- export the router
- register the router
- test in Swagger UI
If the value is inside a span, prefer get_span_element(). If it is inside a div, prefer get_div_element().
Summary
Add a new GET /ui/ endpoint following the same pattern used by /dolar/.
Guide
Follow CONTRIBUTING.md, especially the section named Creating A New Indicator Route.
Expected pattern
Acceptance criteria
Notes for contributors
Start by copying the /dolar flow and rename everything carefully. The easiest safe path is:
If the value is inside a span, prefer get_span_element(). If it is inside a div, prefer get_div_element().