apyhub
Back
▣ FINANCE

Get DeFi Protocol TVL Data API

What it does

DeFi Protocol TVL lets you look up total value locked data for a DeFi protocol by passing its protocol query parameter. Send a protocol name or slug, and get back the protocol’s name, slug, source, degraded flag, and TVL-related metrics in a structured response.

The response can include the protocol’s chains, symbol, category, currentTvl, marketCap, change1h, change1d, change7d, and chainTvls by chain. That makes it useful when you need a quick snapshot of protocol size and recent movement without wiring up a market data feed yourself.

Use DeFi Protocol TVL when you are building dashboards, research tools, alerts, or portfolio views that need protocol-level TVL data. The degraded field tells you when the upstream payload was too large and only current TVL is available, so you can handle partial data explicitly.

GET
DeFi protocol TVL
https://api.eu.apyhub.com/corsair96/get-defi-protocol-tvl-data/crypto/defi

QUICKSTART

GUIDE

Quickstart

Fetch TVL data for a protocol by passing its protocol as a query parameter.

curl -X GET "https://api.eu.apyhub.com/corsair96/get-defi-protocol-tvl-data/crypto/defi?protocol=uniswap" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with required source, slug, name, and degraded fields, plus optional TVL metadata such as chains, symbol, category, change percentages, chainTvls, marketCap, and currentTvl.

{
  "source": "defillama",
  "slug": "uniswap",
  "name": "Uniswap",
  "chainTvls": { 
     "Ethereum": 2462012546 
},
  "degraded": false
}
TRY ITLIVE · 60 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns TVL data for a specified DeFi protocol. You provide the protocol identifier in the query string, and the response contains the protocol metadata plus TVL-related fields.

Query Parameter(s)

AttributeTypeMandatoryDescription
protocolStringYesProtocol identifier to look up.

Response

Returns a JSON object with required source, slug, name, and degraded fields, plus optional protocol metadata and TVL metrics. degraded is a boolean that indicates whether only current TVL is available because the upstream payload exceeded the size limit.

ParameterTypeDescription
nameStringProtocol name.
slugStringProtocol slug.
chainsString ArrayList of chains associated with the protocol.
sourceStringData source identifier.
symbolStringProtocol symbol, or null.
categoryStringProtocol category, or null.
change1dNumber24h change percentage, or null.
change1hNumber1h change percentage, or null.
change7dNumber7d change percentage, or null.
degradedBooleanTrue when the upstream payload exceeded the size limit and only current TVL is available.
chainTvlsObjectPer-chain TVL values keyed by chain name.
marketCapNumberMarket cap, or null.
currentTvlNumberCurrent TVL, or null.

Notes

If degraded is true, the response may include only current TVL data rather than the full upstream payload.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.