Skip to content

feat: Add scalable captial integration - #146

Merged
felixschndr merged 5 commits into
felixschndr:mainfrom
danielpotthast:feature/scalable-capital
Sep 1, 2026
Merged

feat: Add scalable captial integration#146
felixschndr merged 5 commits into
felixschndr:mainfrom
danielpotthast:feature/scalable-capital

Conversation

@danielpotthast

@danielpotthast danielpotthast commented Aug 26, 2026

Copy link
Copy Markdown
Contributor
  • Adds Scalable Capital as a new bank handler, syncing the cash (Verrechnungskonto), securities positions, and overnight/Tagesgeld accounts via the official sc CLI.
  • Authentication uses the CLI's device-code login flow (no password/2FA code entry in the UI); the sc binary is auto-provisioned (downloaded, checksum-verified, and extracted) on first use if not already present.
  • Read-only by design: only a fixed allowlist of sc subcommands is ever invoked, and CLI output is parsed defensively (rate-limit retries, auth-error mapping, cursor-based pagination).

@github-actions
github-actions Bot requested a review from felixschndr August 26, 2026 19:38
@danielpotthast
danielpotthast force-pushed the feature/scalable-capital branch from 6caab69 to 295bf80 Compare August 27, 2026 07:46
Comment thread source/backend/services/banking/scalable_cli_provisioning.py Outdated
Comment thread source/backend/bank_handlers/scalable_capital.py Outdated
Comment thread docs/bank_handlers/scalable_capital.md Outdated
Comment thread source/backend/bank_handlers/scalable_capital.py Outdated
Comment thread source/backend/bank_handlers/scalable_capital.py Outdated
Comment thread source/backend/services/banking/credential_service.py Outdated
Comment thread tests/backend/bank_handlers/test_scalable_capital.py
Comment thread docs/bank_handlers/scalable_capital.md
Comment thread docs/bank_handlers/scalable_capital.md Outdated
account if you have one.

> [!NOTE]
> Historical position value-on-a-date charts (as available for Trade Republic) are not yet

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a CLI limitation. sc broker chart --isin <ISIN> --timeframe max --json returns a price time series. See the comment on get_market_value_history. So we could think about implementing this in a future PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented: get_market_value_history()/_fetch_value_history() now use sc broker chart --isin <ISIN> --timeframe max --json combined with the settled buy/sell/transfer history to build a real per-position value-over-time series (see build_daily_market_value_history in base.py).

Verified against a live account: broker chart returns data_points with mid_price/timestamp_utc (no result wrapper, matching the parsing), and after a fresh sync each position now shows its own distinct, correctly-varying valuation history tracking its actual buys/sells: no more flat single-point fallback. Docs updated accordingly.

Comment thread source/frontend/src/components/two-factor-modal.tsx
@danielpotthast
danielpotthast force-pushed the feature/scalable-capital branch from 295bf80 to 8943807 Compare August 30, 2026 18:53
@felixschndr
felixschndr self-requested a review August 30, 2026 20:08

@felixschndr felixschndr left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see the 3 inline comments and fix the merge conflicts, then we can merge this into main.
Thanks for your contribution!

Comment thread source/backend/bank_handlers/scalable_capital.py Outdated
Comment thread source/backend/services/banking/scalable_capital_login.py
Comment thread source/backend/bank_handlers/scalable_capital.py Outdated
@danielpotthast
danielpotthast force-pushed the feature/scalable-capital branch from 8943807 to 37003bd Compare August 31, 2026 17:51
@felixschndr

Copy link
Copy Markdown
Owner

Perfect, please fix the merge conflicts and then you are very welcome to bump the version to 0.4.0

…eature/scalable-capital

# Conflicts:
#	source/backend/bank_handlers/base.py
#	source/backend/bank_handlers/trade_republic.py
#	tests/backend/bank_handlers/test_trade_republic.py
@felixschndr
felixschndr self-requested a review August 31, 2026 19:59
@felixschndr
felixschndr merged commit d58b996 into felixschndr:main Sep 1, 2026
10 checks passed
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.

2 participants