Skip to content

Commit

Permalink
Take 3 Testing Pull Request rule enforcement
Browse files Browse the repository at this point in the history
  • Loading branch information
umocm committed Dec 3, 2024
1 parent 7dd0a43 commit c84f4e9
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions precog/utils/cm_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,22 @@ def get_CM_ReferenceRate(
parallelize: bool = False,
time_inc_parallel: pd.Timedelta = pd.Timedelta("1h"),
**kwargs,
) -> pd.DataFrame:
) -> pd.DataFrame:
"""Fetches CM Reference Rate for specific asset ticker or list of tickers from CoinMetrics Python client.
Args:
assets (Union[list, str]): Asset ticker or list of tickers to retrieve CM Reference Rates for
start (Optional[Union[datetime, date, str]], optional): Start time of data, if None will return earliest available. Defaults to None.
end (Optional[Union[datetime, date, str]], optional): End time of data, if None will return earliest available. Defaults to None.
end_inclusive (bool, optional): Whether to include a data point occuring at the "end" time. Defaults to True.
frequency (str, optional): Frequency of prices - '200ms', '1s', '1m', '1m', '1d'. Defaults to "1s".
page_size (int, optional): Page size of return, recommended 10000. Defaults to 10000.
parallelize (bool, optional): Whether to parallelize query into multiple queries.
Can speed up retrieval but may go over usage limits. Defaults to False.
time_inc_parallel (pd.Timedelta, optional): If using parallelize, time interval queried by each thread. Defaults to pd.Timedelta("1h").
Returns:
DataFrame: Reference Rate of assets over time, with columns
pd.DataFrame: Reference Rate of assets over time, with columns
['asset', 'time', 'ReferenceRateUSD']
Notes:
Expand Down

0 comments on commit c84f4e9

Please sign in to comment.