Upload backend/services/max_provider_hub.py with huggingface_hub
Browse files952 unmodified lines953954955956957958959960961962963964965966967968969970971111 unmodified lines1083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110952 unmodified linesdef api_endpoint_catalog() -> Dict[str, Any]:groups: Dict[str, List[Dict[str, Any]]] = {}for item in MAX_PROVIDER_ENDPOINTS:groups.setdefault(item["group"], []).append(item)return {"success": True,"base_prefix": "/api/max","total": len(MAX_PROVIDER_ENDPOINTS),"groups": groups,"endpoints": MAX_PROVIDER_ENDPOINTS,"swagger": "/docs","redoc": "/redoc","timestamp": now_iso(),}def page_functionality_status() -> Dict[str, Any]:111 unmodified linesdef api_help_payload() -> Dict[str, Any]:return {"success": True,"title": "Maximum Provider API Help","summary": "Real provider fallback API using api/ and api-resources registries, cache, circuit breakers, and provider pressure tracking.","catalog": api_endpoint_catalog(),"examples": {"health": "curl $BASE/api/max/health","providers": "curl '$BASE/api/max/providers/status?symbol=BTC&include_slow=true'","price": "curl $BASE/api/max/market/price/BTC","snapshot": "curl '$BASE/api/max/market/snapshot?symbols=BTC,ETH,SOL'","ohlcv": "curl '$BASE/api/max/trading/ohlcv/BTCUSDT?interval=1h&limit=100'","orderbook": "curl '$BASE/api/max/trading/orderbook/BTCUSDT?limit=50'","visual": "curl '$BASE/api/max/system/visual?symbol=BTC'",},"important_notes": ["The first dashboard page is preserved visually.","Non-dashboard pages are connected to /api/max through the bridge or native page logic.","No fake market data is generated; failed chains return UNAVAILABLE with attempts.","Provider pressure state prevents hammering free sources repeatedly.",],"timestamp": now_iso(),}# ---------------------------------------------------------------------------952 unmodified lines953954955956957958959960111 unmodified lines10721073107410751076107710781079952 unmodified linesdef api_endpoint_catalog() -> Dict[str, Any]:from backend.services.api_help_guide import build_endpoint_catalogreturn build_endpoint_catalog()def page_functionality_status() -> Dict[str, Any]:111 unmodified linesdef api_help_payload() -> Dict[str, Any]:from backend.services.api_help_guide import build_api_help_payloadreturn build_api_help_payload()# ---------------------------------------------------------------------------
backend/services/max_provider_hub.py+4-35