How to Set up Signal Trading With TradingView?

2023-09-13 01:30
Binance Webhook & TradingView Integration
Frequently Asked Questions

Disclaimer: In compliance with MiCA requirements, unauthorized stablecoins are subject to certain restrictions for EEA users. For more information, please click here.

What is a webhook?

A webhook is a method that allows TradingView to communicate real-time data directly to Binance. Essentially, it lets specific conditions set on TradingView immediately trigger trading orders on Binance.

How does this integration work?

TradingView users can create alerts or execute trading strategies via webhook. When these alerts or strategies are triggered, a webhook message, containing trade specifics, such as the trading symbol, side, and quantity, will be dispatched to Binance. Upon receiving these, Binance will automate the trade execution.

Who can access this feature?

Currently, only USDⓈ-M Futures users can access this feature. Binance supports both default and Portfolio Margin trading modes.

To access webhooks, you need a TradingView Pro, Pro+, or Premium account. The service is predominantly designed for USDⓈ-M default trading users.

What are the prerequisites to use this integration?

  • A subscription to either the TradingView Pro, Pro+, or Premium account, as only these tiers support webhooks.
  • Ensure you are trading pairs that are recognized and listed on Binance.
  • Both the One-Way and Hedge position mode are supported.

How to set up a webhook in TradingView with the Binance integration?

Type A: Strategy

Step 1: Create a webhook on Binance

1. Log in to your Binance account and go to the USDⓈ-M trading interface. Select your desired trading pair.

2. Go to the [Strategy] tab and choose [Webhook Signal Trading]. Click [Create Now].

3. Read the notes and click [Confirm and Proceed].

4. Create a name for your signal, choose a trading pair for which you wish to receive signals and confirm the order setting, then click [Create Signal].

Note:

  • Order Type: Can select Limit Order or Market Order, user can set here or in the message template.
  • Order Size: Can be set based on the base asset amount and quote asset of the selected symbol. If you set the order size = 10, that does not mean you can only place orders with order size = 10, you can change the order size in your strategy as you like. In addition, if you choose COIN as the unit, {{strategy.order.contracts}} is still supported.
  • Position Mode: The current position mode you selected, you can change the setting on the trading page.
  • Position Side: ‘Long’ or ‘Short’ when selecting Hedge Mode, and ‘Both’ for One-Way Mode, you can change this in the message template.
  • Reduce only: Only available for One-Way position Mode.

5. You'll see your webhook URL and the alert message. Keep these handy as you'll need to enter them into the TradingView alert settings later.

6. Select [Strategy] and click [Run Webhook], then review and accept the Terms and Conditions.

Step 2: Configure TradingView

1. Log in to your TradingView account. You’ll need a TradingView Pro, Pro+, or Premium account to integrate with Binance.

Select a USDⓈ-M trading pair (e.g., ETHUSDT.P for ETH Futures perpetual contract) and click [Launch chart].

2. Import existing strategies under [Indicators] - [Technicals].

Alternatively, go to the [Strategy Tester] tab and select your desired strategy to customize.

3. Confirm your parameters and you’ll see the strategy under the [Overview] tab.

4. Click the [Add alert] icon to add an alert for your chosen strategy.

5. Under the [Settings] tab, name your alert and enter the message from your Binance webhook setup.

Please make sure the message matches the one in the Binance webhook.

Example Message Format: {"symbol":"{{ticker}}","side":"buy","qty":"1","price":"{{close}}","trigger_time":"{{timenow}}","signal_id":"175cbc02-79eb-44ef-ac67-d0d818c6f928","UID":"xxxxx"}

6. Under the [Notifications] tab, paste the Alert webhook URL you got from Binance. Click [Save].

7. Click [Run Webhook] to confirm.

8. You’ll see all alerts under the [Alerts] panel on the right of the TradingView interface. You can hover over an alert to view its details.

You may stop, edit, or remove alerts as needed.

Type B: Alert

Step 1: Create a webhook on Binance

1. Log in to your Binance account and go to the USDⓈ-M trading interface. Select your desired trading pair.

2. Go to the [Strategy] tab and choose [Webhook Signal Trading]. Click [Create Now].

3. Read the notes and click [Confirm and Proceed].

4. Create a name for your signal, and choose a trading pair for which you wish to receive signals, and confirm the order setting then. Click [Create Signal].

Note:

  • Order Type: Can select Limit Order or Market Order, user can set here or via property in TradingView
  • Order Size: Can be set base on the base asset amount and quote asset of the selected symbol. If you set the order size =10, that does not mean you can only place orders with order size =10, you can change the order size in your strategy as you like. In addition, if you choose COIN as the unit, {{strategy.order.contracts}} is still supported.
  • Position Mode: The current position mode you selected.
  • Position Side: Long or Short when selecting Hedge Mode, and Both for One-way Mode
  • Reduce only: Only available for One-way Position Mode

5. You'll see your webhook URL and the alert message. Keep these handy as you'll need to enter them into the TradingView alert settings later.

6. Select [Alert] and click [Run Webhook], then review and accept the Terms and Conditions.

Step 2: Configure TradingView

1. Log in to your TradingView account. You’ll need a TradingView Pro, Pro+, or Premium account to integrate with Binance.

2. Click the [Add Alert] icon to add an alert for your chosen strategy.

3. Under the [Settings] tab, name your alert and enter the message from your Binance webhook setup.

Please make sure the message matches the one in the Binance webhook.

Example Message Format: {"symbol":"{{ticker}}","side":"buy","qty":"1","price":"{{close}}","trigger_time":"{{timenow}}","signal_id":"175cbc02-79eb-44ef-ac67-d0d818c6f928","UID":"xxxxx"}

4. Under the [Notifications] tab, paste the Alert webhook URL you got from Binance. Click [Save].

5. Click [Run Webhook] to confirm.

6. You’ll see all alerts under the [Alerts] panel on the right of the TradingView interface. You can hover over an alert to view its details.

You may stop, edit, or remove alerts as needed.