[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81844":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},81844,"schwab-cli","pashpashpash\u002Fschwab-cli","pashpashpash","agent first cli with full schwab api parity",null,"Rust",27,4,26,0,1,42.7,"MIT License",false,"main",true,[],"2026-06-12 04:01:35","# schwab-cli\n\n`schwab-cli` is an agent-first Rust CLI for the Schwab Trader API. It is built for LLMs, shell scripts, and humans who prefer composable tools: JSON to stdout, diagnostics to stderr, useful `--help`, explicit safety rails around live trading, and an `--agent` mode for compact machine-readable envelopes.\n\nIt covers OAuth, account numbers, balances, positions, transactions, orders, order preview\u002Fplace\u002Freplace\u002Fcancel, market quotes, option chains, price history, movers, market hours, instruments, streamer metadata\u002Flistening, snapshots, and generic REST escape hatches.\n\nThis project is not affiliated with or endorsed by Charles Schwab.\n\n## Install\n\nThe simple path installs the latest GitHub release into `~\u002Fbin\u002Fschwab-cli`:\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fpashpashpash\u002Fschwab-cli\u002Fmain\u002Finstall.sh | sh\n```\n\nMake sure `~\u002Fbin` is on your `PATH`, then verify:\n\n```bash\nschwab-cli version\nschwab-cli doctor\n```\n\nFrom source:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fpashpashpash\u002Fschwab-cli.git\ncd schwab-cli\ncargo install --path .\n```\n\nUpdate an existing install from the latest GitHub release:\n\n```bash\nschwab-cli update\n```\n\nFor nonstandard installs:\n\n```bash\nschwab-cli update --bin \u002Fpath\u002Fto\u002Fschwab-cli\n```\n\n## Auth\n\nCreate a Schwab developer app, then configure the CLI with its client ID, client secret, and callback URL:\n\n```bash\nschwab-cli setup \\\n  --client-id '\u003Cclient id>' \\\n  --client-secret '\u003Cclient secret>' \\\n  --callback-url https:\u002F\u002F127.0.0.1:8182\u002Fcallback\n```\n\nConnect the app to your actual Schwab account through OAuth:\n\n```bash\nschwab-cli auth login --open\nschwab-cli account-numbers\n```\n\nSchwab refresh tokens are short-lived. API commands refresh automatically while the refresh token is still valid. On macOS, install a daily launchd refresher:\n\n```bash\nschwab-cli auth keepalive install --bin \"$HOME\u002Fbin\u002Fschwab-cli\"\n```\n\n## Local Files\n\nSecrets and snapshots live outside the repo by default:\n\n```text\n~\u002F.config\u002Fschwab-cli\u002Fapp.json\n~\u002F.config\u002Fschwab-cli\u002Ftoken.json\n~\u002F.config\u002Fschwab-cli\u002Faccounts.json\n~\u002F.local\u002Fshare\u002Fschwab-cli\u002F\n```\n\nOverrides:\n\n```bash\nexport SCHWAB_CLI_CONFIG_DIR=\u002Fsecure\u002Fpath\u002Fschwab-cli\nexport SCHWAB_CLI_DATA_DIR=\u002Fdata\u002Fpath\u002Fschwab-cli\n```\n\nNever commit real app credentials, OAuth tokens, account maps, order files, snapshots, or exported brokerage data.\n\n## Examples\n\n```bash\nschwab-cli account-numbers\nschwab-cli accounts list --positions\nschwab-cli cash status --account individual\nschwab-cli transactions list --account individual --start 2026-05-01 --end 2026-05-21\nschwab-cli orders preview --account individual --json-file order.json\nschwab-cli market quotes --symbols AAPL,GOOGL,LLY\nschwab-cli market price-history --symbol AAPL --period-type year --period 1 --frequency-type daily --frequency 1\nschwab-cli streamer fields --service LEVELONE_EQUITIES\nschwab-cli streamer listen --service LEVELONE_EQUITIES --keys AAPL,MSFT --jsonl\nschwab-cli snapshot --include-orders --include-transactions --quotes AAPL,GOOGL,LLY\n```\n\nGeneric escape hatch:\n\n```bash\nschwab-cli get --base trader --path \u002Faccounts --param fields=positions\nschwab-cli get --base market --path \u002Fquotes --param symbols=AAPL,MSFT\nschwab-cli post --base trader --path \u002Faccounts\u002F{account}\u002FpreviewOrder --body-file order.json\n```\n\n## Live Trading Safety\n\nOrder previews are easy and encouraged:\n\n```bash\nschwab-cli orders preview --account individual --json-file order.json\n```\n\nLive order mutations require both an environment variable and an explicit flag:\n\n```bash\nSCHWAB_CLI_ALLOW_LIVE_TRADING=1 \\\n  schwab-cli orders place --account individual --json-file order.json --yes-live-order\n```\n\nThe same guard applies to replace\u002Fcancel and generic order mutation endpoints.\n\n## API Boundaries\n\nSchwab OAuth exposes only accounts Schwab offers during consent. Some workplace retirement-plan, banking, fixed-income, or other Schwab surfaces may be visible on Schwab web but absent from the Trader API.\n\nDirect Treasury auction, CD, bond ladder, or fixed-income order-entry workflows may require Schwab web even when positions or instruments are visible through API data endpoints.\n\n## Generated Schwab Docs\n\n`docs\u002Fschwab-api\u002F` contains generated reference material extracted from locally saved Schwab Developer Portal pages. It is included for development convenience, is not official Schwab documentation, and may be stale. Review Schwab's developer terms before redistributing those generated files.\n\n## Development\n\n```bash\ncargo fmt --check\ncargo test --locked\ncargo run -- version\n```\n\nPushes to `main` run CI and rebuild the mutable `latest` GitHub release. Pushing a `v*` tag creates a tagged release.\n\n## License\n\nCode is MIT licensed. Generated Schwab reference docs are third-party-derived reference material and are not official Schwab documentation.\n","`schwab-cli` 是一个用 Rust 编写的面向代理的命令行工具，提供了与 Schwab 交易 API 完全一致的功能。其核心功能包括账户管理、订单操作、市场数据查询等，并支持 JSON 输出和机器可读模式，适用于需要自动化或脚本化的交易场景。该工具设计有明确的安全机制以保护实时交易安全，同时提供便捷的安装、更新及认证流程。适合于开发人员、系统管理员以及希望通过脚本化方式管理投资组合的专业人士使用。",2,"2026-06-11 04:06:54","CREATED_QUERY"]