trading_agent.gateway.routes.health_routes
¶
The open health check route, which needs no access token.
It reveals only that the gateway is running and the state of each desk, so trading-agent doctor and systemd checks can call it without the token.
Typical usage example:
application.include_router(HealthRoutes(desks).router())
HealthRoutes
¶
Builds the /api/health route.
Creates the routes for a set of desks.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
desks
|
Mapping[str, DeskRuntime]
|
The running desks, keyed by name. |
required |
Source code in src/trading_agent/gateway/routes/health_routes.py
router
¶
Builds the router holding the health route.
Returns:
| Type | Description |
|---|---|
APIRouter
|
The router. |
Source code in src/trading_agent/gateway/routes/health_routes.py
health
¶
Reports that the gateway is running, with each desk's state.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
The status and a list of desks with their state and queue length. |