financegy 0.1.0__tar.gz → 1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {financegy-0.1.0 → financegy-1.3}/PKG-INFO +33 -1
- {financegy-0.1.0 → financegy-1.3}/README.md +32 -0
- {financegy-0.1.0 → financegy-1.3}/financegy/__init__.py +4 -1
- financegy-1.3/financegy/cache/cache_manager.py +62 -0
- {financegy-0.1.0 → financegy-1.3}/financegy/modules/securities.py +80 -10
- {financegy-0.1.0 → financegy-1.3}/financegy.egg-info/PKG-INFO +33 -1
- {financegy-0.1.0 → financegy-1.3}/financegy.egg-info/SOURCES.txt +1 -0
- {financegy-0.1.0 → financegy-1.3}/pyproject.toml +1 -1
- {financegy-0.1.0 → financegy-1.3}/tests/test_securities.py +14 -9
- {financegy-0.1.0 → financegy-1.3}/LICENSE +0 -0
- {financegy-0.1.0 → financegy-1.3}/financegy/config.py +0 -0
- {financegy-0.1.0 → financegy-1.3}/financegy/core/parser.py +0 -0
- {financegy-0.1.0 → financegy-1.3}/financegy/core/request_handler.py +0 -0
- {financegy-0.1.0 → financegy-1.3}/financegy.egg-info/dependency_links.txt +0 -0
- {financegy-0.1.0 → financegy-1.3}/financegy.egg-info/requires.txt +0 -0
- {financegy-0.1.0 → financegy-1.3}/financegy.egg-info/top_level.txt +0 -0
- {financegy-0.1.0 → financegy-1.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: financegy
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.3
|
|
4
4
|
Summary: Unofficial Python library for accessing GSE (Guyana Stock Exchange) financial data
|
|
5
5
|
Author-email: Ezra Minty <ezranminty@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -105,6 +105,38 @@ Fetches historical trade data for a security within the specified date range (`d
|
|
|
105
105
|
|
|
106
106
|
---
|
|
107
107
|
|
|
108
|
+
## Caching System
|
|
109
|
+
|
|
110
|
+
FinanceGY includes a lightweight local caching system designed to speed up repeated requests and reduce unnecessary calls.
|
|
111
|
+
|
|
112
|
+
Whenever you call a data retrieval function (such as `get_securities()` or `get_recent_trade()`), FinanceGY automatically checks whether a cached response already exists for that specific query:
|
|
113
|
+
|
|
114
|
+
- If a valid cache file (less than 7 days old since sessions are help once per week) is found, the result is returned instantly from the cache.
|
|
115
|
+
- If the cache is missing, disabled, or older than one week, FinanceGY fetches fresh data from the GSE and updates the cache automatically.
|
|
116
|
+
|
|
117
|
+
All cache files are stored in a local `cache/` directory as small JSON files containing the retrieved data and a timestamp.
|
|
118
|
+
|
|
119
|
+
You can manually clear all cached data at any time:
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
import financegy
|
|
123
|
+
|
|
124
|
+
financegy.clear_cache()
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
This will delete all cached files and force the next data request to fetch fresh data directly from the source.
|
|
128
|
+
|
|
129
|
+
If you prefer to bypass the cache for a specific call, simply pass `use_cache=False` to any function. For example:
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
# Force a fresh fetch from the GSE, ignoring cached data
|
|
133
|
+
recent_trade = financegy.get_recent_trade("DDL", use_cache=False)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
By default, caching is enabled for all supported functions unless explicitly turned off.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
108
140
|
## License
|
|
109
141
|
|
|
110
142
|
This project is licensed under the **MIT License**
|
|
@@ -91,6 +91,38 @@ Fetches historical trade data for a security within the specified date range (`d
|
|
|
91
91
|
|
|
92
92
|
---
|
|
93
93
|
|
|
94
|
+
## Caching System
|
|
95
|
+
|
|
96
|
+
FinanceGY includes a lightweight local caching system designed to speed up repeated requests and reduce unnecessary calls.
|
|
97
|
+
|
|
98
|
+
Whenever you call a data retrieval function (such as `get_securities()` or `get_recent_trade()`), FinanceGY automatically checks whether a cached response already exists for that specific query:
|
|
99
|
+
|
|
100
|
+
- If a valid cache file (less than 7 days old since sessions are help once per week) is found, the result is returned instantly from the cache.
|
|
101
|
+
- If the cache is missing, disabled, or older than one week, FinanceGY fetches fresh data from the GSE and updates the cache automatically.
|
|
102
|
+
|
|
103
|
+
All cache files are stored in a local `cache/` directory as small JSON files containing the retrieved data and a timestamp.
|
|
104
|
+
|
|
105
|
+
You can manually clear all cached data at any time:
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
import financegy
|
|
109
|
+
|
|
110
|
+
financegy.clear_cache()
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
This will delete all cached files and force the next data request to fetch fresh data directly from the source.
|
|
114
|
+
|
|
115
|
+
If you prefer to bypass the cache for a specific call, simply pass `use_cache=False` to any function. For example:
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
# Force a fresh fetch from the GSE, ignoring cached data
|
|
119
|
+
recent_trade = financegy.get_recent_trade("DDL", use_cache=False)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
By default, caching is enabled for all supported functions unless explicitly turned off.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
94
126
|
## License
|
|
95
127
|
|
|
96
128
|
This project is licensed under the **MIT License**
|
|
@@ -14,6 +14,8 @@ from financegy.modules.securities import(
|
|
|
14
14
|
get_historical_trades
|
|
15
15
|
)
|
|
16
16
|
|
|
17
|
+
from financegy.cache.cache_manager import clear_cache
|
|
18
|
+
|
|
17
19
|
__all__ = [
|
|
18
20
|
"get_securities",
|
|
19
21
|
"get_security_by_symbol",
|
|
@@ -23,5 +25,6 @@ __all__ = [
|
|
|
23
25
|
"get_security_session_trade",
|
|
24
26
|
"search_securities",
|
|
25
27
|
"get_trades_for_year",
|
|
26
|
-
"get_historical_trades"
|
|
28
|
+
"get_historical_trades",
|
|
29
|
+
"clear_cache"
|
|
27
30
|
]
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import os, json, hashlib
|
|
2
|
+
from datetime import datetime, timedelta
|
|
3
|
+
import shutil
|
|
4
|
+
|
|
5
|
+
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
6
|
+
CACHE_DIR = os.path.join(SCRIPT_DIR, "cache")
|
|
7
|
+
|
|
8
|
+
def make_cache_key(func_name, *args, **kwargs):
|
|
9
|
+
"""Create a unique hash for the given function call."""
|
|
10
|
+
|
|
11
|
+
key_data = {
|
|
12
|
+
"func": func_name,
|
|
13
|
+
"args": args,
|
|
14
|
+
"kwargs": kwargs
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
key_string = json.dumps(key_data, sort_keys=True, default=str)
|
|
18
|
+
hashed = hashlib.md5(key_string.encode()).hexdigest()
|
|
19
|
+
|
|
20
|
+
return f"{func_name}_{hashed}.json"
|
|
21
|
+
|
|
22
|
+
def load_cache(func_name, *args, max_age_days=7, **kwargs):
|
|
23
|
+
os.makedirs(CACHE_DIR, exist_ok=True)
|
|
24
|
+
cache_file = make_cache_key(func_name, *args, **kwargs)
|
|
25
|
+
cache_path = os.path.join(CACHE_DIR, cache_file)
|
|
26
|
+
|
|
27
|
+
if not os.path.exists(cache_path):
|
|
28
|
+
return None
|
|
29
|
+
|
|
30
|
+
with open(cache_path, "r") as f:
|
|
31
|
+
data = json.load(f)
|
|
32
|
+
|
|
33
|
+
timestamp = datetime.fromisoformat(data["timestamp"])
|
|
34
|
+
if datetime.now() - timestamp > timedelta(days=max_age_days):
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
return data["value"]
|
|
38
|
+
|
|
39
|
+
def save_cache(func_name, value, *args, **kwargs):
|
|
40
|
+
os.makedirs(CACHE_DIR, exist_ok=True)
|
|
41
|
+
cache_file = make_cache_key(func_name, *args, **kwargs)
|
|
42
|
+
cache_path = os.path.join(CACHE_DIR, cache_file)
|
|
43
|
+
|
|
44
|
+
with open(cache_path, "w") as f:
|
|
45
|
+
json.dump({
|
|
46
|
+
"timestamp": datetime.now().isoformat(),
|
|
47
|
+
"value": value
|
|
48
|
+
}, f)
|
|
49
|
+
|
|
50
|
+
def clear_cache():
|
|
51
|
+
"""Completely clears the FinanceGY cache directory."""
|
|
52
|
+
if not os.path.exists(CACHE_DIR):
|
|
53
|
+
print("No cache directory found.")
|
|
54
|
+
return False
|
|
55
|
+
|
|
56
|
+
try:
|
|
57
|
+
shutil.rmtree(CACHE_DIR)
|
|
58
|
+
print("Cache cleared successfully.")
|
|
59
|
+
return True
|
|
60
|
+
|
|
61
|
+
except Exception as e:
|
|
62
|
+
print(f"Failed to clear cache: {e}")
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
from financegy.core import request_handler, parser
|
|
2
|
+
from financegy.cache import cache_manager
|
|
2
3
|
|
|
3
|
-
def get_securities():
|
|
4
|
+
def get_securities(use_cache=True):
|
|
4
5
|
"""Get names of all currently traded securities"""
|
|
6
|
+
|
|
7
|
+
func_name = "get_securities"
|
|
8
|
+
|
|
9
|
+
if use_cache:
|
|
10
|
+
cached = cache_manager.load_cache(func_name)
|
|
11
|
+
if cached:
|
|
12
|
+
return parser.parse_get_securities(cached)
|
|
13
|
+
|
|
5
14
|
path = "/securities/"
|
|
6
15
|
html = request_handler.fetch_page(path)
|
|
16
|
+
|
|
17
|
+
cache_manager.save_cache(func_name, html)
|
|
18
|
+
|
|
7
19
|
return parser.parse_get_securities(html);
|
|
8
20
|
|
|
9
|
-
def get_security_by_symbol(symbol: str):
|
|
21
|
+
def get_security_by_symbol(symbol: str, use_cache=True):
|
|
10
22
|
"""Get the security details by its ticker symbol"""
|
|
23
|
+
|
|
11
24
|
securities = get_securities()
|
|
12
25
|
|
|
13
26
|
symbol = symbol.strip().upper()
|
|
@@ -17,70 +30,127 @@ def get_security_by_symbol(symbol: str):
|
|
|
17
30
|
None,
|
|
18
31
|
)
|
|
19
32
|
|
|
20
|
-
def get_security_recent_year(symbol:str):
|
|
33
|
+
def get_security_recent_year(symbol:str, use_cache=True):
|
|
21
34
|
"""Get the most recent year's trade data for any of the traded securities"""
|
|
22
35
|
|
|
36
|
+
func_name = "get_security_recent_year"
|
|
37
|
+
|
|
23
38
|
security_name = get_security_by_symbol(symbol)
|
|
24
39
|
security_name = security_name.lower().replace(" ", "-")
|
|
25
40
|
|
|
41
|
+
if use_cache:
|
|
42
|
+
cached = cache_manager.load_cache(func_name, symbol)
|
|
43
|
+
if cached:
|
|
44
|
+
return parser.parse_get_security_recent_year(cached)
|
|
45
|
+
|
|
26
46
|
path = "/security/" + security_name
|
|
27
47
|
html = request_handler.fetch_page(path)
|
|
48
|
+
|
|
49
|
+
cache_manager.save_cache(func_name, html, symbol)
|
|
50
|
+
|
|
28
51
|
return parser.parse_get_security_recent_year(html)
|
|
29
52
|
|
|
30
|
-
def get_recent_trade(symbol: str):
|
|
53
|
+
def get_recent_trade(symbol: str, use_cache=True):
|
|
31
54
|
"""Get the most recent trade data for any of the traded securities"""
|
|
55
|
+
|
|
56
|
+
func_name = "get_recent_trade"
|
|
32
57
|
|
|
33
58
|
security_name = get_security_by_symbol(symbol)
|
|
34
59
|
security_name = security_name.lower().replace(" ", "-")
|
|
35
60
|
|
|
61
|
+
if use_cache:
|
|
62
|
+
cached = cache_manager.load_cache(func_name, symbol)
|
|
63
|
+
if cached:
|
|
64
|
+
return parser.parse_get_recent_trade(cached)
|
|
65
|
+
|
|
36
66
|
path = "/security/" + security_name
|
|
37
67
|
html = request_handler.fetch_page(path)
|
|
68
|
+
|
|
69
|
+
cache_manager.save_cache(func_name, html, symbol)
|
|
70
|
+
|
|
38
71
|
return parser.parse_get_recent_trade(html)
|
|
39
72
|
|
|
40
|
-
def get_session_trades(session: str):
|
|
73
|
+
def get_session_trades(session: str, use_cache=True):
|
|
41
74
|
"""Get the session trade data for all the available securities"""
|
|
42
75
|
|
|
76
|
+
func_name = "get_session_trades"
|
|
77
|
+
|
|
78
|
+
if use_cache:
|
|
79
|
+
cached = cache_manager.load_cache(func_name, session)
|
|
80
|
+
if cached:
|
|
81
|
+
return parser.parse_get_session_trades(cached)
|
|
82
|
+
|
|
43
83
|
path = f"/financial_session/{session}/"
|
|
44
84
|
html = request_handler.fetch_page(path)
|
|
85
|
+
|
|
86
|
+
cache_manager.save_cache(func_name, html, session)
|
|
87
|
+
|
|
45
88
|
return parser.parse_get_session_trades(html)
|
|
46
89
|
|
|
47
|
-
def get_security_session_trade(symbol: str, session: str):
|
|
90
|
+
def get_security_session_trade(symbol: str, session: str, use_cache=True):
|
|
48
91
|
"""Get the session trade data for a given security"""
|
|
49
92
|
|
|
93
|
+
func_name = "get_security_session_trade"
|
|
94
|
+
|
|
50
95
|
symbol = symbol.strip().upper()
|
|
51
96
|
|
|
97
|
+
if use_cache:
|
|
98
|
+
cached = cache_manager.load_cache(func_name, symbol, session)
|
|
99
|
+
if cached:
|
|
100
|
+
return parser.parse_get_security_session_trade(symbol, cached)
|
|
101
|
+
|
|
52
102
|
path = f"/financial_session/{session}/"
|
|
53
103
|
html = request_handler.fetch_page(path)
|
|
54
|
-
return parser.parse_get_security_session_trade(symbol, html)
|
|
55
104
|
|
|
105
|
+
cache_manager.save_cache(func_name, html, symbol, session)
|
|
106
|
+
|
|
107
|
+
return parser.parse_get_security_session_trade(symbol, html)
|
|
56
108
|
|
|
57
|
-
def get_trades_for_year(symbol: str, year: str):
|
|
109
|
+
def get_trades_for_year(symbol: str, year: str, use_cache=True):
|
|
58
110
|
"""Get security trade information from a specific year"""
|
|
59
111
|
|
|
112
|
+
func_name = "get_trades_for_year"
|
|
113
|
+
|
|
60
114
|
symbol = symbol.strip().upper()
|
|
61
115
|
|
|
116
|
+
if use_cache:
|
|
117
|
+
cached = cache_manager.load_cache(func_name, symbol, year)
|
|
118
|
+
if cached:
|
|
119
|
+
return parser.parse_get_trades_for_year(year, cached)
|
|
120
|
+
|
|
62
121
|
security_name = get_security_by_symbol(symbol)
|
|
63
122
|
security_name = security_name.lower().replace(" ", "-")
|
|
64
123
|
|
|
65
124
|
path = f"/security/{security_name}/"
|
|
66
125
|
html = request_handler.fetch_page(path)
|
|
67
126
|
|
|
127
|
+
cache_manager.save_cache(func_name, html, symbol, year)
|
|
128
|
+
|
|
68
129
|
return parser.parse_get_trades_for_year(year, html)
|
|
69
130
|
|
|
70
|
-
def get_historical_trades(symbol: str, start_date: str, end_date: str):
|
|
131
|
+
def get_historical_trades(symbol: str, start_date: str, end_date: str, use_cache=True):
|
|
71
132
|
"""Get historical trade data for a date range"""
|
|
72
133
|
|
|
134
|
+
func_name = "get_historical_trades"
|
|
135
|
+
|
|
73
136
|
symbol = symbol.strip().upper()
|
|
74
137
|
|
|
138
|
+
if use_cache:
|
|
139
|
+
cached = cache_manager.load_cache(func_name, symbol, start_date, end_date)
|
|
140
|
+
if cached:
|
|
141
|
+
return parser.parse_get_historical_trades(start_date, end_date, cached)
|
|
142
|
+
|
|
75
143
|
security_name = get_security_by_symbol(symbol)
|
|
76
144
|
security_name = security_name.lower().replace(" ", "-")
|
|
77
145
|
|
|
78
146
|
path = f"/security/{security_name}/"
|
|
79
147
|
html = request_handler.fetch_page(path)
|
|
80
148
|
|
|
149
|
+
cache_manager.save_cache(func_name, html, symbol, start_date, end_date)
|
|
150
|
+
|
|
81
151
|
return parser.parse_get_historical_trades(start_date, end_date, html)
|
|
82
152
|
|
|
83
|
-
def search_securities(query: str):
|
|
153
|
+
def search_securities(query: str, use_cache=True):
|
|
84
154
|
"""Search securities by symbol or name (partial match)"""
|
|
85
155
|
|
|
86
156
|
query = query.lower().strip()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: financegy
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.3
|
|
4
4
|
Summary: Unofficial Python library for accessing GSE (Guyana Stock Exchange) financial data
|
|
5
5
|
Author-email: Ezra Minty <ezranminty@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -105,6 +105,38 @@ Fetches historical trade data for a security within the specified date range (`d
|
|
|
105
105
|
|
|
106
106
|
---
|
|
107
107
|
|
|
108
|
+
## Caching System
|
|
109
|
+
|
|
110
|
+
FinanceGY includes a lightweight local caching system designed to speed up repeated requests and reduce unnecessary calls.
|
|
111
|
+
|
|
112
|
+
Whenever you call a data retrieval function (such as `get_securities()` or `get_recent_trade()`), FinanceGY automatically checks whether a cached response already exists for that specific query:
|
|
113
|
+
|
|
114
|
+
- If a valid cache file (less than 7 days old since sessions are help once per week) is found, the result is returned instantly from the cache.
|
|
115
|
+
- If the cache is missing, disabled, or older than one week, FinanceGY fetches fresh data from the GSE and updates the cache automatically.
|
|
116
|
+
|
|
117
|
+
All cache files are stored in a local `cache/` directory as small JSON files containing the retrieved data and a timestamp.
|
|
118
|
+
|
|
119
|
+
You can manually clear all cached data at any time:
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
import financegy
|
|
123
|
+
|
|
124
|
+
financegy.clear_cache()
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
This will delete all cached files and force the next data request to fetch fresh data directly from the source.
|
|
128
|
+
|
|
129
|
+
If you prefer to bypass the cache for a specific call, simply pass `use_cache=False` to any function. For example:
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
# Force a fresh fetch from the GSE, ignoring cached data
|
|
133
|
+
recent_trade = financegy.get_recent_trade("DDL", use_cache=False)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
By default, caching is enabled for all supported functions unless explicitly turned off.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
108
140
|
## License
|
|
109
141
|
|
|
110
142
|
This project is licensed under the **MIT License**
|
|
@@ -8,6 +8,7 @@ financegy.egg-info/SOURCES.txt
|
|
|
8
8
|
financegy.egg-info/dependency_links.txt
|
|
9
9
|
financegy.egg-info/requires.txt
|
|
10
10
|
financegy.egg-info/top_level.txt
|
|
11
|
+
financegy/cache/cache_manager.py
|
|
11
12
|
financegy/core/parser.py
|
|
12
13
|
financegy/core/request_handler.py
|
|
13
14
|
financegy/modules/securities.py
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "financegy"
|
|
7
|
-
version = "
|
|
7
|
+
version = "1.3"
|
|
8
8
|
description = "Unofficial Python library for accessing GSE (Guyana Stock Exchange) financial data"
|
|
9
9
|
authors = [{ name = "Ezra Minty", email = "ezranminty@gmail.com" }]
|
|
10
10
|
dependencies = ["requests", "beautifulsoup4"]
|
|
@@ -5,7 +5,7 @@ def test_get_securities():
|
|
|
5
5
|
assert isinstance(result, list)
|
|
6
6
|
|
|
7
7
|
def test_get_security_by_symbol():
|
|
8
|
-
result = get_security_by_symbol(symbol="ddl")
|
|
8
|
+
result = get_security_by_symbol(symbol="ddl")
|
|
9
9
|
assert isinstance(result, (str, type(None)))
|
|
10
10
|
|
|
11
11
|
def test_get_recent_trade():
|
|
@@ -13,25 +13,30 @@ def test_get_recent_trade():
|
|
|
13
13
|
assert isinstance(result, (dict, type(None)))
|
|
14
14
|
|
|
15
15
|
def test_get_security_recent_year():
|
|
16
|
-
result = get_security_recent_year(symbol="
|
|
16
|
+
result = get_security_recent_year(symbol="RBL")
|
|
17
17
|
assert isinstance(result, (list, type(None)))
|
|
18
18
|
|
|
19
19
|
def test_get_session_trades():
|
|
20
|
-
result = get_session_trades(session="
|
|
20
|
+
result = get_session_trades(session="1135")
|
|
21
21
|
assert isinstance(result, (list, type(None)))
|
|
22
22
|
|
|
23
23
|
def test_get_security_session_trade():
|
|
24
24
|
result = get_security_session_trade(symbol="ddl", session="1136")
|
|
25
25
|
assert isinstance(result, (dict, type(None)))
|
|
26
26
|
|
|
27
|
-
def test_search_securities():
|
|
28
|
-
result = search_securities(query="ddl")
|
|
29
|
-
assert isinstance(result, list)
|
|
30
|
-
|
|
31
27
|
def test_get_trades_for_year():
|
|
32
|
-
result = get_trades_for_year(symbol="ddl", year="
|
|
28
|
+
result = get_trades_for_year(symbol="ddl", year="2020")
|
|
33
29
|
assert isinstance(result, (list, type(None)))
|
|
34
30
|
|
|
35
31
|
def test_get_historical_trades():
|
|
36
32
|
result = get_historical_trades(symbol="ddl", start_date="01/06/2020", end_date="01/01/2022")
|
|
37
|
-
assert isinstance(result, (list, type(None)))
|
|
33
|
+
assert isinstance(result, (list, type(None)))
|
|
34
|
+
|
|
35
|
+
def test_search_securities():
|
|
36
|
+
result = search_securities(query="ddl")
|
|
37
|
+
assert isinstance(result, list)
|
|
38
|
+
|
|
39
|
+
# def test_clear_cache():
|
|
40
|
+
# result = clear_cache()
|
|
41
|
+
# assert isinstance(result, bool)
|
|
42
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|