From 5789e550f0d03f2605e9171ab62be437b91ebced Mon Sep 17 00:00:00 2001 From: frank <98238480+soundsonacid@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:02:53 -0500 Subject: [PATCH] frank/0.7.43 (#150) * fixes * 0.7.43 --- .bumpversion.cfg | 2 +- CHANGELOG.md | 6 +++++- pyproject.toml | 2 +- src/driftpy/__init__.py | 2 +- src/driftpy/drift_user.py | 6 ++---- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index b0658eae..7cdb7442 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.7.42 +current_version = 0.7.43 commit = True tag = True tag_name = {new_version} diff --git a/CHANGELOG.md b/CHANGELOG.md index ba594efc..9325432e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -212,4 +212,8 @@ Fix enum interpretaton bug in `get_max_confidence_interval_multiplier` ## [0.7.42] - 2024-3-18 -Add W-PERP to `constants/perp_markets.py` \ No newline at end of file +Add W-PERP to `constants/perp_markets.py` + +## [0.7.43] - 2024-3-21 + +Fix minor bugs in `DriftUser` math functions \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e88e105f..ab5c85d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "driftpy" -version = "0.7.42" +version = "0.7.43" description = "A Python client for the Drift DEX" authors = ["x19 ", "bigz ", "frank "] license = "MIT" diff --git a/src/driftpy/__init__.py b/src/driftpy/__init__.py index 735f5558..e28e20a0 100644 --- a/src/driftpy/__init__.py +++ b/src/driftpy/__init__.py @@ -1 +1 @@ -__version__ = "0.7.42" +__version__ = "0.7.43" diff --git a/src/driftpy/drift_user.py b/src/driftpy/drift_user.py index c43e5634..e638cfb4 100644 --- a/src/driftpy/drift_user.py +++ b/src/driftpy/drift_user.py @@ -992,7 +992,7 @@ def get_perp_liq_price( market = self.drift_client.get_perp_market_account(perp_market_index) current_perp_pos = self.get_perp_position_with_lp_settle( - perp_market_index, burnLpShares=True + perp_market_index, burn_lp_shares=True )[0] or self.get_empty_position(perp_market_index) free_collateral_delta = self.calculate_free_collateral_delta_for_perp( @@ -1057,9 +1057,7 @@ def get_spot_liq_price( return None total_collateral = self.get_total_collateral(MarginCategory.MAINTENANCE) - margin_req = self.get_margin_requirement( - MarginCategory.MAINTENANCE, None, True, False - ) + margin_req = self.get_margin_requirement(MarginCategory.MAINTENANCE, None, True) delta_liq = total_collateral - margin_req spot_market = self.drift_client.get_spot_market_account(spot_market_index)