Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
soundsonacid committed Aug 2, 2024
2 parents cdd8422 + 367119c commit 018dec3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/driftpy/drift_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,19 @@ def get_fuel_bonus(

return total_fuel

def get_active_spot_positions(self) -> list[SpotPosition]:
user = self.get_user_account()
return self.get_active_spot_positions_for_user_account(user)

def get_active_spot_positions_for_user_account(
self, user: UserAccount
) -> list[SpotPosition]:
return [
spot_position
for spot_position in user.spot_positions
if not is_spot_position_available(spot_position)
]

def get_perp_position_value(
self,
market_index: int,
Expand Down

0 comments on commit 018dec3

Please sign in to comment.