Skip to content

fix(afs): fall back to available_cash when cash_balance absent - #403

Merged
Pigbibi merged 1 commit into
mainfrom
fix/firstrade-cash-available-fallback
Oct 9, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
fix/firstrade-cash-available-fallback

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Summary

When Firstrade returns equity but omits cash_balance, publish exact available_cash as AFS cash so the console cash column is not empty while assets are present.

Still never synthesizes cash from equity or buying power.

SiYi click

  1. Merge this PR.
  2. Redeploy / re-Invoke account-facts sync once so QRS gets a cash row.

Test

  • pytest tests/test_account_facts_publisher.py (37 passed)

When equity is present but the broker omits cash_balance, publish the
exact available_cash figure as cash so the console cash column is not
empty. Still never synthesize cash from equity or buying power.
@Pigbibi
Pigbibi merged commit 6d964ff into main Oct 9, 2026
1 check passed
@Pigbibi
Pigbibi deleted the fix/firstrade-cash-available-fallback branch October 9, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant