adjust none

This commit is contained in:
adriance 2022-03-14 12:09:13 +08:00
parent f9e93cf3f8
commit a750369796
1 changed files with 4 additions and 2 deletions

View File

@ -449,8 +449,10 @@ class LocalTrade():
'open_rate_requested': self.open_rate_requested,
'open_trade_value': round(self.open_trade_value, 8),
'buy_filled_date': self.buy_filled_date.strftime(DATETIME_PRINT_FORMAT),
'buy_filled_timestamp': int(self.buy_filled_date.replace(tzinfo=timezone.utc).timestamp() * 1000),
'buy_filled_date': (self.buy_filled_date.strftime(DATETIME_PRINT_FORMAT)
if self.buy_filled_date else None),
'buy_filled_timestamp': int(self.buy_filled_date.replace(
tzinfo=timezone.utc).timestamp() * 1000) if self.buy_filled_date else None,
'close_date': (self.close_date.strftime(DATETIME_PRINT_FORMAT)
if self.close_date else None),