Safety & security
MetaPortAPI can place real trades, so it ships with conservative defaults.
Defaults
Section titled “Defaults”- Localhost only. Only programs on the same computer can connect.
- Demo-only lock. Trading commands are refused on live accounts until you switch Demo accounts only off.
- Max lot per order. Set a limit in the inputs and larger orders are refused before they reach MT5.
- Algo Trading. MT5 itself blocks orders until you enable the Algo Trading button.
Going live
Section titled “Going live”- Test your code thoroughly on a demo account.
- Set a realistic Max lot per order (0 = no limit).
- Turn Demo accounts only off.
Remote access
Section titled “Remote access”If you enable Allow remote connections:
- Open the port only to the IP addresses you trust (Windows Firewall rule, VPS security group).
- Prefer a VPN, SSH tunnel or a private network over exposing the port to the internet.
- Never forward the API port on your home router without an IP restriction.
Webhooks
Section titled “Webhooks”To trigger orders from services like TradingView, put a small, authenticated bridge in front of MetaPortAPI rather than exposing the port directly. [WEBHOOK GUIDE]