Get DeFi TVL Data
1. Overview & Typical Use
Returns TVL (Total Value Locked) statistics for DeFi protocols on the TRON chain and details for each project.
- Typical use: monitoring TRON DeFi ecosystem TVL changes, analyzing protocol TVL rankings, evaluating DeFi growth trends.
- When not to use: to query token total value, use “Get Token On-Chain Total Value (TVC)”; for aggregate statistics, use “Get TRON Statistics Overview”.
2. Endpoint & Authentication
GET /api/defiTvl
For Base URL and authentication, see Common Network & Authentication.
3. Request
Fields
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | No | — | When set to tvlline, the result includes a tvlLine array |
startTime | integer | No | 7 days ago | Start time in seconds |
endTime | integer | No | Current time | End time in seconds |
project | string | No | All | Specific project: SUN, JustLend, JustStable, JustCryptos, or JustSwap |
show | string | No | — | When set to day, the response additionally returns a tvlLineByDay array |
4. Response
Fields
Top-level
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
total | number | Required | Total DeFi TVL | USD |
tvlLine | array | Optional | TVL trend data (only when type=tvlline), each item contains t (Unix timestamp string in seconds) and v (number, USD) | — |
tvlLineByDay | array | Optional | Daily TVL trend data (only when show=day), each item contains t (Unix timestamp string in seconds) and v (number, USD) | — |
projects | array | Required | Per-DeFi project details, see below | — |
projects[] element
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
project | string | Required | Project name | — |
logo | string | Required | Project logo URL | — |
type | string | Required | Project type (e.g. Governance, Lending) | — |
vip | string | Optional | Whether it is a VIP project | — |
locked | number | Required | TVL | USD |
url | string | Required | Project URL | — |
gain | number | Required | TVL change rate | Decimal |
5. Errors
For HTTP status codes, see Common Errors. Key points for this endpoint:
- Empty result is not an error: returns
200+projects: []as a normal response.
Last updated on: