---
title: "Get historical metrics for a project"
method: GET
path: "/v2/projects/{project_id}/metrics"
tags: ["Projects"]
---

# Get historical metrics for a project

`GET /v2/projects/{project_id}/metrics`

Use this endpoint to retrieve historical data for a project. Fill in the required fields on the modal to the right.

This endpoint supports partial success - if some of the requested metric, chain, or product IDs are not found, the endpoint will return data for the valid entities and include an `errors` array with details about the invalid ones.

## Path parameters

- `project_id` string, string, required

## Query parameters

- `metric_ids` string[]
- `chain_ids` string[]
- `product_ids` string[]
- `market_sector_ids` string[]
- `aggregate_by` 'chain' | 'product_id'
- `start` string, date
- `end` string, date
- `order_direction` 'asc' | 'desc'
- `assets_bridged` boolean

## Response `200`

OK

- object
  - `data` object[]
    - `timestamp` string — Returns the historical date for a given metric(s).
    - `project_name` string — Returns the project name used on the web application.
    - `project_id` string — Returns the project ID.
    - `chain` string — Returns the chosen metric(s) per chain. Has to be selected from the aggregate_by parameter.
    - `business_line` string — Returns the chosen metric(s) per business line. Has to be selected from the aggregate_by parameter.
    - `version` string — Returns the chosen metric(s) per version. Has to be selected from the aggregate_by parameter.
    - `metric_id(s)` string — Returns the chosen metric(s) for the project. The full list of available metrics can be retrieved from the projects/:project_id endpoint (see above). The metric_id(s) have to be selected from the metric_ids parameter.
  - `errors` object[] — Optional array of errors that occurred during request processing. Only present if some requested entities were not found. The endpoint returns data for valid entities even when errors are present, allowing partial success.
    - `code` 'NOT_FOUND', required — Error code indicating the entity was not found
    - `field` 'project_ids' | 'metric_ids' | 'chain_ids' | 'product_ids' | 'market_sector_ids', required — The request parameter field that contained the invalid value
    - `value` string, required — The invalid ID value that was not found

---

[API](https://skmtc.dev/tokenterminal/apis/token-terminal-api.md) · [All operations](https://skmtc.dev/tokenterminal/apis/token-terminal-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tokenterminal/token-terminal-api/revisions/02245ad77f39/schema)
