---
title: "Project DeFi Metrics"
method: GET
path: "/gateway/v1/project/defi/metrics"
tags: ["Project"]
---

# Project DeFi Metrics

`GET /gateway/v1/project/defi/metrics`

Returns historical time-series for a single DeFi protocol metric (e.g. daily TVL). Each data point has a Unix timestamp and value.

**Available metrics:** `volume`, `fee`, `fees`, `revenue`, `tvl`, `users`.

**Lookup:** by UUID (`id`) or name (`q`). Filter by `chain` and date range (`from`/`to`). Returns 404 if the project is not found.

**Pagination:** check `meta.has_more`; when true, increase `offset` or `limit` to fetch the remaining points.

**Note:** this endpoint only returns data for DeFi protocol projects (e.g. `aave`, `uniswap`, `lido`, `makerdao`). Use `q` with a DeFi protocol name.

## Query parameters

- `id` string — Surf project UUID. PREFERRED — always use this when available from a previous response (e.g. project_id from /fund/portfolio or id from /search/project). Takes priority over q.
- `q` string — Fuzzy entity name search. Only use when 'id' is not available. May return unexpected results for ambiguous names.
- `metric` 'volume' | 'fee' | 'fees' | 'revenue' | 'tvl' | 'users' — Metric to query. Can be `volume`, `fees` (or `fee` alias), `revenue`, `tvl`, or `users`. Defaults to tvl.
- `from` string — Start of time range. Accepts Unix seconds (`1704067200`) or date string (`2024-01-01`)
- `to` string — End of time range. Accepts Unix seconds (`1706745600`) or date string (`2024-02-01`)
- `chain` 'ethereum' | 'polygon' | 'bsc' | 'arbitrum' | 'optimism' | 'base' | 'avalanche' | 'fantom' | 'solana' — Filter by chain. Can be `ethereum`, `polygon`, `bsc`, `arbitrum`, `optimism`, `base`, `avalanche`, `fantom`, or `solana`.
- `limit` integer — Results per page
- `offset` integer — Pagination offset

## Response `200`

OK

- DataResponseProjectMetricPoint
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `data` ProjectMetricPoint[], nullable, required
    - `timestamp` integer, required — Unix timestamp in seconds for this data point
    - `value` number, double, required — Metric value at this timestamp
  - `meta` OffsetMeta, required
    - `cached` boolean, required — Whether this response was served from cache
    - `credits_used` integer, required — Credits deducted for this request
    - `empty_reason` string — Hint explaining why the data array is empty, when applicable
    - `has_more` boolean — Whether more items may exist beyond this response. For offset-paged endpoints, continue with a larger offset. For time-series endpoints without offset/cursor controls, true means the requested time range hit an upstream cap; narrow from/to to continue. Omitted when exhaustion cannot be proven.
    - `limit` integer, required — Maximum number of items returned in this response
    - `offset` integer, required — Number of items skipped (pagination offset)
    - `total` integer — Total number of matching items (before pagination). Omitted when total is unknown.
    - `watermark` integer — Warehouse watermark (Unix seconds) this response was computed at, on warehouse-backed endpoints (e.g. Hyperliquid /trades/aggregate) — rows up to this time come from the warehouse, newer rows from the live tail. Omitted elsewhere.

## Other responses

- `default` — Error

---

[API](https://skmtc.dev/asksurf/apis/asksurf-public-rest-api.md) · [All operations](https://skmtc.dev/asksurf/apis/asksurf-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/asksurf/apis/asksurf-public-rest-api/revisions/4a9654317fc5?raw)
