voly 0.0.147__py3-none-any.whl → 0.0.149__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/client.py CHANGED
@@ -358,7 +358,6 @@ class VolyClient:
358
358
  domain_params=domain_params,
359
359
  return_domain=return_domain,
360
360
  method=method,
361
- model_type=model_type,
362
361
  distribution=distribution,
363
362
  window_length=window_length,
364
363
  n_fits=n_fits,
voly/core/hd.py CHANGED
@@ -61,33 +61,16 @@ def get_historical_data(currency: str,
61
61
  date_start = (dt.datetime.now() - dt.timedelta(days=days_ago)).strftime('%Y-%m-%d %H:%M:%S')
62
62
  from_ts = exchange.parse8601(date_start)
63
63
 
64
- # Fetch data with pagination
65
- ohlcv = []
66
- last_ts = from_ts
67
-
68
- logger.info(f"Fetching {currency} historical data from {exchange_name} for past {days_ago} days")
69
-
64
+ ohlcv_list = []
65
+ ohlcv = exchange.fetch_ohlcv(symbol, granularity, since=from_ts, limit=1000)
66
+ ohlcv_list.append(ohlcv)
70
67
  while True:
71
- batch = exchange.fetch_ohlcv(symbol, granularity, since=last_ts, limit=1000)
72
-
73
- if not batch or len(batch) == 0:
74
- break
75
-
76
- if len(ohlcv) > 0 and batch[0][0] == ohlcv[-1][0]:
77
- # Skip first element if it's a duplicate of the last from previous batch
78
- batch = batch[1:]
79
-
80
- if not batch:
68
+ from_ts = ohlcv[-1][0]
69
+ new_ohlcv = exchange.fetch_ohlcv(symbol, granularity, since=from_ts, limit=1000)
70
+ ohlcv.extend(new_ohlcv)
71
+ if len(new_ohlcv) != 1000:
81
72
  break
82
73
 
83
- ohlcv.extend(batch)
84
- last_ts = batch[-1][0]
85
-
86
- if len(batch) < 1000:
87
- break
88
-
89
- logger.debug(f"Fetched {len(batch)} candles, total now: {len(ohlcv)}")
90
-
91
74
  # Convert to DataFrame
92
75
  df_hist = pd.DataFrame(ohlcv, columns=['date', 'open', 'high', 'low', 'close', 'volume'])
93
76
  df_hist['date'] = pd.to_datetime(df_hist['date'], unit='ms')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voly
3
- Version: 0.0.147
3
+ Version: 0.0.149
4
4
  Summary: Options & volatility research package
5
5
  Author-email: Manu de Cara <manu.de.cara@gmail.com>
6
6
  License: MIT
@@ -1,5 +1,5 @@
1
1
  voly/__init__.py,sha256=8xyDk7rFCn_MOD5hxuv5cxxKZvBVRiSIM7TgaMPpwpw,211
2
- voly/client.py,sha256=ANMZBP44kipoKxyxVSdIxREsWK_QdsJuXXBMzq3LqFg,13449
2
+ voly/client.py,sha256=Jlep-VUW0jFW6dX6AE13CUsbG78u1UeNaWNLW7g2l08,13414
3
3
  voly/exceptions.py,sha256=PBsbn1vNMvKcCJwwJ4lBO6glD85jo1h2qiEmD7ArAjs,92
4
4
  voly/formulas.py,sha256=G_soRiPwQlHy6milOAj6TdmBWr-fNZpMvm0joXAMZ90,10767
5
5
  voly/models.py,sha256=o-pHujGfr5Gn8ItckMzLI4Q8yaX9FQaV8UjCxv2zgTY,3364
@@ -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=wWWQwEb-bcUOVonF0iCOh28C5fBeWsuYWf7AOlUyFY4,29965
10
+ voly/core/hd.py,sha256=vaTqdmJdWKLUA2S5chkUjVPlHvGP5enXhVyGcERvb10,29576
11
11
  voly/core/interpolate.py,sha256=JkK172-FXyhesW3hY4pEeuJWG3Bugq7QZXbeKoRpLuo,5305
12
12
  voly/core/rnd.py,sha256=AvGsITB52-Ti9AOA2lj2N4UAyJUtD-Bs37HRwLbzRsA,16043
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.147.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
16
- voly-0.0.147.dist-info/METADATA,sha256=-VjBzabvWIulpLo-d1R4LWlAy_tJXiA2fddaoBiZjHw,4115
17
- voly-0.0.147.dist-info/WHEEL,sha256=DK49LOLCYiurdXXOXwGJm6U4DkHkg4lcxjhqwRa0CP4,91
18
- voly-0.0.147.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
19
- voly-0.0.147.dist-info/RECORD,,
15
+ voly-0.0.149.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
16
+ voly-0.0.149.dist-info/METADATA,sha256=BBrle1q5bFrpF1cN35gBUjt84w48E0DcQsh4BcSUElk,4115
17
+ voly-0.0.149.dist-info/WHEEL,sha256=DK49LOLCYiurdXXOXwGJm6U4DkHkg4lcxjhqwRa0CP4,91
18
+ voly-0.0.149.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
19
+ voly-0.0.149.dist-info/RECORD,,
File without changes