chore: finalize broker qty metadata consistency
Co-authored-by: genichin <4282227+genichin@users.noreply.github.com>
This commit is contained in:
co-authored by
genichin
parent
30bcbe1d12
commit
f394f1560d
@@ -222,12 +222,15 @@ class AccountSnapshotService:
|
||||
|
||||
Unlike ``holdings_for_sell()``, this read path never performs a live broker
|
||||
call and therefore cannot mutate broker state or mask snapshot staleness.
|
||||
Freshness uses the same ``sell_max_age_sec`` policy (`self._sell_max_age`)
|
||||
as pending-sell quantity protection so strategy reads and sell dispatch
|
||||
share one stale-snapshot threshold.
|
||||
"""
|
||||
snapshot = self._load_current()
|
||||
self._age(snapshot.holdings_captured_at, self._sell_max_age)
|
||||
captured_at = snapshot.holdings_captured_at
|
||||
if captured_at is None:
|
||||
raise AccountSnapshotUnavailable("not_ready")
|
||||
self._age(captured_at, self._sell_max_age)
|
||||
return list(snapshot.holdings), captured_at
|
||||
|
||||
def buy_guard(
|
||||
|
||||
Reference in New Issue
Block a user