diff --git a/client/python/upbit/models.py b/client/python/upbit/models.py index 83bfa72..81597a9 100644 --- a/client/python/upbit/models.py +++ b/client/python/upbit/models.py @@ -523,6 +523,23 @@ def Order_cancel(self, **kwargs) -> dict: future = self.__client.Order.Order_cancel(**kwargs) return HTTPFutureExtractor.future_extraction(future) + def Order_cancel_all(self, **kwargs) -> list: + l = [] + + while True: + future = self.__client.Order.Order_info_all(state="wait") + waits = HTTPFutureExtractor.future_extraction(future) + + if len(waits) == 0: + break + + l.append(waits) + + for w in waits: + future = self.__client.Order.Order_cancel(uuid=w["uuid"]) + + return l + class Trade: """