3737from eodhd .APIs import IntradayDataAPI
3838from eodhd .APIs import EodHistoricalStockMarketDataAPI
3939from eodhd .APIs import StockMarketTickDataAPI
40+ from eodhd .APIs import HistoricalMarketCapitalization
4041
4142# minimal traceback
4243sys .tracebacklimit = 1
@@ -895,7 +896,7 @@ def get_stock_market_tick_data(
895896 ):
896897 """
897898 Available args:
898- symbol - , for example, AAPL.US, consists of two parts: {SYMBOL_NAME}.{EXCHANGE_ID}.
899+ symbol - for example, AAPL.US, consists of two parts: {SYMBOL_NAME}.{EXCHANGE_ID}.
899900 This API works only for US exchanges for the moment,
900901 then you can use 'AAPL' or 'AAPL.US' to get the data as well for other US tickers.
901902 from_timestamp and to_timestamp - use these parameters to filter data by datetime.
@@ -912,7 +913,53 @@ def get_stock_market_tick_data(
912913 from_timestamp = from_timestamp ,
913914 limit = limit
914915 )
916+
917+ def get_sentiment (
918+ self ,
919+ s ,
920+ from_date = None ,
921+ to_date = None
922+ ):
923+ """
924+ Available args:
925+ s [REQUIRED] - parameter to your URL and you will be able to get data for multiple tickers at one request,
926+ all tickers should be separated with a comma.
927+ from_date and to_date [NOT REQUIRED] - the format is ‘YYYY-MM-DD’.
928+ If you need data from Jan 5, 2022 to Feb 10, 2022, you should use from=2022-01-05 and to=2022-02-10.
929+ For more information visit: https://eodhd.com/financial-apis/sentimental-data-financial-api/
930+ List of supported exchanges: https://eodhd.com/financial-apis/exchanges-api-list-of-tickers-and-trading-hours/
931+ """
932+
933+ api_call = FinancialNewsAPI ()
934+ return api_call .get_sentiment (
935+ api_token = self ._api_key ,
936+ s = s ,
937+ from_date = from_date ,
938+ to_date = to_date
939+ )
915940
941+ def get_historical_market_capitalization_data (
942+ self ,
943+ ticker ,
944+ from_date = None ,
945+ to_date = None
946+ ):
947+ """
948+ Available args:
949+ ticker [REQUIRED] - is the ticker code and it consists of two parts: {SYMBOL_NAME}.{EXCHANGE_ID},
950+ you can use a US ticker code with or without the exchange part (AAPL or AAPL.US)
951+ from_date and to_date [NOT REQUIRED] - the format is ‘YYYY-MM-DD’.
952+ If you need data from Jan 5, 2022 to Feb 10, 2022, you should use from=2022-01-05 and to=2022-02-10.
953+ For more information visit: https://eodhd.com/financial-apis/historical-market-capitalization-api/
954+ """
955+
956+ api_call = HistoricalMarketCapitalization ()
957+ return api_call .get_historical_market_capitalization_data (
958+ api_token = self ._api_key ,
959+ ticker = ticker ,
960+ from_date = from_date ,
961+ to_date = to_date
962+ )
916963
917964class ScannerClient :
918965 """Scanner class"""
0 commit comments