# APEX Data Hub API Reference This package mounts new API routes without replacing the existing Space homepage. ## Console routes - `GET /datahub` — English Data Hub console. - `GET /datahub/console` — same console route. - `GET /datahub/help` — help and operating guide. ## Provider probe API - `GET /api/provider-probe/catalog` - Returns the active provider catalog loaded from `api-resources/apex_provider_runtime_catalog_free_v1.json`. - `GET /api/provider-probe/status` - Returns the latest persisted provider health summary from SQLite. - `GET /api/provider-probe/run?concurrency=5&timeout=12` - Runs a backend-side provider probe from the Hugging Face Space runtime. - Returns a single report with summary, healthy/degraded/failed providers, capability matrix, recommended order, missing secrets, and raw evidence. - `GET /api/provider-probe/report` - Returns the latest complete persisted runtime report. - `GET /api/provider-probe/history?limit=10` - Returns recent probe run summaries. ## Compatibility API added for APEX gaps - `GET /api/coverage` - Provider and capability coverage summary derived from persisted health results. - `GET /api/new-sources/status` - New-source and missing-secret status, suitable for diagnostics UI. - `GET /api/fear-greed` - Alternative.me Fear & Greed wrapper. Does not invent upstream confidence. - `GET /api/defi/protocols` - DeFiLlama protocols/TVL wrapper. - `GET /api/defi/yields` - DeFiLlama yields/pools wrapper. - `GET /api/news/latest` - Unified news wrapper: keyed providers first when configured, then public/server-side fallbacks, then explicit `UNAVAILABLE`. - `GET /api/resources/news/latest` - Alias for the unified news service. ## Response states The package preserves no-fabrication semantics: - `LIVE` — fresh provider data fetched and parsed successfully. - `CACHED` — previously real data, returned within an explicit freshness window. - `DEGRADED` — partial or lower-quality fallback; never treated as primary truth. - `UNAVAILABLE` — no trusted source currently available. - `NEEDS_KEY` — provider is configured in catalog but required/optional key is missing. - `SCHEMA_MISMATCH` — HTTP response arrived but failed parser/validator expectations. - `RATE_LIMITED` — provider rejected due to quota/rate limit. - `HTTP_ERROR` / `NETWORK_ERROR` — transport failed. ## Secret policy Secret values never appear in committed files, HTML, API responses, JSON reports, or logs. Use Hugging Face Space Secrets only.