TradingView webhook setup
TradeAdapter API v4 connects a TradingView alert to a saved broker and Strategy. Store broker credentials in My Brokers, then send the generated Strategy message to your webhook URL.
Open My BrokersSave the broker
Check the supported brokers and current capability matrix before creating credentials. An integration can support fewer markets or order features than the broker itself. Account eligibility, region and instrument availability also apply.
Follow the broker's API key guide. Create credentials for the intended live, demo or paper account, with the permissions and IP restrictions that guide requires. Save them under the matching connection in My Brokers. Keep withdrawal access disabled when the guide offers that choice.
Credential fields differ. OANDA uses an account ID and token. Alpaca uses a key ID and secret. Capital.com requires its API key password, which differs from the account login password. OKX requires a passphrase. EU connections use their own venue and credentials; a global account key is not interchangeable.
Use Test Connection where available. A successful connection check confirms access to the checked endpoint. It does not place an order or prove that an alert will produce a fill.
Create a Strategy
Create a Strategy for the saved connection. Select its market and exact supported instrument, then configure order type, quantity and the protection or position controls available for that broker. Review sizing units carefully: shares, contracts and quote-currency amounts are different.
Copy the generated alert message and webhook URL from your account. Preserve the required fields and Strategy identifier. API v4 resolves the saved broker credentials on the server, so broker API keys do not belong in the TradingView alert message. Treat the personal webhook URL and account identifiers as private.
Check broker limits before enabling automation. For example, the current Alpaca connection uses whole shares, Bybit EU supports Spot, and Bitfinex derivatives require the appropriate collateral and instrument identifier. Use the broker's linked guide for its current restrictions.
Configure the alert
- Open the TradingView chart and select the script and alert condition supported by your chosen integration.
- Paste the generated message into the alert message field. Keep the Strategy reference and required placeholders intact.
- Enable the webhook setting and paste the copied webhook URL. Check current webhook availability and requirements in your TradingView account.
- Review alert frequency, instrument, direction and order size before saving. Changing a chart or script later can require recreating its alert.
A TradingView strategy simulation and a broker order are separate events. A backtest fill does not establish the broker's future execution price, liquidity or fill status.
Verify execution
Start with a supported practice or paper environment and a controlled test. Check alert delivery, the recorded TradeAdapter order result and the broker's order or position view. A webhook acknowledgement alone does not establish a filled order.
Testing environments differ by connection. Bitfinex Paper Trading uses a separate paper account and TEST instruments. OKX EU demo orders currently run as a local dry run, so they do not verify execution in an external European demo account. Read the connection's guide before interpreting a test result.
If an order times out or its outcome is uncertain, reconcile it against the broker before resending. A repeated alert can otherwise create another order. For failed connections, check environment, permissions, IP restrictions, exact symbol and account balance. Contact support with the relevant order reference; never include secrets.
API v3 and MetaTrader
Legacy API v3 guides can show broker credentials inside alert JSON. Those examples describe the older API v3 flow. Do not mix that message format with a saved API v4 Strategy. Account or key creation instructions may still help, but use this guide and the current matrix for the saved connection workflow.
MetaTrader uses a different route: a TradeAdapter EA runs in an MT4 or MT5 terminal. The terminal must stay running, on your computer or a suitable VPS. Follow the MT4 or MT5 setup instead of the direct broker API steps above.
Review security information and broker documentation before moving a tested workflow to a live account.