---
title: GET /healthz
---

# `GET /healthz`

Check liveness

Liveness and database reachability probe; 200 means the gateway can reach its database.

Money, price, rate and count fields cross the wire as decimal strings; units are shown beside each field ([Wire encoding](/api/wire-encoding)). Group: [System](/api/reference/system/).

**Auth:** none (public)

**Effect:** `read`: reads only

## Request

```bash [curl]
curl -fsS "$HB/healthz"
```

```python [Python]
import os

import requests

HB = os.environ.get("HB", "https://testnet.hardbasis.com")

resp = requests.get(
    f"{HB}/healthz",
)
resp.raise_for_status()
print(resp.json())
```

```ts [TypeScript]
const HB = process.env.HB ?? "https://testnet.hardbasis.com";

const res = await fetch(`${HB}/healthz`, {
  method: "GET",
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(await res.json());
```

## Responses

- **200**: OK
  - <span id="res-200-ok"></span>`ok` · boolean · required
  - <span id="res-200-db"></span>`db` · boolean · required
  - <span id="res-200-tsMs"></span>`tsMs` · string · unit `ms` · required

Example `200` response:

```json
{
  "ok": true,
  "db": true,
  "tsMs": "100000"
}
```

## Errors

Every refusal carries a stable `code` from [`ErrorCode`](/api/reference/all#errorcode) beside human `error` prose; match on the code. See [Errors](/api/errors).

- **503**: Service Unavailable
