diff --git a/server.py b/server.py index eeeb90d..561c818 100644 --- a/server.py +++ b/server.py @@ -165,6 +165,21 @@ class AnalyzeBody(BaseModel): submission_ids: list[int] = [] all: bool = False + +# ---- Public Pricing Proxy (fetches from P&L Platform on CT 125) ---- + +@app.get("/api/public/pricing") +async def proxy_public_pricing(): + """Proxy: fetch live pricing from Vela Platform P&L manager.""" + import urllib.request, json + try: + req = urllib.request.Request("http://192.168.1.125/api/public/pricing") + with urllib.request.urlopen(req, timeout=5) as resp: + return json.loads(resp.read().decode()) + except Exception as e: + raise HTTPException(502, f"P&L backend unavailable: {e}") + + # ---- Auth ---- @app.post("/admin/login")