---
title: "Get protocol stats"
method: GET
path: "/protocol/{id}/stats"
tags: ["Protocol"]
---

# Get protocol stats

`GET /protocol/{id}/stats`

Get historical stats for a protocol, comprising all of its vaults. If no parameters are passed, response will span the full range of available data.If a timestamp is passed, the data will be for that point in time. If a start and end timestamp are passed, the data will be for that range.

## Path parameters

- `id` string, required — Protocol ID to return stats for

## Query parameters

- `start_timestamp` integer — Unix timestamp for the start of the time series data
- `end_timestamp` integer — Unix timestamp for the end of the time series data
- `granularity` 'hour' | 'day' — Granularity of the time series data. Default is day.
- `timestamp` integer — Unix timestamp if you want the data at a point in time instead of a range
- `fetch_superform_tvl` boolean — Calculate the Superform (not overall) TVL for all the vaults comprising this protocol

## Response `200`

OK

- HistoricalProtocolResponseBody
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `historical_data` HistoricalDataStruct, required
    - `timestamp` integer[], required
    - `tvl` number[], required
  - `superform_tvl` number, double
  - `total_vaults` integer, required
  - `tvl` number, double, required
  - `tvl_24h_change` number, double, required

## Other responses

- `default` — Error

---

[API](https://skmtc.net/superform/apis/superform-api.md) · [All operations](https://skmtc.net/superform/apis/superform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/superform/superform-api/versions/6eb27ced1c96/schema)
