Without currency
This commit is contained in:
parent
7af5aec49c
commit
ec4a6f98e3
@ -33,6 +33,27 @@ def get_share_price(str_search_for):
|
|||||||
|
|
||||||
return str_return
|
return str_return
|
||||||
|
|
||||||
|
|
||||||
|
def get_share_price_no_currency(str_search_for):
|
||||||
|
"""_summary_
|
||||||
|
|
||||||
|
Args:
|
||||||
|
str_search_for (_type_): _description_
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
_type_: _description_
|
||||||
|
"""
|
||||||
|
|
||||||
|
search_result = investpy.search_quotes(text=str_search_for, products=['stocks'],
|
||||||
|
countries=['germany'], n_results=1)
|
||||||
|
|
||||||
|
recent_data = pandas.DataFrame(search_result.retrieve_recent_data())
|
||||||
|
|
||||||
|
stock_price = recent_data.iloc[-1]["Close"]
|
||||||
|
|
||||||
|
return stock_price
|
||||||
|
|
||||||
|
|
||||||
def get_share_information(str_search_for):
|
def get_share_information(str_search_for):
|
||||||
search_result = investpy.search_quotes(text=str_search_for, products=['stocks'],
|
search_result = investpy.search_quotes(text=str_search_for, products=['stocks'],
|
||||||
countries=['germany'], n_results=1)
|
countries=['germany'], n_results=1)
|
||||||
|
Loading…
Reference in New Issue
Block a user