INNER CODE UNIT · Python
possible_buy_amt
pe049395/IMC-Prosperity-2024 · submissions/round5.py:346
def possible_buy_amt(self) -> int:
"""Return possible buy amount.
Returns:
int: possible buy amount
"""
possible_buy_amount1 = self._position_limit[self.product] - self.rt_position
possible_buy_amount2 = self._position_limit[self.product] - self.position
return min(possible_buy_amount1, possible_buy_amount2)
@property
def possible_sell_amt(self) -> int:
"""Return possible sell amount.
Returns:
int: possible sell amount