fix: Update ClickHouse client query method in get_position_summary

This commit is contained in:
Bobby (aider) 2025-02-10 09:40:38 -08:00
parent 4ebfcfebd1
commit 25a664e5bb

View File

@ -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]