Subgraph
Developers > Perpetual Yield Tranches > Subgraph
Idle uses a subgraph for indexing and organizing data from the Perpetual Yield Tranches
IdleCDO
smart contract. This subgraph can be found on The Graph hosted service and can be used to query Idle PYTs data:
- TrancheInfos: contains the data of each PYTs tranche (type, apr,
virtualPrice
,totalSupply
), updated every hour - Tranche: all deployed PYTs tranches (id, type)
To obtain the latest TrancheInfos you can use the following query
{
trancheInfos(orderBy:"timeStamp", orderDirection:"desc") {
id
apr
Tranche {
id
}
timeStamp
blockNumber
totalSupply
virtualPrice
}
}
Last modified 20d ago