View source: R/get_defillama_protocol_hist_tvl.R
| get_defillama_protocol_hist_tvl | R Documentation |
Fetches historical TVL data for a specified DeFi protocol, including TVL in USD and token amount. The data is returned as a table sorted by date.
get_defillama_protocol_hist_tvl(slug, by_token = FALSE)
slug |
A string representing the unique name (slug) of the protocol.
This slug can be obtained from the result of the |
by_token |
A boolean indicating whether to include token-specific data. Defaults to FALSE. |
A 'data.table' object containing historical TVL data of the specified protocol. The table includes columns for date, TVL in USD. It is sorted by date.
# total tvl by date
protocol_tvl = get_defillama_protocol_hist_tvl( "lido" )
tail( protocol_tvl )
# tvl by token
protocol_tvl = get_defillama_protocol_hist_tvl( "lido", by_token = TRUE )
tail( protocol_tvl )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.