fix no is_trading_hours in simulation trader

This commit is contained in:
zhiyong 2025-05-10 22:58:16 +08:00
parent f8821fe1ad
commit 42f5064e77

View File

@ -194,7 +194,7 @@ def sell():
raise ValueError("Price and amount must be positive")
# 检查是否在交易时间内
if not get_trader().is_trading_hours():
if not get_trader().is_trading_time():
logger.warning(
f"交易失败 - 非交易时间不能交易 - 代码: {code}, 价格: {price}, 数量: {amount}"
)