Polymarket-style prediction market Telegram bot for Robinhood Chain. Browse markets, place bets with your wallet, track portfolio, and unlock the AI Auto-Trader with Premium.
Built with grammY + viem, connected to HoodPredict smart contracts on Robinhood Chain testnet.
- Browse 24+ prediction markets (Stock Tokens, Sports, Crypto, Politics, Entertainment)
- Live on-chain odds & volume from Robinhood Chain
- Place Yes/No and multi-outcome bets with USDC
- Portfolio & active bets tracking
- Market search & category filters
- Resolution notifications
- AI Auto-Trader — Grok scans markets, suggests trades, executes with approval
- Custom rules (max bet, min probability, categories, auto mode)
- Performance dashboard (win rate, P&L)
- Advanced AI probability forecasts
- 7-day free trial
- Message @BotFather
/newbot→ name it HoodPredict → username@HoodPredictBot- Copy the token
cd hoodpredict-bot
npm install
cp .env.example .envEdit .env with your TELEGRAM_BOT_TOKEN and XAI_API_KEY.
npm run devnpm run build
npm start| Command | Description |
|---|---|
/start |
Welcome + main menu |
/markets |
Browse prediction markets |
/mybets |
Active bets |
/portfolio |
Portfolio summary & P&L |
/create |
Create a new market |
/premium |
Upgrade + 7-day trial |
/ai |
AI Auto-Trader (Premium) |
/wallet 0x… |
Link Robinhood Chain wallet |
/verify 0x… |
Verify wallet signature |
/confirm m1 0x… |
Confirm on-chain bet tx |
/search Lakers |
Search markets |
- Browse →
/markets→ pick category → select market - Bet → choose outcome → pick amount ($10–$250)
- Sign → open HoodPredict web app, connect wallet, approve USDC + bet
- Confirm →
/confirm <marketId> <txHash>
Private keys are never stored on the server. All signing happens in your wallet.
- Only public addresses are stored after signature verification
- Users sign a one-time verification message (no gas)
- Bets require explicit wallet approval via HoodPredict web / WalletConnect
- Strong disclaimers on every financial action
Defaults to testnet (chain ID 46630):
| Contract | Address |
|---|---|
| Factory | 0xC477cAa2e42B88D16A95d4b80990CbD527177b1d |
| USDC | 0xa2d35f0694aEDF76ED7CDa9eD18559BcA9a173DD |
| Oracle | 0x5E6944bc3e1A7d9445F90b92C5D2aEC0196D6c65 |
24 markets deployed — see src/data/deployments.json.
Powered by xAI Grok (grok-4.5). Configure rules via /ai:
max 50 → max $50 per trade
prob 70 → only markets above 70% probability
auto on → autonomous mode (within limits)
auto off → suggest & approve mode
| Plan | Price | Features |
|---|---|---|
| Free | $0 | Browse, bet, portfolio |
| Premium Monthly | $9.99 | AI trader, forecasts, alerts |
| Premium Yearly | $89 | Same, save 26% |
| Trial | 7 days | Full Premium, no card |
After Stripe payment, admin runs:
/grant <telegram_user_id> 30
Users who reset Telegram or switch accounts:
/recover
3-step wizard: link wallet → sign verify message → see on-chain USDC + positions.
Private keys are never stored — seed phrase recovery is via MetaMask/Rabby only.
- Open @BotFather
/newbot→ name:HoodPredict→ username:HoodPredictBot- Copy token → paste into
.envasTELEGRAM_BOT_TOKEN - Optional:
/setdescription,/setabouttext,/setuserpicfor branding /setcommands— paste:
start - Main menu
markets - Browse prediction markets
mybets - My active bets
portfolio - Portfolio summary
create - Create a market
premium - Upgrade to Premium
ai - AI Auto-Trader
wallet - Link wallet
recover - Re-link after Telegram reset
search - Search markets
help - Help
cp .env.example .envMinimum required:
TELEGRAM_BOT_TOKEN=<from BotFather>
BOT_USERNAME=HoodPredictBot
XAI_API_KEY=<from console.x.ai>
ADMIN_USER_ID=<your Telegram numeric ID>Get your Telegram ID: message @userinfobot.
npm install
npm run devOpen Telegram → search your bot → /start. Confirm markets load and /recover works.
- Push
hoodpredict-botto GitHub - railway.app → New Project → Deploy from GitHub
- Select the repo
- Variables tab → add all
.envvalues - Settings → add volume mount:
/app/data(persists SQLite DB) - Deploy — start command is
npm start(fromrailway.toml)
Bot uses long polling — no webhook URL needed. Railway keeps the process running 24/7.
/startresponds within 2s/markets→ sports category loads/wallet 0x…→ verification message appears/recover→ wizard shows- Check Railway logs for
HoodPredict Bot starting…
- Create Stripe Payment Links ($9.99/mo, $89/yr)
- Set
STRIPE_MONTHLY_LINKandSTRIPE_YEARLY_LINK - After payment, run
/grant <user_telegram_id> 30from your admin account
- New project → deploy from GitHub
- Set env vars from
.env.example - Start command:
npm start - Enable persistent volume for
data/(SQLite)
npm install && npm run build
pm2 start dist/index.js --name hoodpredict-botTelegram bots need a long-running process — use Railway/Fly.io/VPS instead of Vercel serverless. Vercel is fine for the HoodPredict web app only.
For production, migrate from SQLite to Supabase PostgreSQL:
- Create project at supabase.com
- Run
src/db/schema.tsSQL in the SQL editor (adapt types for Postgres) - Set
SUPABASE_URLandSUPABASE_SERVICE_KEY
hoodpredict-bot/
├── src/
│ ├── index.ts # Entry point
│ ├── bot.ts # grammY setup + jobs
│ ├── config.ts # Environment
│ ├── handlers/ # Commands & callbacks
│ ├── chain/ # viem + contracts
│ ├── ai/ # Grok auto-trader
│ ├── db/ # SQLite persistence
│ ├── data/ # Markets + ABIs + deployments
│ ├── keyboards/ # Telegram UI
│ └── formatters/ # Message formatting
├── .env.example
└── README.md
- HoodPredict Web:
/Users/xace56/hoodpredict— Next.js frontend + contracts - TradePulse Bot:
/Users/xace56/tradepulse-bot— AI crypto signals bot
MIT