diff --git a/README.md b/README.md index 5f80f51..1092c6f 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,26 @@ from messari import Messari messari = Messari(key='xxxxxxxxxxxxxxx') -# Get the paginated list of all assets and their metrics and profiles. +# Get a list of all assets and their market caps, sorted by market cap descending. response = messari.get_all_assets() +# Get the ID, name, symbol, slug, market cap, sector, category, and tags for a single asset. +response = messari.get_asset_by_id(asset_id=asset_id) + +# Get market data for a specific asset. +response = messari.get_market_data_by_asset(asset_id=asset_id) + +# Get a list ROI data for all assets. +response = messari.get_roi() + +# Get a single assets ROI data. +response = messari.get_roi_by_asset(asset_id=asset_id) + +# Get a list of market specific data for all markets. +response = messari.get_markets() + +# Get a list of exchanges with market data. +response = messari.get_exchanges() ``` ------- diff --git a/messari/__version__.py b/messari/__version__.py index 807fc99..2a9a507 100644 --- a/messari/__version__.py +++ b/messari/__version__.py @@ -2,7 +2,7 @@ __title__ = 'messari' __description__ = 'Unofficial Messari API client.' __url__ = 'https://github.com/itzmestar/Messari' -__version__ = '2.0.0' +__version__ = '2.1.0' __build__ = 0x010001 __author__ = 'Tarique Anwer' __author_email__ = 'itzmetariq@gmail.com' diff --git a/messari/messari.py b/messari/messari.py index 32cbac9..009acc4 100644 --- a/messari/messari.py +++ b/messari/messari.py @@ -52,7 +52,8 @@ def _get(self, endpoint, params=None): def get_all_assets(self, **query_params): """ - Get the paginated list of all assets and their metrics and profiles. + Returns a list of all assets and their market caps, sorted by market cap descending. + Each query parameter supports filtering on multiple, comma-separated values. :param query_params: dict of query parameters to filter the list :return: JSON response @@ -234,3 +235,28 @@ def get_supported_assets(self, **kwargs): path = f'/intel/v1/assets' return self._get(path, params=kwargs) + + def get_news_feed(self, **kwargs): + """ + Returns a list of all news articles, along with AI-generated summaries for each piece of content. + """ + path = f'/news/v1/news/feed' + + return self._get(path, params=kwargs) + + def get_news_sources(self, **kwargs): + """ + Returns a list of all news sources. Sources are the publications that Messari monitors. + """ + path = f'/news/v1/news/sources' + + return self._get(path, params=kwargs) + + def get_news_assets(self, **kwargs): + """ + Returns a list of all assets that have been tagged in news articles. + :return: + """ + path = f'/news/v1/news/assets' + + return self._get(path, params=kwargs)