Files
OpenBB/website/content/api/crypto/tools/apy/_index.md
Colin Delahunty 0b33cb45f8 Adds auto yaml generation (#2587)
* Began working on docs creator

* Added fixes

* More

* More

* Adding autogen_try.py for OpenBB API doc generation

* OpenBB API docs gen try

* Fixed

* Added fixes

* Added fixes

* subs -> sub

* Updated docs

* Updated docs

Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
2022-09-23 16:43:34 +01:00

980 B
Vendored

To obtain charts, make sure to add chart=True as the last parameter

Get underlying data

crypto.tools.apy(apr: float, compounding_times: int) -> Tuple[pandas.core.frame.DataFrame, str]

Converts apr into apy

Parameters
----------
apr: float
    value in percentage
compounding_times: int
    number of compounded periods in a year

Returns
-------
Tuple:
    - pd.DataFrame: dataframe with results
    - str: narrative version of results

Getting charts

crypto.tools.apy(apr: float, compounding_times: int, narrative: bool = False, export: str = '', chart=True)

Displays APY value converted from APR

Parameters
----------
apr: float
    value in percentage
compounding_times: int
    number of compounded periods in a year
narrative: str
    display narrative version instead of dataframe
export : str
    Export dataframe data to csv,json,xlsx file

Returns
-------