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
@@ -898,8 +899,8 @@ def get_stock_market_tick_data(
898899 ):
899900 """
900901 Available args:
901- symbol - , for example, AAPL.US, consists of two parts: {SYMBOL_NAME}.{EXCHANGE_ID}.
902- This API works only for US exchanges for the moment,
902+ symbol - for example, AAPL.US, consists of two parts: {SYMBOL_NAME}.{EXCHANGE_ID}.
903+ This API works only for US exchanges for the moment,
903904 then you can use 'AAPL' or 'AAPL.US' to get the data as well for other US tickers.
904905 from_timestamp and to_timestamp - use these parameters to filter data by datetime.
905906 Parameters should be passed in UNIX time with UTC timezone,
@@ -915,7 +916,53 @@ def get_stock_market_tick_data(
915916 from_timestamp = from_timestamp ,
916917 limit = limit
917918 )
919+
920+ def get_sentiment (
921+ self ,
922+ s ,
923+ from_date = None ,
924+ to_date = None
925+ ):
926+ """
927+ Available args:
928+ s [REQUIRED] - parameter to your URL and you will be able to get data for multiple tickers at one request,
929+ all tickers should be separated with a comma.
930+ from_date and to_date [NOT REQUIRED] - the format is ‘YYYY-MM-DD’.
931+ If you need data from Jan 5, 2022 to Feb 10, 2022, you should use from=2022-01-05 and to=2022-02-10.
932+ For more information visit: https://eodhd.com/financial-apis/sentimental-data-financial-api/
933+ List of supported exchanges: https://eodhd.com/financial-apis/exchanges-api-list-of-tickers-and-trading-hours/
934+ """
935+
936+ api_call = FinancialNewsAPI ()
937+ return api_call .get_sentiment (
938+ api_token = self ._api_key ,
939+ s = s ,
940+ from_date = from_date ,
941+ to_date = to_date
942+ )
918943
944+ def get_historical_market_capitalization_data (
945+ self ,
946+ ticker ,
947+ from_date = None ,
948+ to_date = None
949+ ):
950+ """
951+ Available args:
952+ ticker [REQUIRED] - is the ticker code and it consists of two parts: {SYMBOL_NAME}.{EXCHANGE_ID},
953+ you can use a US ticker code with or without the exchange part (AAPL or AAPL.US)
954+ from_date and to_date [NOT REQUIRED] - the format is ‘YYYY-MM-DD’.
955+ If you need data from Jan 5, 2022 to Feb 10, 2022, you should use from=2022-01-05 and to=2022-02-10.
956+ For more information visit: https://eodhd.com/financial-apis/historical-market-capitalization-api/
957+ """
958+
959+ api_call = HistoricalMarketCapitalization ()
960+ return api_call .get_historical_market_capitalization_data (
961+ api_token = self ._api_key ,
962+ ticker = ticker ,
963+ from_date = from_date ,
964+ to_date = to_date
965+ )
919966
920967class ScannerClient :
921968 """Scanner class"""
0 commit comments