trade: apply runtime strategy/fx pnl split on sell paths (#370)
All checks were successful
Gitea CI / test (push) Successful in 32s
Gitea CI / test (pull_request) Successful in 32s

This commit is contained in:
agentson
2026-03-02 02:35:54 +09:00
parent 3914f24872
commit d4f37ee392
5 changed files with 161 additions and 8 deletions

View File

@@ -318,7 +318,7 @@ def get_latest_buy_trade(
if exchange_code:
cursor = conn.execute(
"""
SELECT decision_id, price, quantity
SELECT decision_id, price, quantity, selection_context
FROM trades
WHERE stock_code = ?
AND market = ?
@@ -339,7 +339,7 @@ def get_latest_buy_trade(
else:
cursor = conn.execute(
"""
SELECT decision_id, price, quantity
SELECT decision_id, price, quantity, selection_context
FROM trades
WHERE stock_code = ?
AND market = ?