Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent
with a free APIs.io key —
sign in with
GitHub,
Google or
LinkedIn.
No form to fill in; signing in shares your email address with us (Privacy).
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: ZeroGEX Health API
description: 'Real-time options analytics API.
**Two versions are served.**
* **v2 (recommended)** — `/api/v2/*`. Every endpoint returns `{"data": ..., "freshness": {...}}`, where the `freshness` block reports response evaluation time, the underlying data''s source timestamp, the market session, the expected update cadence, and a rolled-up `freshness_status` — so endpoint health and data age are separate, machine-readable facts on every response.
* **v1 (stable)** — `/api/*` and `/api/v1/levels/*`. Unchanged and supported; `data` in a v2 response is byte-for-byte the v1 body.
See "API versions & the freshness envelope" in API_Guide.md for the field contract and the per-endpoint cadence table.'
version: 2.0.0
tags:
- name: Health
description: API and database health checks
paths:
/api/health/live:
get:
tags:
- Health
summary: Liveness Probe
description: 'Liveness probe: the process is up and able to serve HTTP. No DB call.
Public (see ``security._PUBLIC_PATHS``) and dependency-free so it cannot
401, 503, or hang on the database — the properties a systemd/ELB liveness
gate needs. Deep DB + freshness health lives at ``/api/health``.'
operationId: liveness_probe_api_health_live_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
security:
- HTTPBearer: []
/api/health:
get:
tags:
- Health
summary: Health Check
description: 'Check API and database health (DEEP — touches the DB).
Returns HTTP 200 only when the database is reachable. A degraded
backend (db_manager.check_health() returns False) surfaces as HTTP
503 with the same response body so uptime monitors, load balancers,
and Kubernetes probes can act on the status code — the previous
behavior returned 200 with ``status="degraded"`` and was treated as
healthy by every standard probe.
For a process-liveness signal that does NOT depend on the DB (e.g. the
systemd ExecStartPost gate), use ``/api/health/live`` instead.'
operationId: health_check_api_health_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/HealthStatus'
security:
- HTTPBearer: []
components:
schemas:
HealthStatus:
properties:
status:
type: string
title: Status
description: healthy, degraded, or unhealthy
database_connected:
type: boolean
title: Database Connected
last_data_update:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Last Data Update
data_age_seconds:
anyOf:
- type: integer
- type: 'null'
title: Data Age Seconds
type: object
required:
- status
- database_connected
title: HealthStatus
securitySchemes:
HTTPBearer:
type: http
scheme: bearer
bearerFormat: API-Key