mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-06-14 21:31:18 -04:00
8521f685c7
Add proper exception handling around get_latest_position() calls in both buy() and sell() functions. Previously, exceptions were caught but code continued execution with undefined variables, causing "variable referenced before assignment" errors. Now returns error dict with context when position lookup fails. Related to context injection implementation for concurrent simulations.