Skip to main content
POST
/
tvl
Calculate Total Value Locked (TVL) for a lending pool
curl --request POST \
  --url https://yield-api.gluex.xyz/tvl \
  --header 'Content-Type: application/json' \
  --data '{
  "pool_address": "0x1234567890123456789012345678901234567890",
  "lp_token_address": "0x1234567890123456789012345678901234567890",
  "chain": "ethereum"
}'
{
  "success": true,
  "tvl": {
    "tvl": 1234567.89,
    "network_id": "ethereum",
    "pool_address": "0x1234567890123456789012345678901234567890"
  }
}

Body

application/json
  • Option 1
  • Option 2
pool_address
string
required

Address of the pool contract

Example:

"0x1234567890123456789012345678901234567890"

chain
string
required

Blockchain network identifier

Example:

"ethereum"

lp_token_address
string

Address of the LP token contract

Example:

"0x1234567890123456789012345678901234567890"

Response

200 - application/json

TVL calculation response

success
boolean
required
Example:

true

tvl
object
required