Skip to content
Aggre Docs

Loading…

Console

Datasets

On-chain data

DeFi protocol total value locked by day.

On-chain and DeFi figures. Reference: On-chain route.

Protocol TVL#

GET /v1/onchain/defi/protocol_tvl serves DeFi protocol total value locked (TVL) from DefiLlama's protocol list: one row per protocol per UTC day, identified by (slug, as_of). The dataset is onchain.defi.protocol_tvl and it is also listed under finance.market.

Fields include tvl_usd (a JSON number), mcap_usd, change_1h, change_1d, change_7d, category, chain, chains, chain_tvls and tvl_rank (Aggre's own: 1 is the largest TVL of the day). A figure the source leaves out is null, never zero.

Two shapes, chosen by slug:

ShapeParametersResult
A day (no slug)as_of, category (exact, case-sensitive), chain (one element of chains, exact)Every protocol of one day ordered by TVL rank. The newest stored day unless as_of names one. from, to and order are 400 here.
A history (slug)from (inclusive), to (exclusive), both YYYY-MM-DD, orderOne protocol's rows over time, newest first unless order=asc. as_of, category and chain are 400 here.

A cursor pins its day.

Behaviour to know#

  • as_of is the day Aggre read the figure. History starts the day collection started; nothing is backfilled.
  • meta.status is empty for no rows and stale when the answer follows the newest data and Aggre's last successful read is more than 3 days old. It is never stale for a view pinned to a date.
  • Whoever shows a row shows meta.dataset.credit.
  • The route answers 503 terms_unread until the publisher's terms are recorded as read, and then reads no row (Freshness).

Source: content/datasets/onchain.md