Skip to content
MEXC logo

Alerts to orders

Automate TradingView alerts to MEXC

Nyria places TradingView webhook alerts as spot orders in your own MEXC account. You connect with an API key set to Spot trading. Market or limit, as the strategy sets it.

Crypto spot
My strategies, then Create strategy: a strategy name typed in, TradingView picked as its alert source, then Next to what it trades, where Stocks is picked

Setup steps

Point the TradingView alert's webhook at a Nyria strategy. Then connect your MEXC account in Nyria with your own MEXC API key. Each alert becomes a spot order in your own MEXC account. Nyria works with live MEXC accounts only. Test it free on Nyria Paper first.

  1. 1Connect MEXC. In MEXC, select the profile icon, then API Management. Choose Spot trading and leave Withdrawals off. Add a note, select Create and complete the security verification. Copy the API key and the secret key. In Nyria, select Integrations, then the MEXC card. Paste both keys, then select Connect MEXC.
  2. 2Create a strategy. In Nyria, select Create strategy and pick TradingView as the alert source. Choose crypto spot as the asset type. Set what an entry and an exit do on each side.
  3. 3Create the alert in TradingView. Open the alert dialog from the Alert button on the top toolbar. Set the Condition to your strategy or indicator. Open Message, paste the message from the strategy's Integration tab and select Apply. Open Notifications, tick Webhook URL, paste the strategy's webhook URL and select Apply. Then select Create. TradingView sends webhooks on its paid plans only, with two-factor sign-in on.
  4. 4Check the format. Back in Nyria, select Check format, then Check and save. The strategy turns Active once Nyria reads every side correctly. The Logs tab shows the ticker and side it read.
  5. 5Deploy a bot. On the strategy, select Deploy bot. Pick the MEXC account on the Account step and set a Budget per entry. Live bots need a Nyria Pro plan or a Premium strategy you have bought. The next alert becomes an order.

What a TradingView alert must say

Nyria needs the ticker, the side, and whether it opens or closes a position. It reads plain text or JSON in your own wording. There is no template to follow. Spot crypto can't be shorted, so a short alert closes the long.

TradingView posts the Message box as written, plain text or JSON. Placeholders such as {{ticker}} and {{strategy.order.action}} fill in when the alert fires. One alert can serve every symbol a chart is on.

An alert cannot set the size: each bot's budget per entry does. Exits come from your exit alerts.

A crypto entry

{ "ticker": "BTC", "action": "buy" }

Buy BTC spot, sized by the bot.

An exit

{ "ticker": "BTC", "action": "sell" }

Close the BTC position, matched against what the bot is holding.

What MEXC does with it

MEXC connects with an API key you create in your own MEXC account. Nyria stores the API key and secret key encrypted at rest. Linking IP addresses to the key is optional. Without withdrawal permission, the key can't move funds out. MEXC isn't available to US residents.

Options aren't offered on this connection. An options alert places no order at MEXC.

Nyria trades the spot pairs MEXC opens to API trading. An alert for any other pair is refused.

Each alert becomes a market or limit order, as the strategy sets it. Nothing waits at the broker between alerts. The exit comes from your alert.

Questions

Do I need a paid TradingView plan?
Yes. TradingView sends webhooks on its paid plans only, with two-factor sign-in turned on. Nyria itself is free to test on paper, with no card.
Which MEXC API key does Nyria need?
One you create under API Management in your own MEXC account. Choose Spot trading and leave Withdrawals off.
Do I have to link Nyria's IP address to a MEXC key?
No. MEXC lets you link IP addresses to a key, and it's optional.
Does MEXC take limit orders from a TradingView alert?
Yes. Each alert becomes a market or limit order, as the strategy sets it. MEXC takes API orders only on the pairs it opens to API trading. An alert for any other pair is refused.
Does Nyria hold my MEXC login?
No. A MEXC API key does not need your password. Nyria stores the key and secret encrypted at rest.
Can I test before trading real money at MEXC?
Yes. Nyria works with live MEXC accounts only, so start on paper. Nyria Paper is free, with no card, and runs the same strategy against simulated fills.
How fast does an alert become an order?
Sub-second, alert to order.

From the sources

Next

TradingView alerts to crypto exchanges

Send your first TradingView alert

Trade and test free on paper. No card required.