How to Connect TradingView Alerts to MEXC Futures with AlgoWay Webhook Automation

TradingView alerts connected to MEXC Futures through AlgoWay webhook automation

AlgoWay connects TradingView alerts to MEXC Futures through webhook automation. The full setup has five critical parts: create a dedicated MEXC API key, enable only the required Futures permissions, bind the API key to the AlgoWay server IP address, create a MEXC webhook in AlgoWay, and send valid JSON from TradingView to the AlgoWay webhook URL.

This guide describes the complete route shown in the screenshots: the MEXC API permission screen, the Link IP Address field, the created API key modal, the AlgoWay webhook form, the webhook test modal, the webhook UUID in the dashboard, and the TradingView alert configuration.

The execution route is:

TradingView alert → AlgoWay webhook URL → AlgoWay validation → MEXC Futures API → MEXC Perpetual Futures order

TradingView creates the signal. AlgoWay receives the webhook payload, validates the JSON, applies the selected webhook settings, signs the request with the MEXC API credentials, and sends the order request to MEXC Futures.

Last updated: 2026-05-17 • Author: AlgoWay

Quick Answer: TradingView to MEXC with AlgoWay

To automate MEXC Futures from TradingView with AlgoWay, complete this checklist:

  1. Create a dedicated MEXC API key for AlgoWay.
  2. Enable the required Futures permissions: order status access and order placement.
  3. Paste the AlgoWay server IP address into the MEXC Link IP Address field.
  4. Confirm that the created API key shows the same linked IP address.
  5. Copy the MEXC Access Key and Secret Key.
  6. Create a MEXC webhook in AlgoWay with Source set to TradingView and Platform set to MEXC.
  7. Choose Futures / Perpetual, margin mode, trade type and quantity multiplier in AlgoWay.
  8. Test the webhook with a small valid MEXC Futures order.
  9. Copy the AlgoWay webhook URL and paste it into TradingView.
  10. Paste valid JSON into the TradingView alert message.

Setup Route

AlgoWay works as the automation bridge between TradingView and MEXC:

  • TradingView sends the alert and JSON message.
  • AlgoWay receives the webhook, checks the payload, reads the webhook settings and signs the request.
  • MEXC Futures receives the authenticated order request through the MEXC API key.

The API key is the authorization layer. The linked IP address is the server restriction layer. The webhook URL is the TradingView delivery endpoint. All three must match the same AlgoWay route.

Before You Start

Prepare the following before you create the MEXC API key:

  • MEXC account with Futures / Perpetual trading available;
  • AlgoWay account with access to the Webhooks dashboard;
  • AlgoWay server IP address shown in the dashboard;
  • TradingView chart, strategy, indicator or manual alert;
  • TradingView plan with webhook alert support;
  • small MEXC Futures test quantity;
  • correct symbol format for your route;
  • margin mode and position mode selected before live automation.

Step 1. Create a MEXC API Key

Open MEXC → API Management → Create New API Key. Use a dedicated API key for AlgoWay, not a shared key used by another bot or application.

On the MEXC screen, complete the API form from top to bottom:

  1. Leave unnecessary Spot permissions disabled for this Futures route.
  2. Go to the Futures permission area.
  3. Enable only the required Futures permissions.
  4. Enter a clear note, for example connector or ALGOWAY-MEXC.
  5. Paste the AlgoWay server IP address into Link IP Address.
  6. Confirm the API risk reminder checkbox.
  7. Click Create.
MEXC Create New API Key screen with Futures permissions and linked IP address field
MEXC API creation screen. The screenshot shows Futures permissions enabled and the AlgoWay server IP entered in the Link IP Address field before the key is created.

Step 2. Bind the MEXC API Key to the AlgoWay Server IP

The Link IP Address field is one of the most important parts of the MEXC setup. This field restricts the API key so it can be used only from the server IP address entered in MEXC.

In the screenshot, the IP address is entered in the MEXC form before clicking Create. This means MEXC will link the API key to that server IP. For your setup, copy the current AlgoWay server IP from your AlgoWay dashboard and paste that exact value into MEXC.

Where the IP is entered in MEXC

In the MEXC API form, find this field:

Link IP Address

MEXC also shows a warning next to this field: keys that are not linked to an IP address are valid for 90 days only and are not recommended. For AlgoWay automation, do not leave this field empty.

IP binding checklist

  1. Open the AlgoWay dashboard.
  2. Copy the server IP shown for your webhook/account.
  3. Return to MEXC API Management.
  4. Paste the IP into Link IP Address.
  5. Check that there are no spaces before or after the IP.
  6. Confirm that the IP in MEXC matches the AlgoWay IP exactly.
  7. Create the key only after the IP field is filled.

What happens if the IP is wrong

If the Access Key and Secret Key are correct but the linked IP is wrong, AlgoWay can still receive the TradingView alert, but MEXC can reject the API request. In this case, the problem is not the TradingView JSON. Check the linked IP before changing the strategy or alert message.

Step 3. Select Futures API Permissions

For this MEXC Futures route, the API key must have Futures order permissions. The screenshot shows the relevant selections under the Futures section.

Permission area Permission Use for this route? Why it matters
Futures → Trade View Order Details Yes Needed to check order state, exchange response and execution status.
Futures → Trade Order Placing Yes Needed to create MEXC Futures orders through AlgoWay.
Futures → Account View Account Details Only if your route requires it Can be used for account checks, but order placement itself depends on the trade permission.
Spot Spot account or spot trade permissions No for this Futures guide This page describes MEXC Futures / Perpetual automation, not Spot automation.
Withdraw Withdrawal-related permissions No Withdrawal access is not required for AlgoWay webhook trading.

The screenshot shows Spot permissions disabled and Futures trade permissions enabled. This is the correct direction for a TradingView to MEXC Futures webhook route.

Step 4. Save Access Key, Secret Key and Linked IP

After MEXC creates the API key, it opens a confirmation window with three important fields:

  • Access Key — the public key identifier used in AlgoWay as API Key.
  • Secret Key — the private signing key used in AlgoWay as API Secret.
  • Linked IP Address — the IP address attached to this MEXC API key.
MEXC API key created successfully window showing Access Key, Secret Key and Linked IP Address
MEXC created API key modal. Copy the Access Key and Secret Key immediately and verify that the linked IP address is present.

The Secret Key is displayed only once. Save it immediately before closing the MEXC confirmation window. Also check that the Linked IP Address field is not empty and contains the same AlgoWay server IP that you pasted during API key creation.

Step 5. Create the MEXC Webhook in AlgoWay

After the MEXC API key is created and the linked IP is confirmed, create the webhook route in AlgoWay.

  1. Open the AlgoWay Dashboard.
  2. Click Add Trial Webhook or Add Main Webhook.
  3. Set Source (from) to TradingView.
  4. Set Platform (to) to MEXC.
  5. Choose the quantity multiplier mode.
  6. Set Market Type to Futures / Perpetual.
  7. Choose Cross or Isolated margin mode.
  8. Choose the trade type, for example Reverse / Netting or another supported mode.
  9. Paste the MEXC Access Key into API Key.
  10. Paste the MEXC Secret Key into API Secret.
  11. Save the webhook.
AlgoWay Add Trial Webhook form configured for TradingView to MEXC Futures
AlgoWay webhook form. Source is TradingView, platform is MEXC, market type is Futures / Perpetual, margin mode is selected, and MEXC API credentials are pasted.

Main AlgoWay MEXC Fields

AlgoWay field Value for this route Purpose
Source (from) TradingView Defines where the alert comes from.
Platform (to) MEXC Defines the destination exchange.
Quantity Multiplier Absolute or selected route setting Controls how AlgoWay interprets incoming order size.
Market Type Futures / Perpetual Matches the MEXC Futures route.
Margin Mode Cross or Isolated Controls the margin mode used by the route.
Trade Type Reverse / Netting, Hedge or selected mode Controls how AlgoWay handles direction changes and existing exposure.
API Key MEXC Access Key Identifies the MEXC API key.
API Secret MEXC Secret Key Signs authenticated MEXC API requests.

Step 6. Test the MEXC Webhook in AlgoWay

Before connecting live TradingView alerts, test the MEXC route from AlgoWay with a small order.

  1. Open Webhook Logs in AlgoWay.
  2. Click Test Webhook.
  3. Select the MEXC webhook from the dropdown.
  4. Enter a valid MEXC Futures symbol for your route.
  5. Enter a small valid quantity.
  6. Select Buy or Sell.
  7. Use Close Side only when your trade mode requires it.
  8. Add optional SL / TP fields only if your route supports them.
  9. Check the JSON Preview before sending.
  10. Click Send.
  11. Check AlgoWay logs and the MEXC Futures account.
AlgoWay Send Test Webhook modal showing MEXC webhook selection, order fields and JSON preview
AlgoWay test webhook modal. Select the MEXC webhook, enter symbol, quantity, action, optional risk fields, review JSON Preview and send the test.

If the test fails, check the failure in this order: linked IP, Futures permissions, Access Key, Secret Key, symbol format, quantity step, margin mode, leverage, position mode and MEXC response in AlgoWay logs.

Step 7. Copy the AlgoWay Webhook URL

After the webhook is created and tested, copy the webhook endpoint from the AlgoWay dashboard.

  1. Open Dashboard → Your Webhooks.
  2. Find the row where Source is TradingView and Platform is MEXC.
  3. Copy the Webhook UUID or the full webhook URL.
  4. Use this URL in TradingView notifications.
AlgoWay dashboard showing a TradingView to MEXC webhook row and webhook UUID
AlgoWay dashboard. Find the MEXC webhook row and copy the webhook UUID or full URL that TradingView will call.

Webhook URL format:

https://algoway.co/your-webhook-uuid

Step 8. Prepare TradingView JSON for MEXC

TradingView must send a valid JSON object. AlgoWay expects structured fields, not plain text.

Recommended TradingView strategy alert JSON

{
  "platform_name": "mexc",
  "ticker": "{{ticker}}",
  "order_contracts": "{{strategy.order.contracts}}",
  "order_action": "{{strategy.market_position}}",
  "price": "{{close}}"
}

TradingView replaces these placeholders when the alert fires:

  • {{ticker}} — chart ticker;
  • {{strategy.order.contracts}} — strategy order size;
  • {{strategy.market_position}} — strategy position state;
  • {{close}} — close price at alert time.
TradingView alert sample JSON and Edit message window with MEXC JSON payload
TradingView message configuration. Copy the MEXC JSON template from AlgoWay and paste one valid JSON object into the TradingView alert message field.

Fixed test JSON

For a controlled test, use a fixed symbol and small valid quantity:

{
  "platform_name": "mexc",
  "ticker": "BTCUSDT.P",
  "order_contracts": 0.001,
  "order_action": "buy"
}

Use the exact symbol format accepted by your MEXC Futures route. If the order is rejected, check symbol format, quantity step, margin, leverage, position mode and API permissions.

JSON with optional SL / TP fields

{
  "platform_name": "mexc",
  "ticker": "{{ticker}}",
  "order_contracts": "{{strategy.order.contracts}}",
  "order_action": "{{strategy.market_position}}",
  "price": "{{close}}",
  "stop_loss": "100",
  "take_profit": "200"
}

Confirm in your route how stop_loss and take_profit are interpreted before live trading. Depending on the route, these values may be treated as distance values, points or route-specific parameters.

Step 9. Create the TradingView Alert

After the webhook URL and JSON are ready, create or edit the TradingView alert.

  1. Open the TradingView chart used by your strategy.
  2. Create a new alert or edit an existing strategy alert.
  3. In the message area, paste the MEXC JSON.
  4. Open the alert Notifications section.
  5. Enable Webhook URL.
  6. Paste the AlgoWay MEXC webhook URL.
  7. Save the alert.
TradingView Notifications section with Webhook URL enabled and AlgoWay URL pasted
TradingView notifications screen. Enable Webhook URL and paste the AlgoWay webhook endpoint for the MEXC route.
TradingView create alert screen showing condition, message and notifications summary
TradingView create alert screen. Confirm the condition, message and notification settings before clicking Create.

For bar-close strategies, use Once per bar close unless your strategy intentionally requires intra-bar execution. This prevents repeated intrabar webhook calls from the same candle.

Symbols, Quantity, Margin Mode and Trade Type

MEXC Futures automation depends on four execution settings: symbol, quantity, margin mode and trade type.

Symbol format

TradingView tickers and MEXC Futures symbols may use different formats. Before live trading, confirm the exact symbol accepted by your AlgoWay MEXC route. For example, a TradingView perpetual chart may show a suffix that must be mapped correctly before the MEXC API request is sent.

Quantity

The order size must satisfy MEXC Futures minimum quantity and step rules. A size that works on another exchange may be rejected by MEXC. Start with a small valid test quantity and check the exchange response in AlgoWay logs.

Margin mode

