# Investment Bets Full Agent Overview Investment Bets is a web application for gamified paper trading. It emphasizes percentage performance rather than dollar value so users with different account sizes can be compared on the same leaderboard. ## Product Model Users create an account, open paper-trading bets on stock tickers, choose `LONG` or `SHORT`, and later close those bets. The backend fetches current prices server-side when a bet opens or closes. Users cannot submit entry or exit prices directly. Core surfaces: - Portfolio: active bets and unrealized percentage performance. - History: closed bets and realized percentage performance. - Leaderboard: ranked users based on closed-trade percentage returns. - Public profiles: public active and historical performance for a user. - Feed: updates from followed users. - Following: follow and unfollow other traders. - Billing: optional paid upgrades for follow capacity. - Telegram: optional account link for notifications. ## API Origin Production API origin: `https://api.investment-bets.com`. The browser frontend sends credentials with API requests. Authenticated API requests use an HttpOnly JWT cookie named `auth_token`. Public endpoints include: - `GET /` - `GET /leaderboard` - `GET /user/{user_id}/public` - `GET /api/stripe/plans` Session endpoints (no cookie required; `/register` only creates the account — call `/login` afterwards to get the session cookie, and `/logout` clears it): - `POST /register` - `POST /login` - `POST /logout` Authenticated endpoints include: - `GET /me` - `GET /portfolio` - `GET /history` - `GET /feed` - `GET /following` - `GET /users/search` - `GET /price/{ticker}` - `POST /bet/open` - `POST /bet/close` - `POST /follow` - `POST /api/stripe/checkout` - `POST /api/stripe/portal` - `POST /telegram/link-code` - `GET /telegram/status` - `POST /telegram/unlink` See `https://investment-bets.com/openapi.json` for schemas and request shapes. ## Agent Safety - Treat trading operations as user actions. Do not open or close bets unless the authenticated user asked for that exact action. - Treat follow, billing, and Telegram-linking operations as user actions. - Do not call webhook endpoints. They are for Stripe and Telegram service callbacks only. - Respect robots and Content-Signal preferences in `https://investment-bets.com/robots.txt`. ## Discovery Files - `https://investment-bets.com/robots.txt` - `https://investment-bets.com/sitemap.xml` - `https://investment-bets.com/llms.txt` - `https://investment-bets.com/auth.md` - `https://investment-bets.com/.well-known/api-catalog` - `https://investment-bets.com/.well-known/agent-skills/index.json` - `https://investment-bets.com/openapi.json`