# Fund Metric Names

> Returns every metric name available on `/v2/funds/metrics`, with the unit and a description for each name.

`GET https://api.bavest.co/v2/funds/metrics/names`

Group: Funds. Route id: `v2_funds_metric_names`. Free in every plan, including the trial.

## Description

Returns every metric name available on `/v2/funds/metrics`, with the
unit and a description for each name. Metric families such as calendar
year returns are returned as name patterns. Any name that matches a
listed pattern is a valid metric name, for example
`calendar_year_return_2025`.

Use these names with the `fields` parameter of `/v2/funds/metrics`. The
vocabulary is versioned with the API. New metric names may be added over
time and additions are backward compatible.

No fund identifier is required.

## Authentication

Send your API key in the `x-api-key` header on every request. No key yet? Sign up at https://dashboard.bavest.co/sign-up (free trial). The examples read the key from the `BAVEST_API_KEY` environment variable.

## Parameters

None.

## Response

200 Successful response (`application/json`).

| Field | Type | Always present | Description |
|---|---|---|---|
| `data` | object | no |  |
| `data.count` | integer | no | Number of exact metric names (name-pattern families are listed separately and not included in the count) Example: `51`. |
| `data.metrics` | array of object | no |  |
| `data.metrics[].name` | string | no | Canonical metric name (snake_case) Example: `cumulative_return_1y`. |
| `data.metrics[].unit` | string | no | Unit of measurement (MetricUnitModel value) One of `CURRENCY`, `PERCENTAGE`, `RATIO`, `NUMERIC`. Example: `PERCENTAGE`. |
| `data.metrics[].description` | string | no | Human-readable description of the metric. Example: `Total return over the trailing 1-year window`. |
| `data.patterns` | array of object | no | Metric-name families accepted in addition to the exact names. |
| `data.patterns[].pattern` | string | no | Regular expression the metric name must match. Example: `^calendar_year_return_(19|20)[0-9]{2}$`. |
| `data.patterns[].unit` | string | no | Unit of measurement (MetricUnitModel value) One of `CURRENCY`, `PERCENTAGE`, `RATIO`, `NUMERIC`. Example: `PERCENTAGE`. |
| `data.patterns[].description` | string | no | Human-readable description of the metric family. Example: `Calendar-year total return; the year is part of the metric name`. |
| `meta` | object | no | Response envelope metadata. |
| `meta.time` | integer | no | Server-side processing time in milliseconds. Example: `17`. |
| `meta.parameters` | object | no | Echo of the request parameters the endpoint resolved. |

## Example request

```bash
curl 'https://api.bavest.co/v2/funds/metrics/names' \
  -H "x-api-key: $BAVEST_API_KEY"
```

## Example response

```json
{
  "data": {
    "count": 52,
    "metrics": [
      {
        "name": "alpha_10y",
        "unit": "RATIO",
        "description": "Alpha vs. the peergroup benchmark, trailing 10 years (EUR basis)"
      },
      {
        "name": "alpha_1y",
        "unit": "RATIO",
        "description": "Alpha vs. the peergroup benchmark, trailing 1 year (EUR basis)"
      }
    ],
    "patterns": [
      {
        "pattern": "^calendar_year_return_(19|20)[0-9]{2}$",
        "unit": "PERCENTAGE",
        "description": "Calendar-year total return; the year is part of the metric name"
      }
    ]
  },
  "meta": {
    "time": 298
  }
}
```

## Errors

| Status | Meaning |
|---|---|
| 401 | Missing or invalid API key. |
| 429 | Rate limit exceeded. Retry after the `Retry-After` header interval. |
| 500 | An unexpected error occurred on the server. If the issue persists, contact support with the X-Request-Id header value. |
| 502 | Upstream data provider returned an error or is temporarily unavailable. Retry after a short delay. |
| 504 | The request timed out waiting for a response from the upstream data provider. This may occur for complex queries or during peak load. |
| default | An unexpected error occurred on the server. If the issue persists, contact support with the X-Request-Id header value. |

- `403` from the gateway: the API key is invalid or switched off.
- `429` with message `Limit Exceeded`: the monthly quota of the key is used up. With `Too Many Requests`: the key is throttled, or this route is not in the key's plan. Wait for `Retry-After` when it is sent.

## Links

- HTML page: https://dashboard.bavest.co/docs/v2_funds_metric_names
- OpenAPI: https://dashboard.bavest.co/openapi.json (YAML: https://dashboard.bavest.co/openapi.yaml)
- Authentication: https://dashboard.bavest.co/docs/authentication.md
- MCP server for AI agents: https://dashboard.bavest.co/docs/mcp.md
- All routes: https://dashboard.bavest.co/llms.txt
