Skip to Content
GraphQL APIPools APIgetProtocolPoolDetails

getProtocolPoolDetails

This method obtains the details (APY and TVL) of a pool from a protocol on a chain.

Inputs

NameTypeRequiredDescription
input[ProtocolPoolInput!]!YesList of queries with chain ID, protocol and pool.

ProtocolPoolInput Fields

NameTypeRequiredDescription
chainChain!YesChain ID.
protocolProtocol!YesThe protocol name.
poolStringYesThe pool address or name on the protocol.

chain

Type: Chain!

Allowed Values: A chain ID from the list of supported pools.

protocol

Type: Protocol!

Allowed Values: A protocol from the list of supported pools for the given chain.

pool

Type: String

Allowed Values: A pool from the list of supported pools for the given protocol and chain.

Response

FieldTypeDescription
chainChainThe chain ID.
protocolProtocolThe protocol.
poolStringThe pool.
apyAPYResultThe current APY.
tvlTVLResultThe current TVL.
errorStringError message if query failed.

APYResult Fields

NameTypeDescription
baseApyStringThe base APY.
extraApyStringAn extra APY.
totalApyStringTotal + extra APY.

TVLResult Fields

NameTypeDescription
underlyingJSONAn object with underlying tokens and amounts in that token.
totalsJSONAn object with totals from the underlying assets.

Query Example

Query

query GetProtocolPoolDetails($input: [ProtocolPoolChainInput!]!) { getProtocolPoolDetails(input: $input) { chain protocol pool apy { baseApy extraApy totalApy } tvl { underlying totals } error } }

Variables

{ "input": [ { "chain": "CHAIN_0X1", "pool": "USDC", "protocol": "AAVE" }, { "chain": "CHAIN_0XA", "pool": "USDC", "protocol": "AAVE" }, { "chain": "CHAIN_0X2105", "pool": "USDC", "protocol": "AAVE" }, { "chain": "CHAIN_0X1", "pool": "0xc3d688B66703497DAA19211EEdff47f25384cdc3", "protocol": "COMPOUNDV3" }, { "chain": "CHAIN_0X38", "pool": "pancake-cow-bsc-usdc-wbnb-vault", "protocol": "BEEFY" }, { "chain": "CHAIN_0X1", "pool": "0xBe53A109B494E5c9f97b9Cd39Fe969BE68BF6204", "protocol": "YEARN" }, { "chain": "CHAIN_HYPERLIQUID_MAINNET", "pool": "0xdfc24b077bc1425ad1dea75bcb6f8158e10df303", "protocol": "HYPERLIQUID" } ] }

Curl

curl -X POST https://your-graphql-endpoint.com/graphql \ -H "Content-Type: application/json" \ -d '{ "query": "query getProtocolPoolDetails($input: [ProtocolPoolChainInput!]!) { getProtocolPoolDetails(input: $input) { chain protocol pool apy { baseApy extraApy totalApy } tvl { underlying totals } error } }", "variables": { "input": [ { "chain": "CHAIN_0X1", "pool": "USDC", "protocol": "AAVE" }, { "chain": "CHAIN_0X1", "pool": "0xc3d688B66703497DAA19211EEdff47f25384cdc3", "protocol": "COMPOUNDV3" }, { "chain": "CHAIN_0X1", "pool": "0xBe53A109B494E5c9f97b9Cd39Fe969BE68BF6204", "protocol": "YEARN" } ] } }'

Response Example

{ "data": { "getProtocolPoolDetails": [ { "chain": "CHAIN_0X1", "protocol": "AAVE", "pool": "USDC", "apy": { "baseApy": "3.8303938852289443", "extraApy": "0", "totalApy": "3.8303938852289443" }, "tvl": { "underlying": { "USDC": 1357781103.438384 }, "totals": { "USD": 1357523803.9192824 } }, "error": null }, { "chain": "CHAIN_0X1", "protocol": "COMPOUNDV3", "pool": "0xc3d688B66703497DAA19211EEdff47f25384cdc3", "apy": { "baseApy": "5.21", "extraApy": "0.21051430171037105", "totalApy": "5.420514301710371" }, "tvl": { "underlying": { "USDC": 527019612.332527, "COMP": 99999.98947746227, "WBTC": 5555.20800645, "WETH": 58237.826810963634 }, "totals": { "USD": 1698509470.7874575 } }, "error": null }, { "chain": "CHAIN_0X1", "protocol": "YEARN", "pool": "0xBe53A109B494E5c9f97b9Cd39Fe969BE68BF6204", "apy": { "baseApy": "6.110545906558906", "extraApy": "0", "totalApy": "6.110545906558906" }, "tvl": { "underlying": { "USDC": 23241848.993009 }, "totals": { "USD": 23235015.889405057 } }, "error": null } ] } }