Equities

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:

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

Brokeradapter valueMarket
AlpacaalpacaUS equities, ETFs
CoinbasecoinbaseCrypto
BinancebinanceCrypto (not US)
KrakenkrakenCrypto
Interactive BrokersibkrEquities, options, futures, forex (requires TWS/Gateway)
SchwabschwabUS equities (requires developer app approval)
OANDAoandaForex
FXCMfxcmForex

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_secret value. 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:

  1. Stop the bot
  2. Update broker_adapter and broker_credentials in adapter.json
  3. Restart the bot

The webhook receiver, port, and secret stay the same. TradingView sends the same signal payload regardless of where it executes.

Troubleshooting

ErrorCauseFix
BROKER_ERRORBroker adapter returned an errorCheck the specific broker's setup guide for error details
INVALID_SECRETWebhook secret mismatchVerify webhook_secret matches the TradingView alert message
BROKER_NOT_CONFIGUREDMissing or invalid broker_adapter valueVerify broker_adapter matches a supported adapter name
MANDATE_INTEGRITY_VIOLATIONConfig file modified while bot is runningStop the bot, verify config, restart

All actions — including webhook receipts, gate evaluations, and broker submissions — are recorded in the local ledger.

Related guides


One bot. $129. No subscription. No $749/mo platform. → Build for TradingView


Build your TradingView → Any Broker bot

Ready to build?