TradingView → Broker Setup Guide
Time: 10 minutes | Difficulty: Easy | Market: Universal Mode: Full automation | API: Webhook alerts (outbound) → Any broker adapter | Docs: tradingview.com/support/solutions/43000529348
This guide routes TradingView alerts to any supported broker adapter through the botwir3 runtime. Configure webhook-to-broker routing and run automated execution across equities, crypto, forex, or any market TradingView charts — downloaded and run locally.
Before you start
This is a companion guide to the TradingView Webhooks Setup Guide. Complete that guide first — it covers webhook receiver configuration, TradingView alert setup, and connection testing.
Verify that automated operation is permitted under the destination broker's current terms of service before deploying. botwir3 provides tools for building structured automation. The user is responsible for compliance with all applicable platform terms and regulations.
The execution target's terms of service apply. See the specific broker's setup guide for ToS links:
- Alpaca — US equities
- Coinbase — crypto
- Binance — crypto (not US)
- Kraken — crypto
- Interactive Brokers — multi-asset, global
- Schwab — US equities (requires developer app approval)
- OANDA — forex
- FXCM — forex
What you need
- TradingView webhook alerts configured (see the TradingView Webhooks guide)
- The botwir3 runtime running with a webhook adapter
- API credentials for the destination broker
- A strategy config file from the builder
Supported broker adapters
| Broker | adapter value | Market |
|---|---|---|
| Alpaca | alpaca | US equities, ETFs |
| Coinbase | coinbase | Crypto |
| Binance | binance | Crypto (not US) |
| Kraken | kraken | Crypto |
| Interactive Brokers | ibkr | Equities, options, futures, forex (requires TWS/Gateway) |
| Schwab | schwab | US equities (requires developer app approval) |
| OANDA | oanda | Forex |
| FXCM | fxcm | Forex |
Configure the adapter
The webhook adapter config routes signals from TradingView to the destination broker. Set broker_adapter to the target broker and include the broker's credentials:
{
"adapter": "webhook",
"webhook_port": 3333,
"webhook_secret": "paste-secret-passphrase-here",
"broker_adapter": "alpaca",
"broker_credentials": {
"api_key": "paste-broker-api-key-here",
"api_secret": "paste-broker-api-secret-here",
"base_url": "https://paper-api.alpaca.markets"
},
"rate_limit_ms": 0
}
To change the execution target, update broker_adapter and broker_credentials. The TradingView alert does not need to be reconfigured — the webhook receiver stays the same.
API keys are stored in a local config file on the machine running the bot. They are not transmitted to botwir3 or any third party. botwir3 never sees, stores, or has access to platform credentials.
🔒 Security. The webhook endpoint is protected by the
webhook_secretvalue. Only requests containing the correct secret are processed. Broker credentials are stored locally alongside the webhook config.
Signal flow
TradingView alert fires
↓
Webhook POST to botwir3 endpoint
↓
botwir3 receives signal
↓
Gate compares against configured spec
↓
Broker adapter submits to destination
↓
Logged in local ledger
The gate function compares proposed actions against the configured spec. The user is responsible for monitoring the bot and verifying execution outcomes.
Switching brokers
Changing the execution target does not require reconfiguring TradingView:
- Stop the bot
- Update
broker_adapterandbroker_credentialsinadapter.json - Restart the bot
The webhook receiver, port, and secret stay the same. TradingView sends the same signal payload regardless of where it executes.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
BROKER_ERROR | Broker adapter returned an error | Check the specific broker's setup guide for error details |
INVALID_SECRET | Webhook secret mismatch | Verify webhook_secret matches the TradingView alert message |
BROKER_NOT_CONFIGURED | Missing or invalid broker_adapter value | Verify broker_adapter matches a supported adapter name |
MANDATE_INTEGRITY_VIOLATION | Config file modified while bot is running | Stop the bot, verify config, restart |
All actions — including webhook receipts, gate evaluations, and broker submissions — are recorded in the local ledger.
Related guides
- TradingView Webhooks Setup Guide — prerequisite: webhook receiver setup
- Alpaca Setup Guide — US equities broker adapter
- Coinbase Advanced Setup Guide — crypto broker adapter
One bot. $129. No subscription. No $749/mo platform. → Build for TradingView