Skip to main content

Five Grok Bots paper-trade only after a Telegram code; no order is placed without it

GitHubGitHubitayoliv2026-11-30

ResearchSource read in fullRead first
GitHubGitHubitayoliv2026-11-30

Open original

Overview

Someone who wants a one-person paper-trading research team can install five Grok Bots and a code-enforced Alpaca paper order gate that sends a confirmation code to Telegram, which the Bots never see.

Workflow

  1. What it is: A one-person paper-trading research team that runs in Grok Bot, with five Bots and a Node server whose rules live in code rather than in prompts. The README says the owner is the portfolio manager, and that none of the Bots can place a trade without a confirmation code that only reaches the owner's phone. The five Bots are Manager (chief of staff, the Bot the owner talks to, runs the pipeline), Research (fundamentals, SEC filings, news), Red (red team, tries to break the thesis and scores it), Steffi (technical analysis: levels, trend, stop, entry timing), and Strategist (deterministic backtests). brain/ is an Obsidian vault used as the fund's memory. The README tells the reader to treat it as a research system, not a trading system, and says it is not investment advice.
  2. Grok Bot parts used: Five Bots, five private skills, a custom command connector named hedgefund, secret cards, custom approval rules, and scheduled plus webhook Routines. The skills, already read, are skills/manager/SKILL.md, skills/research/SKILL.md, skills/red/SKILL.md, skills/steffi-technicals/SKILL.md, and skills/strategist/SKILL.md. Manager coordinates the pipeline and the three Manager-owned routines in docs/routines.md. There is no x.ai/bot/... template link. Not part of Grok Bot: the Node server under server/, the Alpaca paper API at paper-api.alpaca.markets, the Telegram bot that delivers the confirmation code, TradingView alerts and tradingview/alert-template.pine, the Obsidian vault and the Obsidian Git plugin, Cursor's local .cursor/mcp.json, and the 28 unit tests under server/test.
  3. You need: A Grok Bot account, an Alpaca paper account, and a Telegram account. The repo should be pushed to GitHub as a private repository, because the brain holds research and the trade journal. An ignored .env can hold secrets if the connector cannot pass environment variables. TradingView and Obsidian with Obsidian Git are optional. The README says to edit brain/00-thesis/fund-thesis.md first, because every Bot reads those rules; that file is in the file list but was not extracted into the fetched original, so its contents are not described here.
  4. Install: Follow docs/grokbot-setup.md in order. Each of the author's steps ends with something to check.
    • Step 1: Get Alpaca paper keys from a Paper Trading account. The server only ever calls paper-api.alpaca.markets. For Telegram, message @BotFather, send /newbot, write once to the new bot, then read chat.id from the getUpdates URL in the setup doc.
    • Step 2: Push the repo to a private GitHub remote. .gitignore already keeps .env, node_modules, dist, and the order state out of the repo. The setup doc shows a local Windows path in the author's notes; use your own clone.
    • Step 3: In Grok Bot, create a Bot named Manager and send this first message (replace the repo URL with your fork):

You are the chief of staff of my one-person hedge fund. Clone https://github.com/<you>/Hedgefund into your home directory, then run npm ci && npm run build inside the server folder. Tell me the absolute path of server/dist/index.js when you are done.

  • Step 4: Add a custom connector named hedgefund, type Command, command node, arguments the absolute path from step 3. Ask Manager to run diagnostics. At this point alpacaBaseUrl should read https://paper-api.alpaca.markets, and missingSecrets should still list all four names.
  • Step 5: Give the four secrets with secret cards, never by pasting a key into the chat:

I need to give the hedgefund server four secrets: ALPACA_KEY_ID, ALPACA_SECRET_KEY, TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID. Send me a secure secret card for each one, and make sure the server process receives them as environment variables.

