From 25a664e5bb87f2b70612c08b12f624401c34615a Mon Sep 17 00:00:00 2001 From: "Bobby (aider)" Date: Mon, 10 Feb 2025 09:40:38 -0800 Subject: [PATCH] fix: Update ClickHouse client query method in get_position_summary --- src/trading/journal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trading/journal.py b/src/trading/journal.py index bcef2e2..12c6f5f 100644 --- a/src/trading/journal.py +++ b/src/trading/journal.py @@ -88,7 +88,7 @@ def get_position_summary(ticker: str) -> dict: GROUP BY position_id ORDER BY first_entry DESC """ - result = client.execute(query) + result = client.query(query).result_rows columns = ['position_id', 'total_shares', 'avg_entry_price', 'first_entry', 'last_entry', 'num_orders'] return [dict(zip(columns, row)) for row in result]