Expand description
Market-wide DeFi data via DefiLlama (requires defi feature, keyless).
Chain rankings and stablecoin supplies describe the market as a whole,
not one asset, so there is no symbol handle to hang them off — they sit
at the crate root the way edgar and
fred do.
Protocol-shaped data is symbol-shaped and lives on
CryptoCoin::tvl instead.
use finance_query::defi;
for chain in defi::chains().await?.into_iter().take(5) {
println!("{}: ${:?}", chain.name, chain.tvl);
}Structs§
- Chain
Allocation - One chain’s share of a protocol’s TVL.
- Chain
Tvl - Aggregate value locked on one blockchain.
- Protocol
Tvl - Total value locked in a DeFi protocol, with the metadata needed to identify it.
- Stablecoin
Supply - Circulating supply of one stablecoin.
- TvlPoint
- One point of a protocol’s TVL history.
Functions§
- chains
- Fetch aggregate total value locked for every chain, largest first.
- stablecoins
- Fetch circulating supply for every tracked stablecoin, largest first.