@deemwario/algofic-smart-stock
v0.1.0
Published
smartstock — CLI for the algofic SmartStock product (BUY / SWING / EXIT / FILING / portfolio).
Maintainers
Readme
smartstock
Command-line client for the SmartStock product at smartstock.algofic.com — pre-open NSE forecasts (BUY composite, SWING bands), live exit alerts, filing alerts, and per-user portfolio tracking.
Closed-source distribution — see LICENSE.
Install
npm install -g @deemwario/algofic-smart-stock
# verify
smartstock --helpRequires Node.js ≥ 18.
First-time login
smartstock loginBrowser-redirect flow — opens the SmartStock login page in your default
browser, you sign in with your account, the CLI receives the session
token via a one-shot loopback callback on 127.0.0.1:18001, then
saves it to ~/.config/stock-core/smartstock_token.json (chmod 600).
Re-run smartstock login when the token expires (~24h).
Commands
smartstock morning # SPY overlay + top-10 BUY + widest SWING + exits + filings
smartstock buy # BUY composite picks (h10 + h20)
smartstock swing [TICKER] # all SWING bands, or filter to one ticker
smartstock swings # today's highest-expected-swing names
smartstock exits # today's active exit alerts
smartstock filings # reactive + predictive filing alerts
smartstock watch # poll the morning brief every 30s, print diffs
smartstock gather # snapshot every product endpoint to JSON
smartstock gather --include-public --out ./snap-2026-06-05gather writes one JSON file per endpoint plus a _meta.json run
summary — useful for one-shot snapshots and for feeding the data into
downstream tooling (pandas, jq, your own scripts).
Portfolio
smartstock portfolio # list positions
smartstock portfolio add TCS 250000 # 2.5L position
smartstock portfolio add TCS 250000 --cost 3450.50 # with cost basis
smartstock portfolio add TCS 250000 --notes "core" # free-form notes
smartstock portfolio remove TCS # close out
smartstock portfolio metrics --window 30 # realized return / win rate / alpha
smartstock portfolio history # event + trade logAdmin (admin accounts only)
smartstock admin users
smartstock admin user create [email protected]
smartstock admin user create [email protected] --name Bob --admin
smartstock admin user reset [email protected]
smartstock admin user deactivate [email protected]
smartstock admin user sessions [email protected]
smartstock admin user logout [email protected]Non-admin callers get a clear 403 (forbidden — admin-only?).
Password prompts read silently from the TTY; set
SMARTSTOCK_ADMIN_PASSWORD for non-interactive flows.
Environment
| Variable | Default | Purpose |
|--------------------------------|--------------------------------------|-----------------------------------------------|
| SMARTSTOCK_HOST | https://apismartstock.algofic.com | Backend API base URL (override for dev) |
| SMARTSTOCK_ADMIN_PASSWORD | — | Skip the admin-password prompt |
Token storage
~/.config/stock-core/ drwx------
~/.config/stock-core/smartstock_token.json -rw-------Tokens are never echoed to stdout — only the username is printed after a successful login.
Support
Issues, billing, account requests: [email protected]
