Liveness probe
const url = 'https://api.cotes.ai/v1/health';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.cotes.ai/v1/healthReports whether the API is up and which build is running. It needs no API key and is exempt from rate limiting, so use it for uptime checks and status pages instead of polling a contest endpoint.
The response is always 200 while the process is serving. ok and db
tell you whether it can reach its database: ok: false with db: down
means contest and stream requests will fail until the database is back,
so treat it as degraded and back off. version, commit and
model_version identify the release and the signal model it serves, which
is useful when you report an issue.
Responses
Section titled “Responses”Service is up
object
Release of the service currently running.
Short git commit of the running build; null when the deploy environment does not expose one.
Deprecated BTC build-artifact tag, scoped by model_series (KXBTC15M). This service does not run the model; a signal’s own model_version is authoritative for what produced it. Use /v1/series for the latest stored reading per asset, rather than treating this build artifact as the production model for every asset.
Series associated with the legacy build-artifact model_version.
Example
{ "db": "up", "version": "1.4.0", "commit": "a1b2c3d4e5f6", "model_version": "c5456da6", "model_series": "KXBTC15M"}