In case of any issues or suggestions please contact TradeAdapter Support Team:
Contact Support Team
TradingView Binance.US API
1. Get Binance API Key
Instructions how to create API for Real account: binance.com/en/support/faq/how-to-create-apiInstructions how to Create Binance FUTURES TestNet account are below
2. TradingView Alarm "Message" and "WebHook URL"
Configure TradingView Alarm "Setting" page with following "Message" and Webhook URL. You can fins Step-by-Step instruction below.Webhook URL:
https://tradeadapter.com/api/v3/"PUT YOUR TRADEADAPTER KEY HERE"
For example, your WebHook URL should look like: https://tradeadapter.com/api/v3/L8CIF0JT1N0RC23KA01D
"Message":
Update fields highlighted by red. The rest keep as is, as they will be filled automatically by TradingView during Alarm execution. You can use Message Generator to Generate the TradingView message based on your parameters.
{
"binance_api_key": "PUT YOUR BINANCE API KEY HERE",
"binance_secret": "PUT YOUR BINANCE SECRER HERE",
"real_order":"Yes / No",
"order_market":"Spot / Margin / Futures",
"order_type":"Market / Limit",
"isolated_margin": "Yes / No",
"exchange": "binanceus",
"ticker": "{{ticker}}",
"time": "{{timenow}}",
"order_contracts": "{{strategy.order.contracts}}",
"order_action": "{{strategy.order.action}}",
"order_price": "{{strategy.order.price}}"
}
For example, final message text should look like this:
IMPORTANT: You need recreate TradingView Alert each time you change parameters of your PineScript Strategy.
Message Fields Explanation:
"tradeadapter_key", "binance_api_key", "binance_secret" - Your API credentials."real_order" - in case of "Yes" option order will be excuted on Binance.com. In case of "No" Test order will be created. Pleas check clarification for Test orders scenario Here:
"order_market" Select which market to use Spot, Margin or Futures
"order_type" - Select type of order "Market" or "Limit"
"isolated_margin" - This field applicable only for Margin order. Could be "Yes" or "No". If you trading non-Margin order, can keep as "No".
Following fields will be automatically filled by TradingView Alert Mechanism when Alert will be send:
"exchange" - Contains Excange of the Symbol you are trading.
"ticker" - Contacins Symbol.
"time" - Contain time of the Alert.
"order_contracts" - Order Size defined by your PineScript Strategy.
"order_action" - Will contain Buy or Sell depends on your PineScript Strategy.
"order_price" - Will contain Order Price and will be used in case of the LIMIT order.
3. TradingView Alert Configurations Step by Step:
[link]STEP 1. Add Trading Strategy to the TradingView
1.1 - Go to "PineEditor" tab page and write new or copy/paste existing trading strategy.
1.2 - Press "Add to chart" trading strategy to your trading panel.
STEP 2. Creat Alert for TradingView Strategy
2.1 - Go to "Strategy Tester" tab page to check Trading strategy performance.
2.2 - Press "Add Alert" to create Alert for your Buy/Sell signals.
STEP 3. Configure TradingView Alert using "Message" and "WebHook URL" to connect with Broker
3.1 - Paste "Message". You should get green mark when you enter the Message in TradingView Alert:
3.2 - Paste "WebHook URL".
Message:
|
Webhook URL:
|
IMPORTANT: You need recreate TradingView Alert each time you change parameters of your PineScript Strategy.
3. How does TEST orders work
[link]> for SPOT order will create TEST order on Real account (Binance.com), thus Real API from Binance.com is required.
> for MARGIN. Unfortunately, Binance do not support Test orders for Margin Market. Please use smallest real order to test.
> for FUTURES order, will create Order on Binance Testnet (https://testnet.binancefuture.com/). API from TestNet required.
4. How to create Binance FUTURES TestNet account and API Key
[link]Biance Testnet website: https://testnet.binancefuture.com
Get API for Demo account:
1. Login to https://testnet.binancefuture.com
2. Scroll Down to
Also do not forget to change you TradingView message parameter "real_order" to "No",