1
This commit is contained in:
parent
c0fac4b870
commit
a76c82b9b1
@ -173,10 +173,19 @@ def check_abnormal_orders():
|
|||||||
entry_price = order[4]
|
entry_price = order[4]
|
||||||
filled_price = order[5]
|
filled_price = order[5]
|
||||||
|
|
||||||
time_str = last_time.strftime('%H:%M:%S') if last_time else 'N/A'
|
# last_time 是字符串,直接格式化
|
||||||
|
if last_time:
|
||||||
|
if isinstance(last_time, str):
|
||||||
|
time_str = last_time[11:19] # 提取 HH:MM:SS 部分
|
||||||
|
else:
|
||||||
|
time_str = last_time.strftime('%H:%M:%S')
|
||||||
|
else:
|
||||||
|
time_str = 'N/A'
|
||||||
|
|
||||||
filled_str = f"{filled_price:.2f}" if filled_price else "NULL"
|
filled_str = f"{filled_price:.2f}" if filled_price else "NULL"
|
||||||
|
entry_str = f"{entry_price:.2f}" if entry_price else "NULL"
|
||||||
print(f" {time_str} | {symbol} | {side:4s} | {status:15s} | "
|
print(f" {time_str} | {symbol} | {side:4s} | {status:15s} | "
|
||||||
f"入场:{entry_price:.2f} 成交:{filled_str}")
|
f"入场:{entry_str} 成交:{filled_str}")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
print("=" * 80)
|
print("=" * 80)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user