voly 0.0.227__tar.gz → 0.0.228__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.
Files changed (26) hide show
  1. {voly-0.0.227/src/voly.egg-info → voly-0.0.228}/PKG-INFO +1 -1
  2. {voly-0.0.227 → voly-0.0.228}/pyproject.toml +2 -2
  3. {voly-0.0.227 → voly-0.0.228}/src/voly/client.py +1 -1
  4. {voly-0.0.227 → voly-0.0.228}/src/voly/core/data.py +3 -9
  5. {voly-0.0.227 → voly-0.0.228/src/voly.egg-info}/PKG-INFO +1 -1
  6. {voly-0.0.227 → voly-0.0.228}/LICENSE +0 -0
  7. {voly-0.0.227 → voly-0.0.228}/README.md +0 -0
  8. {voly-0.0.227 → voly-0.0.228}/setup.cfg +0 -0
  9. {voly-0.0.227 → voly-0.0.228}/setup.py +0 -0
  10. {voly-0.0.227 → voly-0.0.228}/src/voly/__init__.py +0 -0
  11. {voly-0.0.227 → voly-0.0.228}/src/voly/core/__init__.py +0 -0
  12. {voly-0.0.227 → voly-0.0.228}/src/voly/core/charts.py +0 -0
  13. {voly-0.0.227 → voly-0.0.228}/src/voly/core/fit.py +0 -0
  14. {voly-0.0.227 → voly-0.0.228}/src/voly/core/hd.py +0 -0
  15. {voly-0.0.227 → voly-0.0.228}/src/voly/core/interpolate.py +0 -0
  16. {voly-0.0.227 → voly-0.0.228}/src/voly/core/rnd.py +0 -0
  17. {voly-0.0.227 → voly-0.0.228}/src/voly/exceptions.py +0 -0
  18. {voly-0.0.227 → voly-0.0.228}/src/voly/formulas.py +0 -0
  19. {voly-0.0.227 → voly-0.0.228}/src/voly/models.py +0 -0
  20. {voly-0.0.227 → voly-0.0.228}/src/voly/utils/__init__.py +0 -0
  21. {voly-0.0.227 → voly-0.0.228}/src/voly/utils/density.py +0 -0
  22. {voly-0.0.227 → voly-0.0.228}/src/voly/utils/logger.py +0 -0
  23. {voly-0.0.227 → voly-0.0.228}/src/voly.egg-info/SOURCES.txt +0 -0
  24. {voly-0.0.227 → voly-0.0.228}/src/voly.egg-info/dependency_links.txt +0 -0
  25. {voly-0.0.227 → voly-0.0.228}/src/voly.egg-info/requires.txt +0 -0
  26. {voly-0.0.227 → voly-0.0.228}/src/voly.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voly
3
- Version: 0.0.227
3
+ Version: 0.0.228
4
4
  Summary: Options & volatility research package
5
5
  Author-email: Manu de Cara <manu.de.cara@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "voly"
7
- version = "0.0.227"
7
+ version = "0.0.228"
8
8
  description = "Options & volatility research package"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -60,7 +60,7 @@ line_length = 100
60
60
  multi_line_output = 3
61
61
 
62
62
  [tool.mypy]
63
- python_version = "0.0.227"
63
+ python_version = "0.0.228"
64
64
  warn_return_any = true
65
65
  warn_unused_configs = true
66
66
  disallow_untyped_defs = true
@@ -79,7 +79,7 @@ class VolyClient:
79
79
 
80
80
  try:
81
81
  option_chain = loop.run_until_complete(
82
- fetch_option_chain(exchange, currency, depth)
82
+ fetch_option_chain(exchange, currency)
83
83
  )
84
84
  return option_chain
85
85
  except VolyError as e:
@@ -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
- option_chain.at[idx, 'bids'] = clean_bids
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
- option_chain.at[idx, 'asks'] = clean_asks
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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voly
3
- Version: 0.0.227
3
+ Version: 0.0.228
4
4
  Summary: Options & volatility research package
5
5
  Author-email: Manu de Cara <manu.de.cara@gmail.com>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes