diff --git a/src/trading/journal.py b/src/trading/journal.py index 979145b..c20a2f9 100644 --- a/src/trading/journal.py +++ b/src/trading/journal.py @@ -151,7 +151,10 @@ def get_position_summary(ticker: str) -> dict: sum(shares * entry_price) / sum(shares) as avg_entry_price, min(entry_date) as first_entry, max(entry_date) as last_entry, - count() as num_orders + count() as num_orders, + any(target_price) as target_price, + any(stop_loss) as stop_loss, + any(strategy) as strategy FROM stock_db.trades WHERE ticker = '{ticker}' AND exit_price IS NULL @@ -160,7 +163,8 @@ def get_position_summary(ticker: str) -> dict: """ result = client.query(query).result_rows columns = ['position_id', 'total_shares', 'avg_entry_price', - 'first_entry', 'last_entry', 'num_orders'] + 'first_entry', 'last_entry', 'num_orders', + 'target_price', 'stop_loss', 'strategy'] return [dict(zip(columns, row)) for row in result] def get_order_type() -> str: