In case of any issues or suggestions please contact TradeAdapter Support Team:
Contact Support Team
TradingView MEXC API
To send Alerts from TradingView to TradeAdapter now you can use two options:
WebHook URL (if you have TradingView PRO/PRO+ account)
"Email Alert" integration if you are using TradingView Basic plan.
How to setup "Email Alert" integration
1. 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:
Your TradeAdapter KEY you can find in your Profile Page: https://tradeadapter.com/profile
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.
{
"broker_api_key": "PUT YOUR MEXC API KEY HERE",
"broker_api_secret": "PUT YOUR MEXC SECRER HERE",
"real_order":"Yes / No",
"order_market":"Spot / Margin / Futures",
"order_type":"Market / Limit",
"isolated_margin": "Yes / No",
"exchange": "mexc",
"ticker": "{{ticker}}",
"time": "{{timenow}}",
"order_contracts": "{{strategy.order.contracts}}",
"order_action": "{{strategy.order.action}}",
"order_price": "{{strategy.order.price}}",
"market_position": "{{strategy.market_position}}",
"prev_market_position": "{{strategy.prev_market_position}}"
}
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", "bybit_api_key", "bybit_api_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 connection using "WebHook URL" or "Email Alert"
3.1 - Paste "Message". You should get green mark when you enter the Message in TradingView Alert:
3.2 - Paste "WebHook URL" or Select "Send plain text" option.
To send Alerts from TradingView to TradeAdapter you can use WebHook URL (if you have TradingView PRO/PRO+ account) or you can use "Send plain text" integration if you are using TradingView Basic plan.
Instructions how to setup Email Alert integration you can find here: How to setup "Email Alert" integration
Message:
|
Select Webhook URL or "Send plain text" option (Depends on your TradingView plan) |
IMPORTANT: You need recreate TradingView Alert each time you change parameters of your PineScript Strategy.