|
Download docs/API_REFERENCE.md from Really-amin/Datasourceforcryptocurrency-4: direct link, hf CLI and curl.
- Browser
- Download file 2.54 kB
-
https://huggingface.co/spaces/Really-amin/Datasourceforcryptocurrency-4/resolve/main/docs/API_REFERENCE.md
- Command line
-
hf download hf://spaces/Really-amin/Datasourceforcryptocurrency-4/docs/API_REFERENCE.md
-
curl -L -o API_REFERENCE.md https://huggingface.co/spaces/Really-amin/Datasourceforcryptocurrency-4/resolve/main/docs/API_REFERENCE.md
2.54 kB
| # 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. | |