Problem
The server depends on public TradingView scanner/search endpoints, casts JSON directly to local interfaces, has no bounded retry policy, and accepts invalid environment rate-limit configuration. Endpoint or response-shape changes can yield opaque failures or misleading empty data.
Scope
- Validate required response shapes at the API boundary.
- Add bounded retries with backoff for safe transient failures only.
- Normalize timeout, HTTP, parse, and upstream-shape errors.
- Validate
CACHE_TTL_SECONDS and RATE_LIMIT_RPM at startup with actionable errors.
- Add tests for malformed responses, retry exhaustion, retry success, timeout, and invalid configuration.
Acceptance criteria
- Malformed upstream payloads fail explicitly rather than being treated as valid empty results.
- Retries are bounded, do not retry caller/input errors, and preserve rate-limit safety.
- Invalid configuration fails before serving requests.
- Existing live integration behavior remains intact.
Non-goals
No alternate data provider, browser automation, websocket streaming, persistence, or hosted deployment.
Problem
The server depends on public TradingView scanner/search endpoints, casts JSON directly to local interfaces, has no bounded retry policy, and accepts invalid environment rate-limit configuration. Endpoint or response-shape changes can yield opaque failures or misleading empty data.
Scope
CACHE_TTL_SECONDSandRATE_LIMIT_RPMat startup with actionable errors.Acceptance criteria
Non-goals
No alternate data provider, browser automation, websocket streaming, persistence, or hosted deployment.