If the connector cannot pass environment variables, the fallback is server/.env, filled through secret cards. Diagnostics should then show ready true and missingSecrets empty. Calling portfolio should show paper cash and equity.

  • Step 6: Ask Manager to install the five SKILL.md files under skills/ as private skills for all Bots.
  • Step 7: Create Research, Red, Steffi, and Strategist, and give each its job in the first message, including the instruction to use its skill and never to invent indicator or backtest numbers. Keep Red as a separate Bot so it can build its own memory and is prompted to disagree.
  • Step 8: In Settings, then Bot, then Custom rules, set place a trading order and submit an order to Alpaca to Ask first. The setup doc calls this a second layer; the real gate is the confirmation code in the server, which cannot be talked around.
  • Step 9: The setup doc then gives the reader a first end-to-end test on NVDA (a 1-share limit 5 percent below the market, a wrong-code refusal, then cancel the paper order). That is a reader procedure, not a saved author run. Add routines only after the pipeline has worked by hand once, as in docs/routines.md. Limits and the universe change only in server/src/config.ts, by a commit and a rebuild, never in chat.
  1. After install: Manager runs the pipeline and stops at a decision memo; an order needs the owner's Telegram code.
    • Manager starts from the fund thesis, prior ticker notes, and 70-lessons. Research builds a brief, Red scores the attack out of 10 (below 6 the idea stops), Steffi runs only if it survived Red, then a one-page memo is filed. If the owner says to proceed, propose_order sends a 6-digit code to the owner's phone. The Bot never sees it. place_order needs that code. Three wrong attempts lock the proposal; if no code is sent, it expires, which the skill treats as normal.
    • docs/routines.md has paste-ready prompts for a weekday 10 PM scan (at most three names; if nothing qualifies, say so in one line and stop), a Saturday backtest review, a Sunday review of decisions 2, 4, or 8 weeks old, and an optional TradingView webhook treated as untrusted input that never places an order. Schedules follow the time zone in Settings, under Bot.
    • All Bots share one cloud computer and can read these keys and notes. The setup doc says to use paper keys only.
  2. Did the author run it: The repository has no run records from the author. The brain folders in the file list are empty placeholders (.gitkeep). There is no filled thesis, research note, decision memo, or trade journal in the fetched extract. The README's 28 unit tests and smoke handshake are tests, not a paper-trading log. The NVDA walk-through is a reader test. The routines doc suggests two to four weeks on paper, with a handful of tickers, judging the process rather than profit and loss, before widening the universe or raising caps.

Key points and results

  • Maturity: At fetch time on 2026-12-01 the repo was created at 2026-11-29T21:50:11Z, last pushed at 2026-11-30T20:19:29Z, with 2 commits, 0 stars, 0 forks, 0 open issues or PRs, and no license in the GitHub API facts. The README labels it paper trading only and not investment advice. plugin.json, mcp.json, config.ts, .env.example, fund-thesis.md, and the Pine file are in the file list but were not extracted into the fetched original.
  • Permissions and boundaries: A model can propose an order; it cannot approve one. The 6-digit code goes to Telegram and is never returned to the model. The only Alpaca endpoint in the project is paper-api.alpaca.markets; the README says the live one does not appear anywhere. Hard caps are checked when an order is proposed and again before it is sent, and they cannot be widened in chat. Custom rules add a second Ask-first layer. A brain note without a dated source is refused. Secrets should go through secret cards, not chat.
  • Known limits: This is paper trading only, and backtests over one symbol and one period are not evidence; the backtest tool says so in its own output. All Bots share one cloud computer and can read the keys and the brain. EDGAR may need SEC_USER_AGENT set to a real contact address. A name outside the fund universe is refused until it is added in config.ts. The routines doc says to keep the universe narrow, cap each routine, and not leave hourly routines running while still tuning them.
  • Worth borrowing: Send a confirmation code to a channel the model cannot read, and refuse, expire, or lock the proposal instead of letting the Bot guess. See docs/grokbot-setup.md and the order-gate description in the README.
  • Worth borrowing: Keep numeric limits and the tradable universe in server/src/config.ts so they change only by a commit, never by a chat request. See the README section Changing the rules.
  • Worth borrowing: Keep Red as a separate Bot that is prompted to disagree, stop the idea when its score is below 6, and on the weekend score old decisions against what the price actually did. See docs/grokbot-setup.md, skills/manager/SKILL.md, and docs/routines.md.

Source

Platform
GitHub
Author
itayoliv
Published
Categories
Research

What this evidence label means

Source read in full

We read the source (post, article or transcript). That only means the original was read. It does not mean this site reproduced the author's results.

Read the editorial and evidence policy

Other cases in this scenario

This unofficial community project is independent of xAI. xAI has neither approved nor endorsed it. No sign-up. The methods and figures come from the original authors.