INNER CODE UNIT · Python
asks
pe049395/IMC-Prosperity-2024 · submissions/round5.py:298
def asks(self) -> list[tuple[int, int]]:
"""Return ask orders.
Returns:
dict[int, int].items(): ask orders (prc, amt)
"""
return list(self._state.order_depths[self.product].sell_orders.items())
@classmethod
def _cls_update_bids(cls, product, prc, new_amt):
if new_amt > 0:
cls._state.order_depths[product].buy_orders[prc] = new_amt
elif new_amt == 0:
cls._state.order_depths[product].buy_orders[prc] = 0
# else:
# raise ValueError("Negative amount in bid orders")