Skip to content

Commit

Permalink
#32 Extra messages, and with them the formatting error, have been rem…
Browse files Browse the repository at this point in the history
…oved.
  • Loading branch information
Tim55667757 committed Jul 22, 2022
1 parent ec069b6 commit 677fabc
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tksbrokerapi/TKSBrokerAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -2595,10 +2595,7 @@ def CloseOrders(self, orderIDs: list, allOrdersIDs: list = None, allStopOrdersID
responseJSON = self.SendAPIRequest(closeURL, reqType="POST")

if responseJSON and "time" in responseJSON.keys() and responseJSON["time"]:
uLogger.debug("Success time marker received from server: [{}] (UTC). Time of cancel in local time zone: [{}]".format(
responseJSON["time"],
datetime.strptime(responseJSON["time"], "%Y-%m-%dT%H:%M:%S.%fZ").replace(tzinfo=tzutc()).astimezone(tzlocal()).strftime("%Y-%m-%d %H:%M:%S"),
))
uLogger.debug("Success time marker received from server: [{}] (UTC)".format(responseJSON["time"]))
uLogger.info("Pending order with ID [{}] successfully cancel".format(orderID))

else:
Expand All @@ -2613,10 +2610,7 @@ def CloseOrders(self, orderIDs: list, allOrdersIDs: list = None, allStopOrdersID
responseJSON = self.SendAPIRequest(closeURL, reqType="POST")

if responseJSON and "time" in responseJSON.keys() and responseJSON["time"]:
uLogger.debug("Success time marker received from server: [{}] (UTC). Time of cancel in local time zone: [{}]".format(
responseJSON["time"],
datetime.strptime(responseJSON["time"], "%Y-%m-%dT%H:%M:%S.%fZ").replace(tzinfo=tzutc()).astimezone(tzlocal()).strftime("%Y-%m-%d %H:%M:%S"),
))
uLogger.debug("Success time marker received from server: [{}] (UTC)".format(responseJSON["time"]))
uLogger.info("Stop order with ID [{}] successfully cancel".format(orderID))

else:
Expand Down

0 comments on commit 677fabc

Please # to comment.