Skip to content

Commit

Permalink
remove prints
Browse files Browse the repository at this point in the history
  • Loading branch information
soundsonacid committed Jul 22, 2024
1 parent da62f67 commit 8dc64a5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion examples/place_and_take.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ async def main():

await demo_perp_place_and_take(
drift_client=drift_client,
user_map=user_map,
perp_market_index=perp_market_index,
perp_trade_direction=PositionDirection.Long(),
perp_base_amount=trade_amount_base,
Expand Down
11 changes: 0 additions & 11 deletions src/driftpy/drift_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,8 @@ def get_total_collateral(
asset_value = self.get_spot_market_asset_value(
margin_category=margin_category, include_open_orders=True, strict=strict
)
print(f"ASSET VALUE: {asset_value}")
pnl = self.get_unrealized_pnl(True, with_weight_margin_category=margin_category)
print(f"PNL: {pnl}")
total_collateral = asset_value + pnl
print(f"TOTAL COLLATERAL: {total_collateral}")
return total_collateral

def get_free_collateral(
Expand Down Expand Up @@ -1002,8 +999,6 @@ def get_perp_liq_price(
market, current_perp_pos, position_base_size_change
)

print(f"PERP DELTA: {free_collateral_delta}")

if not free_collateral_delta:
return -1

Expand Down Expand Up @@ -1033,8 +1028,6 @@ def get_perp_liq_price(
)
)

print(f"SPOT DELTA: {spot_free_collateral_delta}")

free_collateral_delta = (
free_collateral_delta + spot_free_collateral_delta
)
Expand All @@ -1046,11 +1039,7 @@ def get_perp_liq_price(
perp_market_index
).price

print(f"DELTA: {free_collateral_delta}")
print(f"FREE COLLATERAL: {free_collateral}")
print(f"ORACLE PRICE: {oracle_price}")
liq_price_delta = (free_collateral * QUOTE_PRECISION) // free_collateral_delta
print(f"LIQ PRICE DELTA: {liq_price_delta}")
liq_price = oracle_price - liq_price_delta

if liq_price < 0:
Expand Down

0 comments on commit 8dc64a5

Please sign in to comment.