voly 0.0.108__py3-none-any.whl → 0.0.109__py3-none-any.whl
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.
- voly/core/hd.py +7 -21
- {voly-0.0.108.dist-info → voly-0.0.109.dist-info}/METADATA +1 -1
- {voly-0.0.108.dist-info → voly-0.0.109.dist-info}/RECORD +6 -6
- {voly-0.0.108.dist-info → voly-0.0.109.dist-info}/WHEEL +0 -0
- {voly-0.0.108.dist-info → voly-0.0.109.dist-info}/licenses/LICENSE +0 -0
- {voly-0.0.108.dist-info → voly-0.0.109.dist-info}/top_level.txt +0 -0
voly/core/hd.py
CHANGED
|
@@ -48,29 +48,15 @@ def get_historical_data(currency, lookback_days, granularity, exchange_name):
|
|
|
48
48
|
else:
|
|
49
49
|
raise VolyError("lookback_days should be in format '90d', '30d', etc.")
|
|
50
50
|
|
|
51
|
-
# Convert start date to timestamp
|
|
52
51
|
from_ts = exchange.parse8601(date_start)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
ohlcv
|
|
56
|
-
last_timestamp = from_ts
|
|
57
|
-
|
|
52
|
+
ohlcv_list = []
|
|
53
|
+
ohlcv = exchange.fetch_ohlcv(symbol, granularity, since=from_ts, limit=1000)
|
|
54
|
+
ohlcv_list.append(ohlcv)
|
|
58
55
|
while True:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if ohlcv and batch[0][0] == ohlcv[-1][0]:
|
|
65
|
-
batch = batch[1:] # Avoid duplicates
|
|
66
|
-
|
|
67
|
-
ohlcv.extend(batch)
|
|
68
|
-
|
|
69
|
-
# Update timestamp for next batch
|
|
70
|
-
last_timestamp = batch[-1][0]
|
|
71
|
-
|
|
72
|
-
# Break if we got less than the limit (reached the end)
|
|
73
|
-
if len(batch) < 1000:
|
|
56
|
+
from_ts = ohlcv[-1][0]
|
|
57
|
+
new_ohlcv = exchange.fetch_ohlcv(symbol, granularity, since=from_ts, limit=1000)
|
|
58
|
+
ohlcv.extend(new_ohlcv)
|
|
59
|
+
if len(new_ohlcv) != 1000:
|
|
74
60
|
break
|
|
75
61
|
|
|
76
62
|
# Convert to DataFrame
|
|
@@ -7,13 +7,13 @@ voly/core/__init__.py,sha256=bu6fS2I1Pj9fPPnl-zY3L7NqrZSY5Zy6NY2uMUvdhKs,183
|
|
|
7
7
|
voly/core/charts.py,sha256=E21OZB5lTY4YL2flgaFJ6s5g3_ExtAQT2zryZZxLPyM,12735
|
|
8
8
|
voly/core/data.py,sha256=pDeuYhP0GX4RbtlqByvsE3rfHcIkix0BU5MLW8sKIeI,8935
|
|
9
9
|
voly/core/fit.py,sha256=Tb9eeG7e_2dQTcqt6aqEwFrZdy6jR9rSNqe6tzOdVhQ,9245
|
|
10
|
-
voly/core/hd.py,sha256=
|
|
10
|
+
voly/core/hd.py,sha256=sbNUL01lRYGhPOVVaLf2-dhHQR1yieNgDXc1Gdu3hK0,2462
|
|
11
11
|
voly/core/interpolate.py,sha256=JkK172-FXyhesW3hY4pEeuJWG3Bugq7QZXbeKoRpLuo,5305
|
|
12
12
|
voly/core/rnd.py,sha256=VKM8ojLBziB9nxOEsKO5z_9Z1BSOVNxg0OQPx-Sp80I,10094
|
|
13
13
|
voly/utils/__init__.py,sha256=E05mWatyC-PDOsCxQV1p5Xi1IgpOomxrNURyCx_gB-w,200
|
|
14
14
|
voly/utils/logger.py,sha256=4-_2bVJmq17Q0d7Rd2mPg1AeR8gxv6EPvcmBDMFWcSM,1744
|
|
15
|
-
voly-0.0.
|
|
16
|
-
voly-0.0.
|
|
17
|
-
voly-0.0.
|
|
18
|
-
voly-0.0.
|
|
19
|
-
voly-0.0.
|
|
15
|
+
voly-0.0.109.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
|
|
16
|
+
voly-0.0.109.dist-info/METADATA,sha256=jXlpZC7l_ML8dLiSKlsX8AOwVqawgHnxGUfYwC2rK5Q,4115
|
|
17
|
+
voly-0.0.109.dist-info/WHEEL,sha256=tTnHoFhvKQHCh4jz3yCn0WPTYIy7wXx3CJtJ7SJGV7c,91
|
|
18
|
+
voly-0.0.109.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
|
|
19
|
+
voly-0.0.109.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|