[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81410":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":15,"stars90d":16,"forks30d":16,"starsTrendScore":14,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},81410,"opentradex","deonmenezes\u002Fopentradex","deonmenezes","OpenTradex — open-source AI-driven trading cockpit (12 markets, paper-first, your keys stay local). Moved from github.com\u002Fdeonmenezes\u002Fopentradex on 2026-05-04.","https:\u002F\u002Fdiscord.gg\u002FrFdwJC8z",null,"TypeScript",44,12,3,9,0,1,7,3.34,false,"main",true,[],"2026-06-12 02:04:14","\u003Cdiv align=\"center\">\n\n# OpenTradex\n\n**The open-source trading cockpit.**\nOne harness. Every market. Paper by default. Your keys, your rules.\n\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-3FB68B.svg?style=flat-square)](LICENSE)\n[![Node](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNode-%E2%89%A520-3FB68B?style=flat-square&logo=node.js&logoColor=white)](https:\u002F\u002Fnodejs.org)\n[![Electron](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FElectron-31-47848F?style=flat-square&logo=electron&logoColor=white)](https:\u002F\u002Fwww.electronjs.org)\n[![React](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FReact-18-61DAFB?style=flat-square&logo=react&logoColor=black)](https:\u002F\u002Freact.dev)\n[![Tailwind](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTailwind-3-38BDF8?style=flat-square&logo=tailwindcss&logoColor=white)](https:\u002F\u002Ftailwindcss.com)\n[![Platforms](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatforms-win%20%7C%20mac%20%7C%20linux%20%7C%20ios%20%7C%20android-8B97A8?style=flat-square)](#install)\n[![Status](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fstatus-paper--first-F59E0B?style=flat-square)](#trading-modes)\n\n![Dashboard Preview](docs\u002Fdashboard-preview.png)\n\n**[60-second Quickstart →](docs\u002Fquickstart.md)**\n\n\u003C\u002Fdiv>\n\n---\n\n## Why OpenTradex\n\nEvery serious trader ends up juggling ten tabs, three terminals, a TradingView chart,\na half-broken Polymarket script, and a Slack channel full of signals nobody has time to read.\n\n**OpenTradex is the command cockpit that replaces the tab sprawl.**\nA single dashboard that speaks to prediction markets, equities, crypto, and forex\nthrough one AI-driven harness — local-first, paper-by-default, and fully yours.\n\n```\n scan markets -> AI filters signal -> you approve trade -> paper fill -> review\n```\n\nNo SaaS. No account. No telemetry. Your API keys stay on your machine.\n\n---\n\n## Highlights\n\n| | |\n|---|---|\n| **12 connectors** | Polymarket · Kalshi · TradingView · Alpaca · IBKR · Binance · Coinbase · OANDA · MetaTrader 5 · Dukascopy · Robinhood · DraftKings |\n| **Houston-style cockpit** | Resizable 3-pane dark terminal inspired by pro trading desks |\n| **AI harness** | Bring your own model — Anthropic, Google, OpenAI-compatible, or local CLIs |\n| **Real-time wire** | Native WebSocket with SSE fallback for positions, trades, and news |\n| **Paper-first safety** | Live trading is gated behind a 24h lock + explicit mode flip |\n| **Ships everywhere** | npm CLI · Web dashboard · Electron desktop · iOS SwiftUI · Expo mobile |\n| **Your keys only** | All creds in `~\u002F.opentradex\u002Fconfig.json` — nothing leaves the machine |\n\n---\n\n## Install\n\n### One-line (CLI + gateway + web UI)\n\n```bash\nnpx opentradex onboard --paper-only && npx opentradex run\n```\n\n### Desktop (Windows \u002F macOS \u002F Linux)\n\nGrab the **signed installer** from [**Releases**](https:\u002F\u002Fgithub.com\u002Fdeonmenezes\u002Fopentradex\u002Freleases) —\nWindows builds are Authenticode-signed, macOS builds are Developer ID-signed and notarized,\nso no SmartScreen or Gatekeeper warnings on install.\n\nPrefer to build it yourself (unsigned dev build)?\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fdeonmenezes\u002Fopentradex.git\ncd opentradex\nnpm install\nnpm run build:all\nnpm run build:desktop:win   # or :mac \u002F :linux\n```\n\nInstaller lands in `packages\u002Fdesktop\u002Frelease\u002F`. Code-signing is automatically skipped\nwhen the env vars below are absent, so local dev builds always work.\n\n#### Signing env vars (release only)\n\nThe `.github\u002Fworkflows\u002Frelease.yml` pipeline picks these up on tag push (`git tag v1.0.0 && git push --tags`):\n\n| Variable | Purpose |\n|---|---|\n| `CSC_LINK` | Windows `.pfx` cert (path or base64) for Authenticode |\n| `CSC_KEY_PASSWORD` | Password for the `.pfx` |\n| `APPLE_ID` | Apple ID email for notarization |\n| `APPLE_APP_SPECIFIC_PASSWORD` | App-specific password from appleid.apple.com |\n| `APPLE_TEAM_ID` | 10-character Team ID from developer.apple.com |\n\nStore these as GitHub Actions secrets. They are never logged and never bundled into the installer.\n\n### Mobile\n\n```bash\n# iOS (SwiftUI, native)\nopen packages\u002Fios\u002FOpenTradex\u002FOpenTradex.xcodeproj\n\n# Android \u002F iOS (Expo)\ncd packages\u002Fmobile && npm install && npx expo start\n```\n\n---\n\n## Quickstart\n\n```bash\n# 1. First-time setup — pick your rails, set paper mode, drop in API keys\nopentradex onboard\n\n# 2. Boot the gateway (HTTP + WS on :3210)\nopentradex run\n\n# 3. Open the cockpit\nnpm run ui                  # web\nnpm run desktop             # Electron\n```\n\nThen tell it what to do:\n\n```\n> scan all markets and propose the best trade under $50 risk\n> close BTC-EOY-120K on kalshi\n> analyze \"Fed cut September\" news from reuters\n> panic\n```\n\n---\n\n## The Cockpit\n\n\u003Cdiv align=\"center\">\n\n```\n┌────────────────────────────────────────────────────────────────────────────────┐\n│  OPENTRADEX  Live  PAPER          PORTFOLIO $15,238   DAY +$184.27   [Run]▶   │\n├────────────────┬──────────────────────────────────────────┬───────────────────┤\n│ POSITIONS   2  │       What should we trade next?         │  Live feed   12  │\n│ BTC-EOY-120K   │                                          │  Reuters    14m   │\n│ FED-SEP-CUT    │   ⚡ Connector Audit                      │  Bloomberg  28m   │\n│                │   ⚡ Cross-Market Scan                    │  FT         45m   │\n│ MARKET SCANNER │   ⚡ TradingView Pass                     │  CNBC       33m   │\n│ FED-SEP 43¢    │                                          │  WSJ        48m   │\n│ BTC-EOY 38¢    │   COMMAND · _                            │  CoinDesk   62m   │\n└────────────────┴──────────────────────────────────────────┴───────────────────┘\n```\n\n\u003C\u002Fdiv>\n\n- **Left rail** — open positions, recent fills, live market scanner\n- **Center** — chat interface to the AI harness with quick-start missions\n- **Right rail** — unified news + social feed with `$TICKER` tagging\n- **Top bar** — capital, day P&L, run cycle, auto-loop cron (1\u002F2\u002F5\u002F10\u002F15\u002F30 min)\n- **Markets page** — the Houston-style **Connectors** grid with logos, status pills, and one-click `Connect`\n\n---\n\n## Connectors\n\n| Connector | Category | Type | Status |\n|---|---|---|---|\n| **Polymarket** | Prediction markets | USDC \u002F CLOB | Built-in |\n| **Kalshi** | Prediction markets | CFTC-regulated | Built-in |\n| **TradingView** | Charts & signals | Webhook + MCP bridge | Built-in |\n| **Alpaca** | Equities & options | Paper + live | Bring key |\n| **Interactive Brokers** | Equities & options | TWS API | Bring key |\n| **Binance** | Crypto | Spot + perp | Bring key |\n| **Coinbase** | Crypto | Advanced Trade | Bring key |\n| **OANDA** | Forex | 70+ pairs | Bring key |\n| **MetaTrader 5** | Forex | MT5 Python bridge | Beta |\n| **Dukascopy** | Forex | Tick-level JForex | Bring key |\n| **Robinhood** | Equities, options, crypto | Unofficial API | Beta |\n| **DraftKings** | Sportsbook | Odds feed | Bring key |\n\nWant to wire a new one? Drop a file into `src\u002Fmarkets\u002F\u003Cname>.ts` that exports `scan`, `quote`, and\n`send` — the harness auto-discovers it.\n\n---\n\n## AI Providers\n\nThe harness speaks to whichever model you already have:\n\n| Provider | Where it runs | File |\n|---|---|---|\n| Anthropic Claude | Cloud API | `src\u002Fai\u002Fproviders\u002Fanthropic.ts` |\n| Google Gemini | Cloud API | `src\u002Fai\u002Fproviders\u002Fgoogle.ts` |\n| OpenAI-compatible | OpenAI, Groq, OpenRouter, Ollama, LM Studio | `src\u002Fai\u002Fproviders\u002Fopenai-compatible.ts` |\n| Claude CLI | Local (Claude Code) | `src\u002Fai\u002Fproviders\u002Fclaude-cli.ts` |\n| OpenCode CLI | Local | `src\u002Fai\u002Fproviders\u002Fopencode-cli.ts` |\n\nConfigure in `~\u002F.opentradex\u002Fconfig.json`:\n\n```jsonc\n{\n  \"ai\": {\n    \"provider\": \"anthropic\",\n    \"model\":    \"claude-opus-4-7\",\n    \"apiKey\":   \"sk-ant-...\"\n  }\n}\n```\n\n---\n\n## Monorepo map\n\n```\nopentradex\u002F\n├── src\u002F                        # The harness — the thing that actually trades\n│   ├── agent\u002F                  # scanner, executor, risk, runner, logger\n│   ├── ai\u002F                     # provider registry + adapters\n│   ├── markets\u002F                # per-exchange connectors\n│   ├── gateway\u002F                # HTTP + WebSocket + SSE server (:3210)\n│   ├── mcp\u002F                    # MCP bridge for TradingView etc.\n│   ├── risk.ts                 # Kelly sizing, daily-loss caps, kill switches\n│   ├── config.ts               # Config + mode lock\n│   ├── onboard.ts              # Interactive setup wizard\n│   └── bin\u002Fcli.ts              # `opentradex` CLI entry\n│\n├── packages\u002F\n│   ├── dashboard\u002F              # React + Vite + Tailwind cockpit\n│   │   └── src\u002Fcomponents\u002F     #   TopBar · LeftSidebar · ChatCockpit · RightSidebar\n│   │       ConnectorLogo.tsx   #   Branded SVG marks for all 12 rails\n│   │\n│   ├── desktop\u002F                # Electron shell (Windows \u002F macOS \u002F Linux)\n│   │   ├── src\u002Fmain.ts         #   Boots gateway + loads dashboard\n│   │   └── electron-builder    #   NSIS · APPX · DMG · MAS · AppImage · deb · snap\n│   │\n│   ├── ios\u002F                    # Native SwiftUI client\n│   └── mobile\u002F                 # Expo React Native (iOS + Android)\n│\n└── docs\u002F                       # Screenshots, design notes\n```\n\n---\n\n## Gateway API\n\nThe gateway is the only thing the dashboard, desktop, and mobile clients talk to.\nIt's a plain HTTP server — you can curl it, hit it from another app, or wire it into n8n.\n\n| | |\n|---|---|\n| `GET \u002Fapi\u002F` | Harness status + health |\n| `GET \u002Fapi\u002Fscan` | `?exchange=kalshi&limit=20` — markets list |\n| `GET \u002Fapi\u002Fsearch` | `?q=bitcoin` — search across all rails |\n| `GET \u002Fapi\u002Fquote` | `?exchange=&symbol=` — orderbook snapshot |\n| `GET \u002Fapi\u002Frisk` | Current risk state + caps |\n| `GET \u002Fapi\u002Fconfig` | Sanitized config (no secrets) |\n| `POST \u002Fapi\u002Fcommand` | `{\"command\":\"scan markets\"}` — send AI instruction |\n| `POST \u002Fapi\u002Fpanic` | Flatten everything, halt trading |\n| `WS  \u002Fws` | Live event stream — primary transport |\n| `GET \u002Fapi\u002Fevents` | SSE fallback — same events as `\u002Fws` |\n\n**Event types on the wire:** `position` · `trade` · `feed` · `market` · `command` · `panic` · `heartbeat`\n\n```javascript\nconst ws = new WebSocket('ws:\u002F\u002Flocalhost:3210\u002Fws');\nws.onmessage = (e) => {\n  const { type, payload } = JSON.parse(e.data);\n  \u002F\u002F type: 'position' | 'trade' | 'feed' | 'market' | ...\n};\n```\n\n---\n\n## Trading modes\n\n| Mode | Behaviour | Flip to live |\n|---|---|---|\n| `paper-only` | Everything routes to paper endpoints. Live calls throw. | **Not possible** — must re-onboard |\n| `paper-default` | Paper by default. Can flip after 24h lock. | CLI + email confirmation |\n| `live-allowed` | Trades live immediately when called. | Direct |\n\nThe mode is persisted in `~\u002F.opentradex\u002Fconfig.json` and enforced by `src\u002Fconfig.ts` on\n**every** outbound order. There is no runtime override.\n\n---\n\n## Remote access\n\nWant to run the harness on a VM and drive it from your laptop \u002F phone?\n\n```bash\nopentradex onboard         # pick \"lan\" or \"tunnel\" bind mode\n```\n\nThat generates a bearer token — printed once, never stored elsewhere. Pass it on every call:\n\n```bash\ncurl -H \"Authorization: Bearer $OPENTRADEX_TOKEN\" http:\u002F\u002Fvm.lan:3210\u002Fapi\u002F\n```\n\nThe mobile apps prompt for host + token on first launch.\n\n---\n\n## Design tokens\n\nThe cockpit is calibrated for 8-hour sessions in a dark room:\n\n| Token | Hex | Role |\n|---|---|---|\n| `--bg`        | `#0B0F14` | App background |\n| `--surface`   | `#121821` | Cards |\n| `--surface-2` | `#1A2230` | Inset panels |\n| `--border`    | `#222C3B` | Hairlines |\n| `--text`      | `#E6EDF3` | Primary text |\n| `--text-dim`  | `#8B97A8` | Secondary text |\n| `--accent`    | `#3FB68B` | Positive · brand · \"live\" |\n| `--warning`   | `#F59E0B` | Beta · caution |\n| `--danger`    | `#E5484D` | Negative P&L · panic |\n\n---\n\n## Develop\n\n```bash\nnpm install                  # root workspaces install everything\n\nnpm run build                # compile src\u002F  -> dist\u002F\nnpm run build:dashboard      # Vite build\nnpm run dev:dashboard        # HMR dashboard on :5173\nnpm run desktop              # Electron dev with live gateway\nnpm run ui                   # Web-only (no Electron)\n```\n\n`packages\u002Fdesktop` talks to `:3210` whether it spawns the gateway itself or finds one already running.\n`packages\u002Fdashboard` is served by the gateway at `\u002F` in production — single source of truth, no double port.\n\n---\n\n## Shipping your own fork\n\nThis repo is the public, ready-to-fork mirror. Clone it, wire your own keys, and you're live on paper\nin under a minute:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fdeonmenezes\u002Fopentradex.git\ncd opentradex\nnpm install && npm run build:all\nnpx opentradex onboard --paper-only\nnpx opentradex run\n```\n\n---\n\n## License\n\nMIT. Trade responsibly. No warranty — this is paper-first for a reason.\n\n\u003Cdiv align=\"center\">\n\n**Built by [@deonmenezes](https:\u002F\u002Fgithub.com\u002Fdeonmenezes).**\nPull requests welcome. Stars even more.\n\n\u003C\u002Fdiv>\n","OpenTradex 是一个开源的AI驱动交易控制台，支持12个市场，并默认使用模拟交易模式，确保用户的密钥始终保留在本地。该项目利用TypeScript开发，集成了Node.js、Electron、React等技术栈，提供了一个高效且安全的多市场交易平台。用户可以自定义AI模型来过滤市场信号，在经过审核后执行交易策略。其设计强调本地优先和安全性，适合需要同时监控多个金融市场（如预测市场、股票、加密货币及外汇）的专业交易者使用。此外，OpenTradex还提供了跨平台的支持，包括桌面应用、网页界面以及移动设备版本，满足不同场景下的需求。",2,"2026-06-11 04:04:56","CREATED_QUERY"]