Comparisons · 4 min read · 2026-06-11
MetaApi Not Working? Common MT4/MT5 API Issues and When to Switch
By API2Trade Editorial Team

Is MetaApi not working or disconnecting? Use this troubleshooting guide to fix MetaApi connection issues, WebSocket errors, and API downtime before deciding to switch.
When you are managing a live algorithmic trading system, every second of downtime costs money. If you are reading this, you are likely staring at a console error, a dropped WebSocket, or a stalled copy trading queue, wondering why MetaApi is not working.
Because cloud wrappers involve multiple moving parts—your backend, their cloud sync server, their headless virtual terminal, and the broker—diagnosing a MetaApi error can be frustrating.
Before you assume it is total MetaApi downtime, run through this technical troubleshooting checklist. We will cover the most common points of failure, how to fix them, and how to know when it is time to migrate your infrastructure to a more reliable protocol-level API.
1. Check Your Broker Connection & IP Allowlisting
The most common cause of a MetaApi connection issue is not an API outage; it is a broker rejection. Retail brokers frequently change their server IPs, update their domain names, or deploy strict regional firewalls to prevent DDoS attacks.
- The Fix: Verify that the broker server string you passed during provisioning is exactly what appears in the MT4/MT5 terminal. If the broker recently changed infrastructure, your API's headless terminal will be left polling a dead IP.
- A Note on Prop Firms: If you are connecting to a prop firm, ensure their specific server name hasn't changed during an equity migration. (See our guide on MT5 API for Prop Trading Firms for handling dynamic prop firm servers).
2. Check Account Authorization (Investor vs Master Passwords)
If the API connects but you receive an "Invalid Request" or "Authorization Failed" error when attempting to /OrderSend, you likely have a permission mismatch.
- The Fix: Ensure you provisioned the account using the Master (Trading) Password, not the Investor (Read-Only) Password. If you are only streaming data, an investor password works fine. But any execution requires Master privileges. Also, confirm the broker has not forced a password reset due to inactivity.
3. Check the MT Terminal/Session Status
Because MetaApi relies on spinning up a virtual, headless MetaTrader terminal in the cloud, that terminal can occasionally freeze, crash, or enter an unresponsive state. If your dashboard shows the account as active but trades are not mirroring, the terminal session might be stalled.
- The Fix: You need to forcefully redeploy or restart the provisioned account via your SDK or their dashboard. If you find yourself having to manually restart cloud terminals frequently, you are experiencing the primary drawback of cloud-wrapper architectures.
4. Check API Rate Limits
If your application works perfectly during the Asian session but throws errors when the New York session opens, you are likely hitting an API rate limit. Heavy polling or attempting to execute a mass copy-trading broadcast across hundreds of accounts can trigger throttling.
- The Fix: Audit your code. If you are polling
/AccountSummaryevery second to check for trade closures, stop immediately. Switch to an event-driven architecture using WebSockets.
5. Check WebSocket Disconnects
A frequently searched problem is finding MetaApi disconnected from its WebSocket stream without triggering a clean error catch in your Node.js or Python backend. This leaves your trading bot flying blind.
- The Fix: Implement aggressive heartbeat monitoring. If your WebSocket does not receive a ping within a designated timeframe (e.g., 5 seconds), programmatically kill the connection, request a new session state, and reconnect to ensure you did not miss a critical Stop Loss trigger during the blackout.
6. Check Server Region & Latency
Sometimes the API is technically "working," but the latency is so severe that trades execute with massive slippage. This happens when your broker's servers are in one region (e.g., London LD4) but your cloud API node is hosted in a different region.
- The Fix: Check your node deployment settings. If you cannot specify a GEO-optimized data center to match your broker without incurring massive enterprise fees, you will never solve the latency problem.
What to Do When MetaApi Support is Not Responding
One of the most stressful scenarios for a SaaS founder is facing a production outage while MetaApi support is not responding quickly enough to save client accounts. Because cloud SDKs act as black boxes, you cannot manually restart the underlying TCP connection to the broker yourself. You are entirely at the mercy of their support desk.
If you have run through the checklist above, the issue is likely a failure on the infrastructure side.
When Is It Time to Migrate?
Troubleshooting occasional bugs is part of software development. However, if you are experiencing repeated outages, unpredictable latency spikes, or terminal freezes during high-volume trading hours, your architecture is restricting your growth.
You should consider migrating to a direct, protocol-level REST API (like API2Trade) if:
- You are managing more than 50 active client accounts.
- You require millisecond execution speed for copy trading or scalping algorithms.
- You are tired of paying per-account fees for heavy, virtualized cloud terminals.
By stripping away the headless cloud terminals, API2Trade establishes a direct protocol socket with the broker, resulting in vastly improved stability and SaaS-friendly economics. (Read our full MetaApi Migration Guide to see how easy it is to remap your endpoints).
Ready to Fix Your Infrastructure?
Send us your current setup and we'll tell you if API2Trade can replace it.
👉 Contact API2Trade Engineering Today
Ready to integrate the MetaTrader API?
Set up in under 30 minutes. No terminal required.
Get Started →