Skip to main content
POST
/
diluted-apy
Calculate diluted APY for a lending pool
curl --request POST \
  --url https://yield-api.gluex.xyz/diluted-apy \
  --header 'Content-Type: application/json' \
  --data '{
  "pool_address": "0x1234567890123456789012345678901234567890",
  "lp_token_address": "0x1234567890123456789012345678901234567890",
  "chain": "ethereum",
  "input_token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "input_amount": 1000000000000000000
}'
{
  "success": true,
  "diluted_yield": {
    "apy": 5.25,
    "network_id": "ethereum",
    "pool_address": "0x1234567890123456789012345678901234567890",
    "input_token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "input_amount": "1000000000000000000"
  }
}

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"

input_amount
integer
required

Amount to consider for dilution calculation (in token's smallest unit)

Example:

1000000000000000000

lp_token_address
string

Address of the LP token contract

Example:

"0x1234567890123456789012345678901234567890"

input_token
string

Address of the input token for APY calculation (auto-selected if not provided)

Example:

"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"

Response

200 - application/json

Diluted APY calculation response

success
boolean
required
Example:

true

diluted_yield
object
required