Skip to content
MIT licensed Docker Hub any MetaQuotes broker

Trade MetaTrader 5 over plain HTTP — headless, any broker.

mt5-gateway runs the real MT5 terminal under Wine in Docker and exposes it as a REST API. Point it at any MetaQuotes broker with three env vars and it logs itself in on boot — no Windows, no VNC, no manual clicking.

EURUSD 1.08501 ▲· XAUUSD 2412.30 ▼· GBPUSD 1.27180 ▲· USDJPY 148.220 ▼· XAUUSD 2412.30 ▼· EURUSD 1.08501 ▲· GBPUSD 1.27180 ▲

Pull the image, run it headless against a broker account, and confirm it's alive, logged in, and trading-ready — all from the terminal
Pull the image, run it headless, confirm it's alive and trading-ready — the exact commands from Quickstart. Recorded with VHS; the tape is committed and regenerable.
§ 01

How it works, in three steps

1

Give it a server name

Not an IP, not a broker directory file — just the broker's server name (e.g. Exness-MT5Trial9), your login, and your password.

2

It resolves and logs in

The gateway turns that name into a connectable address, launches the real MT5 terminal under Wine, and authorizes — headless, no VNC.

3

Trade over REST

Orders, positions, ticks, and history — all plain HTTP, with idempotency keys, a kill switch, and broker-truth reconciliation.

§ 02

What you get

  • Headless login, any broker


    No servers.dat, no manual click-through. Give it a server name and it resolves and connects on its own. See why this exists.

  • REST API + Swagger


    Every endpoint documented and callable from /apidocs the moment the container is up. See the API reference.

  • Idempotent orders


    A stable Idempotency-Key makes retries safe — replay the same response instead of a duplicate order. Full detail in the API reference.

  • Kill switch + audit log


    POST /kill halts trading instantly; every order is append-only logged. See health, kill switch, and metrics.

  • Broker-truth reconciliation


    GET /reconcile returns real positions, orders, and deals — recover strategy state after a restart or an ambiguous response.

  • Drop-in broker for qkt


    qkt — an event-driven trading engine — talks to this gateway out of the box. See Using with qkt.

§ 03

Get started

Built on the foundation laid by slowfound in metatrader5-quant-server-python.