The margin mode selected in AlgoWay must match the position model you want to use. If account state, symbol settings or route configuration conflict with the requested margin mode, MEXC can reject the order.

Trade type

The AlgoWay Trade Type setting controls how opposite signals and open exposure are handled:

  • Reverse / Netting: the newest signal controls the current direction.
  • Hedge: long and short sides may be handled separately when supported.
  • Close Side: used when the route must close only the long side or only the short side.

Full explanation: How AlgoWay handles opposite trading signals.

Verification and Logs

After the TradingView alert is created, trigger a small test and verify each layer:

  1. Confirm the alert fired in TradingView.
  2. Open AlgoWay Webhook Logs.
  3. Check that AlgoWay received the webhook payload.
  4. Check that the JSON fields are correct.
  5. Review the MEXC API response.
  6. Open MEXC Futures and confirm order or position status.

If no order appears in MEXC, do not immediately edit the TradingView strategy. First check whether AlgoWay received the webhook. If AlgoWay received it, check the linked IP, permissions, credentials, symbol, quantity, margin mode and exchange response.

Common MEXC Webhook Problems

Linked IP Address Is Missing

If the MEXC API key was created without the AlgoWay server IP in Link IP Address, the route is not ready for stable AlgoWay automation. Open MEXC API Management and confirm that the key has the correct linked IP.

Linked IP Address Is Wrong

If the linked IP belongs to another server or was copied incorrectly, MEXC can reject AlgoWay API requests even when the Access Key and Secret Key are correct. Compare the IP in MEXC with the current AlgoWay server IP shown in your dashboard.

Futures Order Permission Is Missing

If Order Placing is not enabled under Futures permissions, MEXC can reject order creation. Check the MEXC API permissions before changing the TradingView alert.

View Order Details Permission Is Missing

If order view permission is missing, status checks and response verification can fail. Enable the required Futures order detail permission for the webhook route.

Secret Key Was Not Saved

The Secret Key may only be displayed once. If it was not saved, create a new dedicated API key and update the MEXC credentials in AlgoWay.

Wrong Market Type

This guide is for MEXC Futures / Perpetual automation. Spot permissions and Futures permissions are separate. A Spot-only API key is not enough for this route.

Invalid JSON

TradingView must send one valid JSON object. Broken commas, missing quotes, invalid placeholders or plain text can stop the automation before MEXC receives anything. See: How to fix AlgoWay webhook Error 415.

Wrong Symbol Format

Check whether the TradingView ticker matches the symbol expected by the AlgoWay MEXC route and MEXC Futures API.

Invalid Quantity

The order size must satisfy MEXC Futures minimums and quantity steps. Use a small valid size for the first test.

Margin or Leverage Issue

If available margin is insufficient, leverage is incompatible, or margin mode conflicts with the account state, MEXC can reject the order.

TradingView Alert Fires Too Often

Check the TradingView alert frequency. For many strategy alerts, Once per bar close is safer than intrabar execution.

FAQ

Do I need to bind the MEXC API key to the AlgoWay IP?

Yes. For AlgoWay webhook automation, bind the MEXC API key to the AlgoWay server IP shown in your dashboard. The screenshot shows this in the MEXC Link IP Address field.

Where do I paste the AlgoWay server IP in MEXC?

Paste it into the Link IP Address field on the MEXC API key creation screen before clicking Create.

Which MEXC permissions are needed?

For this Futures route, use the required Futures trade permissions, including order details access and order placing. Do not enable withdrawal permissions.

What should I check first if MEXC rejects the request?

Check the linked IP first, then Futures permissions, Access Key, Secret Key, symbol format, quantity, margin mode, leverage and MEXC response in AlgoWay logs.

Can I use the same MEXC API key for several bots?

Use a dedicated key for the AlgoWay route. A dedicated key makes IP binding, permission control and troubleshooting clearer.

Related AlgoWay Guides

Final Summary

To connect TradingView alerts to MEXC Futures with AlgoWay, create a dedicated MEXC API key, enable only the required Futures permissions, bind the key to the AlgoWay server IP address, save the Access Key and Secret Key, create the MEXC webhook in AlgoWay, test the route, copy the webhook URL, and send valid JSON from TradingView.

The IP binding step is mandatory for a clean AlgoWay to MEXC setup. Without the correct linked server IP, webhook delivery can work in TradingView and AlgoWay while the final MEXC API request still fails.