mt2api.Get started
MT4 + MT5 API Built for your next integration

MetaTrader.
Connected.

Bring accounts, market data, and trading into your application. One API for MT4 and MT5. Built for the trading products you’re building.

Subscription API MT4 + MT5 HTTP + WebSocket
your-next-big-idea.ts
01// Less infrastructure. More possibility.
02const quote = await fetch(
03 'https://mt5.mt2api.com/GetQuote' +
04 `?id=${token}&symbol=EURUSD`,
05 { headers: { 'X-Api-Key': apiKey } }
06);
RESPONSE PREVIEW200 OK / JSON
EUR / USD FOREX
1.08426
MT5Quote received
bid 1.08426ask 1.08438Illustrative data
One connected productAccounts. Quotes. Trading.
+ THE MARKET, MEET YOUR STACK +
YOUR STACK. ALREADY INVITED.
Py Python
JS JavaScript
>_ cURL
HTTP API
WebSocket
01 / BUILT FOR YOUR PRODUCT THE CONNECTION BEHIND YOUR BUSINESS.

Your product. Our API.
More possibilities.

Build trading tools, account dashboards, and connected experiences around a single integration.

/ 01

One integration. Both platforms.

Bring MT4 and MT5 accounts into the same product. Use familiar HTTP requests with dedicated routes for each platform.

MT4
mt2api
MT5
/mt4 / /mt5
/ 02

Market data in your product.

Power your market views with individual or batch quotes. Subscribe over WebSocket to bring price updates into your application.

OnQuoteEURUSD1.08426▂▄▃▆▅▇
OnQuoteGBPUSD1.27351▅▃▆▄▇▆
OnQuoteUSDJPY146.820▃▅▂▄▃▆
SAMPLE EVENTS / HTTP + WEBSOCKET
/ 03

Keep account connections separate.

Build around multiple account sessions with isolated workers and trading queues. Stored connection credentials use AES-GCM encryption.

session_01ISOLATED
session_02ISOLATED
/ 04

Turn your trading logic into action.

Read balances and positions, place and modify orders, close trades, and reconcile history—all from your application.

GET /AccountSummaryGET /OpenedOrdersSee an API example
02 / HOW IT CONNECTS YOUR APPLICATION. CONNECTED.

From your application.
To your trading accounts.

One integration for account information, market quotes, and trading requests.

Your application

Any language. Your logic.

YOU BUILD HERE
HTTP / WS
SUBSCRIPTION API

mt2api

Sessions. Requests. Events.

ACCOUNTS + MARKET DATA
TERMINAL BRIDGE

MT4 / MT5

Connected to your broker.

YOUR BROKER ACCOUNTS

Designed for the way you build: cloud API and self-hosted subscription options.

Compare options
03 / HELLO, MARKETS START WITH A REQUEST.

Fits your stack.
Moves your product forward.

Python, JavaScript, or a simple HTTP request. Get a feel for the integration before choosing your subscription.

  1. 01

    Authenticate your application

    Your API key identifies requests to the service.

  2. 02

    Connect a trading account

    Use the broker’s server name and account credentials to create a session.

  3. 03

    Build your experience

    Read account data, access quotes, and bring trading operations into your product.

Read the API docs
account.pyREAD-ONLY REQUEST
import os
import requests

# Use your API key and an existing MT5 session token.
response = requests.get(
    "https://mt5.mt2api.com/AccountSummary",
    headers={"X-Api-Key": os.environ["MTAPI_API_KEY"]},
    params={"id": os.environ["MTAPI_SESSION_TOKEN"]},
    timeout=30,
)

# mt2api may return API errors with HTTP 201.
if response.status_code != 200 or response.headers.get("X-MtApi-Error-Code"):
    raise RuntimeError("Account request failed; check the session.")

account = response.json()
print(account["equity"], account["currency"])

DEVELOPER NOTE

HTTP 201 can contain an API error. Check X-MtApi-Error-Code and the response body. Examples show the current preview API. Platform and broker coverage is still being validated.

04 / SUBSCRIPTIONS

Start small.
Build something bigger.

MetaTrader connectivity from $9 a month.
A clear monthly price. No annual commitment.

MONTHLY PLANS · MT4 + MT5
YOUR FIRST INTEGRATION

Starter

For independent developers turning a trading idea into a working product.

$9/ month
USD · billed monthly
1 active cloud connection$9 per connection / month
Get started

WHAT’S INCLUDED

  • Connect one MT4 or MT5 account
  • Account data, quotes, and trading
  • HTTP and WebSocket access
  • Cloud hosting included

One idea. One account. Get building.

YOUR INFRASTRUCTURE

Self-hosted

For businesses that want to run the API in an environment they control.

$199/ month
USD · billed monthly
1 production deploymentSoftware subscription · hosting separate
Get started

WHAT’S INCLUDED

  • MT4 and MT5 in one deployment
  • No per-account software charges
  • Docker-based installation
  • Your servers and configuration

Account capacity depends on your infrastructure.

Cloud limits count simultaneous MT4 or MT5 account sessions. Self-hosted pricing covers software for one production deployment; servers and infrastructure are paid separately. API throughput and broker availability remain subject to validated service limits. Prices exclude applicable taxes.

Your next connection starts here.

Explore your plan in the mt2api app, or read the API documentation to prepare your integration.

Read the docs
05 / BEFORE YOU GET STARTED

Good questions.
Clear answers.

Explore subscription options
What can I build with mt2api?

Connect MetaTrader account data to your dashboards, bring quotes into your applications, or integrate order management into your trading tools. mt2api provides the API connection; your product supplies the user experience, trading logic, and risk controls.

How will subscriptions work?

Our monthly prices are $9/month for Starter with one active cloud connection, $49/month for Growth with ten active cloud connections, and $199/month for one self-hosted production deployment. Prices are in USD, billed monthly, and exclude applicable taxes. No annual commitment is required. Visit app.mt2api.com to get started.

What counts as an active connection?

An active connection is one simultaneously connected MT4 or MT5 account session. Starter includes one; Growth includes ten across both platforms. These are concurrent connection allowances, not claims of unlimited API throughput. Self-hosted has no per-account software charge, but capacity depends on your servers and workload.

Does mt2api support both MT4 and MT5?

Yes. The API has separate MT4 and MT5 routes for accounts, quotes, and trading. Available operations and response fields vary by platform. The current implementation is in preview, so compatibility should be checked for your broker and required workflow before production use.

Can I use my existing broker account?

mt2api connects to MetaTrader trading accounts using broker server details and account credentials. Current demo validation covers MT4 read-only connections at IG and IC Markets, and core trading workflows on MT4 and MT5 at IC Markets. Other brokers and workflows still need validation.

Can I deploy on my own infrastructure?

Yes. The self-hosted subscription is $199/month for one production deployment, with no per-account software charge. You pay for and manage your servers separately. The current implementation runs MetaTrader terminals within Docker and requires prepared terminal templates. Account capacity depends on your infrastructure and workload; setup services and dedicated support are not included in the displayed software price.

BUILD YOUR NEXT TRADING PRODUCT.

Your next big idea.
One API away.

Connect your business to MT4 and MT5.

Start building
BUILT FOR YOUR NEXT INTEGRATIONMT4 + MT5 / SUBSCRIPTION API / BUILT FOR BUSINESS