example1.py now demonstrating basic capabilities.

This commit is contained in:
BlueFox 2024-01-17 22:33:15 +01:00
parent 9dff170bb7
commit 1d731eec10
Signed by: BlueFox
GPG Key ID: 327233DA85435270
2 changed files with 9 additions and 15 deletions

View File

@ -138,14 +138,3 @@ class SimpleStockData:
return result
def test():
ssd = SimpleStockData(["RHM.DE", "BAS.DE", "AZN.L"], "2024-01-02", "2024-01-18", "EUR")
print(ssd.get_info(0))
print(ssd.get_info(1))
print(ssd.get_info(2))
print(ssd.get_history(0))
print(ssd.get_history(1))
print(ssd.get_history(2))

View File

@ -1,7 +1,12 @@
from SimpleStockData import SimpleStockData
ssd = SimpleStockData(["BAS.DE", "AMZN"], "2023-11-20", "2023-11-24", "EUR")
ssd = SimpleStockData(["RHM.DE", "BAS.DE", "AZN.L"], "2024-01-02", "2024-01-18", "EUR")
print(ssd._exchange_df)
print(ssd.get_history(0, "1d"))
print("---\n")
print(ssd.get_info(0))
print(ssd.get_history(0))
print("\n---\n")
print(ssd.get_info(1))
print(ssd.get_history(1))
print("\n---\n")
print(ssd.get_info(2))
print(ssd.get_history(2))