get_defillama_protocol_hist_tvl {rllama} | R Documentation |
Protocol History Data
Description
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.
Usage
get_defillama_protocol_hist_tvl(slug, by_token = FALSE)
Arguments
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. |
Value
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.
Examples
# 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 )
[Package rllama version 0.4.4 Index]