voly 0.0.227__py3-none-any.whl → 0.0.228__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 +1 -1
- voly/core/data.py +3 -9
- {voly-0.0.227.dist-info → voly-0.0.228.dist-info}/METADATA +1 -1
- {voly-0.0.227.dist-info → voly-0.0.228.dist-info}/RECORD +7 -7
- {voly-0.0.227.dist-info → voly-0.0.228.dist-info}/WHEEL +0 -0
- {voly-0.0.227.dist-info → voly-0.0.228.dist-info}/licenses/LICENSE +0 -0
- {voly-0.0.227.dist-info → voly-0.0.228.dist-info}/top_level.txt +0 -0
voly/client.py
CHANGED
voly/core/data.py
CHANGED
@@ -287,7 +287,7 @@ def process_option_chain(df: pd.DataFrame, currency: str) -> pd.DataFrame:
|
|
287
287
|
qty = float(bid[2]) if bid[0] == 'new' else float(bid[1])
|
288
288
|
clean_bids.append((price, qty))
|
289
289
|
if clean_bids:
|
290
|
-
|
290
|
+
df.at[idx, 'bids'] = clean_bids
|
291
291
|
|
292
292
|
# Process ask side
|
293
293
|
if 'asks' in row and isinstance(row['asks'], list) and len(row['asks']) > 0:
|
@@ -299,7 +299,7 @@ def process_option_chain(df: pd.DataFrame, currency: str) -> pd.DataFrame:
|
|
299
299
|
qty = float(ask[2]) if ask[0] == 'new' else float(ask[1])
|
300
300
|
clean_asks.append((price, qty))
|
301
301
|
if clean_asks:
|
302
|
-
|
302
|
+
df.at[idx, 'asks'] = clean_asks
|
303
303
|
|
304
304
|
df['bid_depth'] = df['bids']
|
305
305
|
df['ask_depth'] = df['asks']
|
@@ -319,15 +319,13 @@ def process_option_chain(df: pd.DataFrame, currency: str) -> pd.DataFrame:
|
|
319
319
|
|
320
320
|
@catch_exception
|
321
321
|
async def fetch_option_chain(exchange: str = 'deribit',
|
322
|
-
currency: str = 'BTC'
|
323
|
-
depth: bool = False) -> pd.DataFrame:
|
322
|
+
currency: str = 'BTC') -> pd.DataFrame:
|
324
323
|
"""
|
325
324
|
Fetch option chain data from the specified exchange.
|
326
325
|
|
327
326
|
Parameters:
|
328
327
|
exchange (str): Exchange to fetch data from (currently only 'deribit' is supported)
|
329
328
|
currency (str): Currency to fetch options for (e.g., 'BTC', 'ETH')
|
330
|
-
depth (bool): Whether to include full order book depth. Else, just top of book.
|
331
329
|
|
332
330
|
Returns:
|
333
331
|
pd.DataFrame: Processed option chain data
|
@@ -348,8 +346,4 @@ async def fetch_option_chain(exchange: str = 'deribit',
|
|
348
346
|
# Process data
|
349
347
|
processed_data = process_option_chain(raw_data, currency)
|
350
348
|
|
351
|
-
# Remove order book depth if not needed
|
352
|
-
if not depth and 'bids' in processed_data.columns and 'asks' in processed_data.columns:
|
353
|
-
processed_data = processed_data.drop(columns=['bids', 'asks'])
|
354
|
-
|
355
349
|
return processed_data
|
@@ -1,11 +1,11 @@
|
|
1
1
|
voly/__init__.py,sha256=8xyDk7rFCn_MOD5hxuv5cxxKZvBVRiSIM7TgaMPpwpw,211
|
2
|
-
voly/client.py,sha256=
|
2
|
+
voly/client.py,sha256=H4BY5n1isHOqMYX-Koe8-WKBKE6zxbdDYopDF58BPBI,14533
|
3
3
|
voly/exceptions.py,sha256=PBsbn1vNMvKcCJwwJ4lBO6glD85jo1h2qiEmD7ArAjs,92
|
4
4
|
voly/formulas.py,sha256=Jx2QSTkN3S_X1YWYXN3T0gBcxMKB_VLsqgDPg32ApmM,10833
|
5
5
|
voly/models.py,sha256=CGJQr13Uie7iwtx2hjViN9lMXeRN_uOqzp4u8NPaTlA,9282
|
6
6
|
voly/core/__init__.py,sha256=bu6fS2I1Pj9fPPnl-zY3L7NqrZSY5Zy6NY2uMUvdhKs,183
|
7
7
|
voly/core/charts.py,sha256=6MSU0z01fPOVSssodxdnFqchzDfupSmXq_e71WwDmVQ,12635
|
8
|
-
voly/core/data.py,sha256=
|
8
|
+
voly/core/data.py,sha256=4E-zF2wJwumbWcrGVOS59ebApRKnxyyUXCTTriUk45Y,12389
|
9
9
|
voly/core/fit.py,sha256=R3aDgCjvZ30PujoE9pgnGQXPQOTTMbk7_-RQ0ZMx5ig,13918
|
10
10
|
voly/core/hd.py,sha256=dSv197RmSWFWbRRdoBzMrD_poT7ZiJ8hdD_wKE-Li_M,13559
|
11
11
|
voly/core/interpolate.py,sha256=GAkrqaar7A0D6UMipXQUp4vSHRfb44TmCG5Xiv9elXg,5176
|
@@ -13,8 +13,8 @@ voly/core/rnd.py,sha256=wiZ5OIjPDf1Th5_sQ9CZG5JgAo3EL8f63T_Rj1_VP-0,13214
|
|
13
13
|
voly/utils/__init__.py,sha256=E05mWatyC-PDOsCxQV1p5Xi1IgpOomxrNURyCx_gB-w,200
|
14
14
|
voly/utils/density.py,sha256=ONpRli-IaJDgOZ2sb27HHFc9_tkkGSATKl94JODd86A,5879
|
15
15
|
voly/utils/logger.py,sha256=4-_2bVJmq17Q0d7Rd2mPg1AeR8gxv6EPvcmBDMFWcSM,1744
|
16
|
-
voly-0.0.
|
17
|
-
voly-0.0.
|
18
|
-
voly-0.0.
|
19
|
-
voly-0.0.
|
20
|
-
voly-0.0.
|
16
|
+
voly-0.0.228.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
|
17
|
+
voly-0.0.228.dist-info/METADATA,sha256=_21vNdPGISj2HC7IKCjC47LHjMq2F1qPbKOEF9oFbb0,4115
|
18
|
+
voly-0.0.228.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
|
19
|
+
voly-0.0.228.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
|
20
|
+
voly-0.0.228.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|