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, start it with a broker account, check it is ready, then place and close an order
Pull the image, start it, check it is ready, place an order. Every command was run for real against a demo account: they are the ones in Quickstart.
§ 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.