mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-02 09:37:23 -04:00
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.