| Requirement | Version | Link |
|---|---|---|
| Node.js | 18+ | nodejs.org |
| Chrome or Edge | Any recent | google.com/chrome |
| TradingView account | Free or paid | tradingview.com |
| Anthropic API key | — | console.anthropic.com |
git clone https://github.com/brandononchain/opentrade.git
cd opentrade
npm installCreate a file called .env in the opentrade/ folder:
ANTHROPIC_API_KEY=sk-ant-...
Optional settings:
TV_CDP_PORT=9222
TVA_PORT=7842
Your .env is gitignored — it never gets committed.
Get your API key at console.anthropic.com → API Keys → Create Key
TradingView must be open in Chrome with the remote debugging port enabled. See Connecting TradingView for full platform instructions.
Quick version (Windows):
& "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="C:\ChromeDebug" "https://www.tradingview.com/chart/"Quick version (Mac):
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --user-data-dir="/tmp/ChromeDebug" "https://www.tradingview.com/chart/"Log into your TradingView account when Chrome opens.
node src/cli/index.jsYou should see the banner, then:
✓ Connected (BTCUSDT)
You ›
Type anything to start.
npm link
opentrade # now works from anywherenode src/cli/index.js healthExpected output:
{
"success": true,
"cdp_connected": true,
"chart_symbol": "BTCUSDT",
"chart_resolution": "60",
"api_available": true
}| Problem | Fix |
|---|---|
Could not resolve authentication method |
Add ANTHROPIC_API_KEY to your .env file |
CDP connection failed |
Make sure Chrome is running with --remote-debugging-port=9222 |
TradingView not found |
Navigate to localhost:9222/json/list in browser — should show TradingView |
npm install fails |
Make sure Node.js 18+ is installed: node --version |
.msix install fails on Windows |
See Connecting TradingView — use Chrome instead of TradingView Desktop |
Next: Connecting TradingView