YZXBiz/copytrading
YZXBiz/copytrading has 104 GitHub stars and 0 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-18 04:05 UTC. Last push 2026-11-14.
What you can do
- Posts become exact orders. A model you choose reads each post, and every ticker, price, and fraction must appear in the post itself, so it cannot invent a number.
- Your limits, per account. Daily loss, per-order, per-symbol, and total exposure limits are checked before every copied buy. Each account has its own Start Copying and Stop Copying.
- Many traders, many accounts. Each account follows one guru and sizes its calls from that guru's full position, so several gurus copy side by side into their own accounts, paper and live together.
- Every position traces to its post. Each copied buy is kept as a lot that names the post behind it, and you can sell any lot on its own. Shares you trade yourself in Alpaca are counted as yours on the next sync.
Measured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
Local-first macOS app that copies Discord trading signals into Alpaca accounts, with a risk-limited engine, an AI assistant, and English or 简体中文. Developer preview.
AIREADME.md
Original
CopyTrading
Copy the traders you trust, inside limits you set.
Not financial advice. CopyTrading is software, not an adviser. Trading can lose money, and you are responsible for every order it places.
CopyTrading is a macOS app that reads the stock calls traders post on Discord, turns each one into an exact order, checks it against your limits, and places it with your Alpaca account. Everything runs on your Mac.
[!WARNING] Not financial advice. Nothing in this project, including the app, its assistant, and the traders it copies, is investment, financial, legal, or tax advice, and nobody here recommends any trade. Trading can lose some or all of your money. You alone choose whom to copy and what limits to set, and you are responsible for every order placed in your accounts. The software is provided as is, without warranty (MIT license).
Developer preview. CopyTrading has not been qualified for live trading. Start with an Alpaca paper account, and see validation for what has and has not been proven.
More screenshots
![]() |
![]() |
| A guru: what copying them has made | Activity: every post and what came of it |
![]() |
![]() |
| Gurus: compared side by side | Connections: set up top to bottom |
Features
- Posts become exact orders. A model you choose reads each post, and every ticker, price, and fraction must appear in the post itself, so it cannot invent a number.
- Your limits, per account. Daily loss, per-order, per-symbol, and total exposure limits are checked before every copied buy. Each account has its own Start Copying and Stop Copying.
- Many traders, many accounts. Each account follows one guru and sizes its calls from that guru's full position, so several gurus copy side by side into their own accounts, paper and live together.
- Every position traces to its post. Each copied buy is kept as a lot that names the post behind it, and you can sell any lot on its own. Shares you trade yourself in Alpaca are counted as yours on the next sync.
- See how a guru is doing. Each guru's page shows the realized profit of the trades copied from them, their win rate, and their best and worst call; with several gurus, Gurus compares them side by side.
- A page for each stock. Press any ticker to see its daily candles with volume and moving averages, your lots in it, and the guru's calls on it, and sell from there.
- Follow the guru's stops, if you choose. Off by default; when on, a stop the guru posts becomes a stop order for the shares CopyTrading bought.
- Always live. Balances, positions, and the balance chart are read from your broker even while copying is paused, held prices update every few seconds, and a fill arrives as a notice in the app. The menu bar shows your balance and today's change.
- Calls that need you, in one place. A call the app should not place on its own (a suggestion, a conditional order, a sell of a buy it never made) waits on the account page with Copy and Skip, or Skip all.
- Fast to get around. ⌘K finds any page, account, guru, post, or action; ⌘1 to ⌘4 open Accounts, Gurus, Activity, and Connections; ⌘, opens Settings. Dark and light themes, one consistent icon set, and motion that settles quickly: figures roll to new values, selections slide, and charts draw in once.
- An assistant that cannot trade on its own. ⌘J answers from your real posts and accounts. Anything that could place an order waits for your approval in the app.
- Private by design. Keys are encrypted on your Mac with a key kept in your login Keychain and never shown on screen. The app talks to Discord, your model provider, your broker, GitHub when it checks for updates, and a logo service that is sent only the tickers you hold.
Works with a dozen hosted model services, local models through Ollama, or any OpenAI-compatible address.
Install
You need an Apple silicon Mac running macOS 26 or later.
- Download CopyTrading for macOS.
- Open the DMG and drag CopyTrading into Applications.
- Open CopyTrading. Preview builds are not yet notarized by Apple, so the first time macOS blocks it: go to System Settings → Privacy & Security and choose Open Anyway. You only do this once.
Every release lists SHA-256 checksums, and releases explains how to verify a download.
Coming from an earlier version? 0.1.0-beta.7 offers the new app as an update. On its first launch the new app copies your saved keys from the old app once, so macOS asks whether CopyTrading may read them; choose Always Allow. Your setup, accounts, and history carry over unchanged, and copying picks up where it was.
Updates. The app checks GitHub for a new version after launch and every six hours, and Check for Updates… in the app menu checks at once. Preview builds are not signed with a lasting identity, so macOS will not let an installed copy replace itself: the app tells you when a version is out and opens its release page, and the new DMG replaces the app in Applications.
Or build from source with uv, Node.js, and the Xcode Command Line Tools:
git clone https://github.com/YZXBiz/copytrading.git
cd copytrading
make app
make app checks your Mac, downloads a pinned and checksummed runtime, builds the app, and opens it. The first build takes a few minutes.
Get started
A first launch opens on Getting Started, a short checklist that leads to each next step. Nothing is saved or traded until you press Start Copying.
Everything is set up in Settings → Connections, top to bottom:
- Discord: the channels to read and your Discord token.
- Interpreter: the model that reads posts, and its API key.
- Broker accounts: an Alpaca paper account.
- Gurus: choose the account each guru copies into (its max per stock is the guru's full position), press Learn from Channel, and review the playbook it drafts.
- Press Start Copying. It checks every connection first, and starts only when they all pass.
Every field that needs a key or an ID has a Where do I find this? link. Once setup is done, the sidebar keeps to what you use every day: your accounts, your gurus, and Activity.
How it works
View the full-resolution diagram
A desktop app (Electron and React) supervises one local Python engine. The engine owns every decision, keeps it in SQLite, and reconciles with the broker after a crash or sleep, so a signal that expires while the app is closed never becomes a late order. Every action that moves money asks in a native macOS dialog that says exactly what will happen. Architecture has the details and the ADRs record why.
Command line and agents
The copytrading CLI and MCP server let you, a script, or a coding agent read the running app and pause it, and the CLI sets it up. Anything that could trade becomes a proposal you approve in the app. copytrading accounts limits ACCOUNT --max-order-usd 300 … changes an account's limits and copytrading start starts copying with Start Copying's own checks; both wait for your approval in the app. Turn it on in Settings → Agent Access, then put a small launcher for the command that ships inside the app on your PATH:
mkdir -p ~/.local/bin
cat > ~/.local/bin/copytrading <<'EOF'
#!/bin/sh
app=/Applications/CopyTrading.app/Contents/Resources
PYTHONPATH="$app/Engine/src" exec "$app/Runtime/cpython/python/bin/python3" -m copytrading_engine.control "$@"
EOF
chmod +x ~/.local/bin/copytrading
$ copytrading status
Engine running
Copying Copying
Source connected
Model ready
Queued 0 messages, 0 signals
Account primary Copying, after a restart automatic
$ copytrading accounts limits primary --max-order-usd 300
Waiting for approval in CopyTrading: change primary: max order usd = 300. Proposal p-4e1a9c07d2b3, expires 2026-10-14 16:42:00.
$ copytrading start
Waiting for approval in CopyTrading: start copying. Proposal p-81f0c6a95e24, expires 2026-10-14 16:43:10.
copytrading setup sets everything up without the window: Discord, the model, Alpaca accounts with their keys and limits, gurus, and alerts. Edits go into the same unsaved setup Connections shows. setup apply runs Start Copying's checks and saves; copying that runs picks up the change, and copying you paused stays paused. setup apply --start also starts copying, so a first setup needs no window. Keys are read only from standard input or a file and are never printed. To use it, choose Read, pause, and ask for approval in Agent Access and turn on Allow setup changes from the command line there (off by default). A paper setup applies directly; making an account live, saving keys for one, or starting copying into one waits for your approval in the app.
$ copytrading setup discord --channels 1517000000000009742 --secret-stdin < discord-token.txt
$ copytrading setup model --service deepseek --model deepseek-flash --from-file deepseek-key.txt
$ copytrading setup account add paper-2 --from-file alpaca-paper-2.txt --max-order-usd 250 # key ID, then secret
$ copytrading setup guru add Alex --account paper-2 --full-position 600
$ copytrading setup apply --start
Applied: the setup is saved, and copying uses it.
Saved, and copying started.
ok discord
ok model
ok paper-2
See agent control for the commands, permission tiers, and threat model.
The engine also runs without the app, on a Mac or a Linux server, so copying continues while your Mac sleeps. copytrading-server reads a copytrading.toml file and keys from environment variables, and a Docker image is included. See Run the engine without the app.
Documentation
| PRD | Who CopyTrading is for and what it must do |
| Architecture · Engine structure · ADRs | How the pieces fit, and why |
| Desktop app | How the app is built: screens, engine reads and actions, fixtures, captures |
| Agent control · Server | The copytrading CLI and MCP server, and running the engine without the app |
| Acceptance · Validation | What "working" means, and the evidence so far |
| Operations · Releases | Developer commands and preview builds |
| Changelog | What changed in each release |
Contributing
Run make doctor to check your Mac, then make check for the engine's 2,000+ tests, Ruff, and Ty, and npm test in desktop/ for the app's 600+ tests. CONTRIBUTING.md covers the conventions. Ask questions in Discussions, report bugs with the issue forms, and report vulnerabilities privately as described in SECURITY.md.




