Bring your robot. We host MetaTrader for you.
The Custom Expert Advisor API lets you upload a compiled MetaTrader EA and attach it to a chart on a hosted MT5 environment programmatically — no remote desktop, no manual clicking. You upload the compiled .ex5 file, call one endpoint to attach it to a symbol and timeframe with your chosen inputs, and it starts trading on the next reconnect. Your EA runs the same way a desktop MetaTrader would — except it lives in an isolated container with DLL imports disabled, so your strategy can trade but nothing it does can reach the host.
From .ex5 file to live trades in three calls.
Upload
POST /EaUpload with your compiled EA as base64. Files that are not compiled EAs (executables, archives) are rejected; yours is stored privately for your customer account.
Attach
The attach call (Docs › Expert Advisors) picks the symbol, timeframe and input parameters, and stages the EA onto a chart.
Go live
A /Reconnect starts MetaTrader with your EA attached. Watch /Logs/Experts for its start-up line.
# 1 · upload the compiled EA (returns an eaId) curl -X POST https://api.metatraderapi.net/EaUpload -H "x-api-key: mt5api_…" \ -H "content-type: application/json" \ -d '{ "fileName":"MyRobot.ex5", "fileBase64":"RVg1AnE…" }' # → { "eaId":"3c9e1a52-…", "fileName":"MyRobot.ex5", "sizeBytes":37024, "sha256":"…" } # 2 · attach it to EURUSD H1 with your inputs: a GET with # id=<account id>&eaId=3c9e1a52-…&symbol=EURUSD&timeframe=H1¶ms={"Risk":1.0} # (exact path: Docs › Expert Advisors) # → { "staged":true, "activatesOn":"next-reconnect" } # 3 · start it curl "https://api.metatraderapi.net/Reconnect?id=<account id>" -H "x-api-key: mt5api_…"
Customer code runs — but it stays in its box.
Sandboxed, every time.
Running arbitrary trading code safely is the hard part. Every account gets its own locked-down MetaTrader environment, and uploads are checked before they ever run.
- DLL imports disabled — the EA can't call arbitrary Win32.
- One container per account — isolated, no shared state.
- Upload checks — compiled .ex5 files (MT5) run; executables and archives are rejected; ~750 KB file cap.
- Stored privately — your strategy file is kept per customer, readable only by the service.
For everyone who has a robot but no place to run it.
EA developers
Deploy and demo your product to clients over an API instead of shipping a VPS setup guide.
Prop & fund tools
Run each trader's approved EA on its own isolated MetaTrader environment, provisioned by your platform.
Always-on strategies
Your strategy keeps trading through the night on a hosted MetaTrader environment — no office PC left running.
Frequently asked
Can I run my own Expert Advisor through the API?+
.ex5 with POST /EaUpload, then attach it to a chart with the attach call (see Docs › Expert Advisors). It runs on a hosted MetaTrader environment logged into your account.Do I need my own VPS or a MetaTrader install?+
Is it safe to run custom code? What are the limits?+
Can I set the EA's input parameters?+
/GetEaParams. Inputs are written to a .set preset MetaTrader loads on start-up.When does the EA actually start trading?+
/Reconnect starts MetaTrader with your EA loaded; you'll see its initialisation line in /Logs/Experts and it begins running on the chart.Upload your EA. We'll run it.
Connect an account, upload your compiled Expert Advisor, and attach it to a chart in three API calls.