> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orica.markets/llms.txt
> Use this file to discover all available pages before exploring further.

# Health

> Check API and service health.

## Health Check

Verify the API is operational and measure latency.

```
GET /health
```

```bash cURL theme={"dark"}
curl "https://api.orica.markets/health"
```

```typescript TypeScript theme={"dark"}
const start = Date.now();
const response = await fetch("https://api.orica.markets/health");
const latency = Date.now() - start;

if (response.ok) {
  console.log(`API healthy, latency: ${latency}ms`);
}
```

### Response

```json theme={"dark"}
{
  "status": "ok",
  "version": "1.0.0",
  "timestamp": 1704067200
}
```

### Response Fields

**status** `string`

Health status: `ok` or `degraded`.

**version** `string`

API version string.

**timestamp** `number`

Current server time (Unix timestamp).

***

## Usage

The health endpoint is useful for:

* **Monitoring**: Set up uptime checks that poll `/health`
* **Latency measurement**: Track API response times
* **Service discovery**: Verify the API is reachable before making requests

> [!NOTE]
>
> The health endpoint is not rate limited and does not count against your quota.

***

## Example: Health Check Function

```typescript theme={"dark"}
async function checkApiHealth(): Promise<{
  healthy: boolean;
  latency: number;
}> {
  const start = Date.now();
  
  try {
    const response = await fetch("https://api.orica.markets/health", {
      cache: "no-store"
    });
    
    const latency = Date.now() - start;
    const data = await response.json();
    
    return {
      healthy: response.ok && data.status === "ok",
      latency
    };
  } catch (error) {
    return {
      healthy: false,
      latency: -1
    };
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.