voly 0.0.202__py3-none-any.whl → 0.0.204__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/data.py CHANGED
@@ -198,9 +198,11 @@ def process_option_chain(df: pd.DataFrame, currency: str) -> pd.DataFrame:
198
198
 
199
199
  # Apply extraction to create new columns
200
200
  splits = df['instrument_name'].str.split('-')
201
- df['currency'] = splits.str[0]
202
201
  df['maturity_name'] = splits.str[1]
203
- df['strikes'] = splits.str[2].astype(float)
202
+ if currency == 'XRP':
203
+ df['strikes'] = splits.str[2].str.replace('d', '.', regex=False).astype(float)
204
+ else:
205
+ df['strikes'] = splits.str[2].astype(float)
204
206
  df['option_type'] = splits.str[3]
205
207
 
206
208
  # Create maturity date at 8:00 AM UTC
@@ -356,7 +358,14 @@ async def fetch_option_chain(exchange: str = 'deribit',
356
358
  raise VolyError(f"Exchange '{exchange}' is not supported. Currently only 'deribit' is available.")
357
359
 
358
360
  # Get raw data
359
- raw_data = await get_deribit_data(currency=currency)
361
+ if currency not in ['BTC', 'ETH']:
362
+ new_currency = 'USDC'
363
+ raw_data = await get_deribit_data(currency=new_currency)
364
+ raw_data['currency'] = raw_data['instrument_name'].str.split('-').str[0].str.split('_').str[0]
365
+ raw_data = raw_data[raw_data['currency'] == currency]
366
+ else:
367
+ raw_data = await get_deribit_data(currency=currency)
368
+ raw_data['currency'] = currency
360
369
 
361
370
  # Process data
362
371
  processed_data = process_option_chain(raw_data, currency)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voly
3
- Version: 0.0.202
3
+ Version: 0.0.204
4
4
  Summary: Options & volatility research package
5
5
  Author-email: Manu de Cara <manu.de.cara@gmail.com>
6
6
  License: MIT
@@ -5,7 +5,7 @@ voly/formulas.py,sha256=JnEs6G0wlfRNH6X_YEJMe2RtLH-ryhzufjsim73Bj3c,11176
5
5
  voly/models.py,sha256=Wop6gZbvAOXSmI0JpYapjVSeJub_i8RLif2PzxRsfFE,7185
6
6
  voly/core/__init__.py,sha256=bu6fS2I1Pj9fPPnl-zY3L7NqrZSY5Zy6NY2uMUvdhKs,183
7
7
  voly/core/charts.py,sha256=2S-BfCo30aj1_xlNLqF-za5rQWxF_mWKIdtdOe5bgbw,12735
8
- voly/core/data.py,sha256=9v9iuE2XdIIlzoRAB7q1ol7YghBzBsPGAiwZ11oDuis,13650
8
+ voly/core/data.py,sha256=s2XzV72YC19QJjZAng_G2QZ0_FJvg9E2I-dV4Of3EK8,14095
9
9
  voly/core/fit.py,sha256=Ya2g8tNHw_5QFqD66_U4b7z18iWYSF-q_SBeRqBSjU8,17443
10
10
  voly/core/hd.py,sha256=UFAyLncNUHivpPAcko6IK1bC55mudVtdlRFfXp63HXE,14771
11
11
  voly/core/interpolate.py,sha256=JkK172-FXyhesW3hY4pEeuJWG3Bugq7QZXbeKoRpLuo,5305
@@ -13,8 +13,8 @@ voly/core/rnd.py,sha256=GoC3m1Q46Wnk5tV_mstr-3_aktHeue6BBLh4DQTciW0,13307
13
13
  voly/utils/__init__.py,sha256=E05mWatyC-PDOsCxQV1p5Xi1IgpOomxrNURyCx_gB-w,200
14
14
  voly/utils/density.py,sha256=q0fX4im9TGwMCZ32Hzdv8CNh56KnJo8bmG5w0gVWZH8,5879
15
15
  voly/utils/logger.py,sha256=4-_2bVJmq17Q0d7Rd2mPg1AeR8gxv6EPvcmBDMFWcSM,1744
16
- voly-0.0.202.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
17
- voly-0.0.202.dist-info/METADATA,sha256=3CWte_z_H0YA3JgacjwwhwRekrDnjOyHnK30g7FkK8s,4115
18
- voly-0.0.202.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
19
- voly-0.0.202.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
20
- voly-0.0.202.dist-info/RECORD,,
16
+ voly-0.0.204.dist-info/licenses/LICENSE,sha256=wcHIVbE12jfcBOai_wqBKY6xvNQU5E909xL1zZNq_2Q,1065
17
+ voly-0.0.204.dist-info/METADATA,sha256=NryL9Zo0j6JzL6VYoM_Zb7GQjWTCs5UAcd9W7IOvUAk,4115
18
+ voly-0.0.204.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
19
+ voly-0.0.204.dist-info/top_level.txt,sha256=ZfLw2sSxF-LrKAkgGjOmeTcw6_gD-30zvtdEY5W4B7c,5
20
+ voly-0.0.204.dist-info/RECORD,,
File without changes