aave_v3_calculate_ohlc
Documentation for eth_defi.aave_v3.rates.aave_v3_calculate_ohlc function.
- aave_v3_calculate_ohlc(df, time_bucket, attribute, token='')[source]
Calculate OHLC (Open, High, Low, Close) values for a given time bucket (e.g. 1 day) and given attribute. Attribute can be e.g. deposit_apr, variable_borrow_apr, stable_borrow_apr, deposit_apy, variable_borrow_apy, stable_borrow_apy. The dataframe must be indexed by timestamp. Returns a new DataFrame, or a tuple of DataFrames if a tuple of attributes was specified.