From 1d731eec10cfca1b73aece0a2e3aca1445e03dd7 Mon Sep 17 00:00:00 2001 From: BlueFox Date: Wed, 17 Jan 2024 22:33:15 +0100 Subject: [PATCH] example1.py now demonstrating basic capabilities. --- SimpleStockData.py | 11 ----------- example1.py | 13 +++++++++---- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/SimpleStockData.py b/SimpleStockData.py index 41a087c..b014334 100755 --- a/SimpleStockData.py +++ b/SimpleStockData.py @@ -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)) \ No newline at end of file diff --git a/example1.py b/example1.py index 9cad7c1..650ce01 100644 --- a/example1.py +++ b/example1.py @@ -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") \ No newline at end of file +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))