Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion application/execution_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def check_order_submitted(report, *, translator):
),
)
if status in {"PendingSubmit", "ApiPending", "ApiPendingSubmit", "Submitted", "PreSubmitted"}:
return True, f"✅ {translator('submitted', order_id=order_id)}"
return True, f"✅ {translator('submitted', order_id=order_id, status=status)}"
return False, f"❌ {translator('failed', reason=status)}"


Expand Down
4 changes: 2 additions & 2 deletions notifications/telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def _break_telegram_market_symbol_auto_links(value) -> str:
"hold": "💎 持仓不变",
"market_sell": "📉 [市价卖出] {symbol}: {qty}股",
"limit_buy": "📈 [限价买入] {symbol}: {qty}股 @ ${price}",
"submitted": "已下发,尚未确认成交;DAY 限价单若收盘未成交会自动取消(订单号: {order_id})",
"submitted": "已下发(状态: {status}),尚未确认券商接受或成交,仍可能被拒单或取消;DAY 限价单若收盘未成交会自动取消(订单号: {order_id})",
"failed": "失败: {reason}",
"order_filled": "✅ 订单成交 | {symbol} {side} {qty}股 均价 ${price}(订单号: {order_id})",
"order_partial": "⚠️ 部分成交 | {symbol} {side} {executed}/{qty}股 均价 ${price}(订单号: {order_id})",
Expand Down Expand Up @@ -427,7 +427,7 @@ def _break_telegram_market_symbol_auto_links(value) -> str:
"hold": "💎 Hold positions",
"market_sell": "📉 [Market sell] {symbol}: {qty} shares",
"limit_buy": "📈 [Limit buy] {symbol}: {qty} shares @ ${price}",
"submitted": "submitted, fill not confirmed; a DAY limit order may auto-cancel if unfilled at close (ID: {order_id})",
"submitted": "submitted (status: {status}), but broker acceptance/fill is not confirmed and the order may still be rejected or cancelled; a DAY limit order may auto-cancel if unfilled at close (ID: {order_id})",
"failed": "failed: {reason}",
"order_filled": "✅ Filled | {symbol} {side} {qty} shares avg ${price} (ID: {order_id})",
"order_partial": "⚠️ Partial | {symbol} {side} {executed}/{qty} shares avg ${price} (ID: {order_id})",
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies = [
"google-cloud-secret-manager",
"google-cloud-storage",
"yfinance",
"quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@f6d5c2c64d2b0dcd2e16a8bb2093e737a281d305",
"quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@69a0256934d081b5ef309a885384b9eb9f62cf90",
"us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@17ddb86c72d44b2c7b78ba7a10d8f71b21180166",
"hk-equity-strategies @ git+https://github.com/QuantStrategyLab/HkEquityStrategies.git@b6a8ac2ad3c8110b5ea74fb059c8206388d63bcd",
]
Expand Down Expand Up @@ -64,5 +64,5 @@ include = [

[tool.uv]
override-dependencies = [
"quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@f6d5c2c64d2b0dcd2e16a8bb2093e737a281d305",
"quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@69a0256934d081b5ef309a885384b9eb9f62cf90",
]
2 changes: 1 addition & 1 deletion qsl.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ring = 3
allow_legacy = false

[qsl.requires]
quant_platform_kit = "f6d5c2c64d2b0dcd2e16a8bb2093e737a281d305"
quant_platform_kit = "69a0256934d081b5ef309a885384b9eb9f62cf90"
us_equity_strategies = "17ddb86c72d44b2c7b78ba7a10d8f71b21180166"
hk_equity_strategies = "b6a8ac2ad3c8110b5ea74fb059c8206388d63bcd"

Expand Down
4 changes: 3 additions & 1 deletion tests/test_execution_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ def test_check_order_submitted_warns_submitted_order_is_not_fill_confirmation():
report = SimpleNamespace(broker_order_id="123", status="Submitted")
ok, message = check_order_submitted(report, translator=build_translator("zh"))
assert ok is True
assert "尚未确认成交" in message
assert "状态: Submitted" in message
assert "仍可能被拒单或取消" in message
assert "尚未确认券商接受或成交" in message
assert "自动取消" in message


Expand Down
6 changes: 3 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading