MetaTrader 4 & 5 API · REST · WebSocket · Webhooks

Connect any MT4 & MT5 account to your software

PropMetaAPI runs a real MetaTrader terminal for each of your accounts on our servers, logged in to the broker around the clock, and gives you one API for all of them: read balances, positions and history, stream live prices and events, and place trades — over REST, WebSocket and signed webhooks.

  • 5 accounts free for 10 days
  • No payment for the trial
  • Any MT4 / MT5 broker
  • MT4 + MT5One API for both platforms and any broker
  • 24/7Terminals kept logged in and reconnected for you
  • 1 sRisk checks on every active account
  • 0Terminals, VPS or Expert Advisors for you to run
Why PropMetaAPI

MetaTrader has no web API. We built one.

MT4 and MT5 accounts can only be reached through a running terminal. PropMetaAPI runs and watches those terminals for you and turns them into a clean, documented API.

Doing it yourself

  • A Windows VPS and a MetaTrader terminal for every account
  • An Expert Advisor bridge you write, deploy and keep alive
  • Reconnects, broker server files and terminal updates by hand
  • Polling every account to notice a trade or a margin change
  • Risk rules that stop working when your own system is down

With PropMetaAPI

  • Register an account with its login — we start and run the terminal
  • One REST API and one WebSocket for all your accounts
  • Connections watched and re-established around the clock
  • Trades, deals and equity changes pushed to you as events
  • Drawdown limits enforced by the gateway every second
How it works

From API key to first trade in minutes

Your software calls one API. We run the MetaTrader side.

  1. 1

    Get your API key

    Start the free trial or choose a plan. Your access is created automatically and the key is waiting in your account panel.

  2. 2

    Add the broker and account

    Pick an approved broker or upload its server file (servers.dat for MT5, .srv for MT4), then register the account's login and password. A check logs in once and confirms it.

  3. 3

    Activate

    The gateway starts a dedicated MetaTrader terminal for the account on our servers and keeps it connected to the broker 24/7.

  4. 4

    Build

    Read balances and history, stream prices and events, and trade from your own code over REST, WebSocket and webhooks.

Features

Everything MetaTrader does, as an API

Read, stream, trade and protect accounts — with the reliability details already handled.

  • Accounts & positions

    Balance, equity, margin and free margin, open positions and pending orders — with connected, stale and asOf so you always know how fresh the figures are.

  • Complete trading

    Market and pending orders, SL / TP as a price or a distance (pips, points, price, account money or % of balance), modify, partial close, close-by and close-all.

  • Never trades twice

    Every trade carries an Idempotency-Key: resend after a timeout and the order is not placed again. ?wait returns the final result in the same call.

  • Live WebSocket

    One multiplexed socket for all accounts: quotes, bars, order book (MT5), profits, order updates, account state and your event feed.

  • Signed webhooks

    Events pushed to your HTTPS endpoint — HMAC-signed, in order, at least once — plus an event feed with a cursor as the safety net.

  • History & statistics

    Deals and closed positions by time range, in UTC and broker time. Never a silently short list: while history is loading you are told to retry.

  • Risk trackers

    Daily, weekly, monthly or lifetime drawdown and profit limits checked every second — notify, close all positions, or close and block new orders.

  • Trailing stops & equity watches

    Run on the gateway itself, so they keep protecting positions while your software is offline.

  • Copy trading

    Copy positions between your own accounts with a volume ratio and filters; every copy, skip or failure is reported as an event.

  • Market data

    Symbols and their trading specs, live quotes, bars and ticks straight from the broker's own terminal.

  • Any MetaTrader broker

    Use an approved broker or upload its server file once — your own accounts can use it immediately.

  • Security built in

    Keys scoped to read / trade / manage, to some accounts and to an expiry date, an IP allowlist, instant rotation, and passwords encrypted with AES-256-GCM.

For developers

A clean API, documented end to end

Place an order and get the filled position back in the same call, stream prices for every account over a single socket, and verify every webhook with an HMAC signature.

  • Plain HTTPS and JSON with a Bearer key — any language works
  • Field names follow MetaAPI conventions (POSITION_TYPE_BUY, DEAL_ENTRY_OUT …)
  • One error body with a stable code and a retryable flag
  • OpenAPI reference for every route, with curl examples
place-order.sh
curl -X POST "https://api.propmetaapi.com/v1/accounts/$ACCOUNT_ID/orders?wait=30" \
  -H "Authorization: Bearer $GW_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ "symbol": "EURUSD", "side": "BUY", "volume": 0.1,
        "sl": 20, "slUnits": "RELATIVE_PIPS",
        "tp": 40, "tpUnits": "RELATIVE_PIPS" }'

# 200 OK
{
  "type": "PLACE_ORDER",
  "status": "SUCCEEDED",
  "result": { "positionId": "51234567", "volume": 0.1, "price": 1.08412 }
}
Who it is for

Built for products that run on MetaTrader

  • Prop firms

    Keep a pool of checked accounts in standby, activate one when you hand it to a trader, and let risk trackers enforce daily and overall drawdown every second — even when your own system is down.

  • Copy trading & signals

    Pick up the leader's trades from events and place follower orders with idempotent calls, or let the gateway copy between your accounts.

  • Journals & analytics

    Import complete trade history with statistics, then follow every new deal by webhook instead of downloading history again on a timer.

  • Trading apps & dashboards

    Show live balances, positions and prices in your web or mobile app. Your server talks to PropMetaAPI — your users never install MetaTrader.

Pricing

Simple plans by active accounts

Every plan includes the full API. You pay for how many accounts stay connected at once — and can register three times as many.

Free Trial

Freefor 10 days
  • 5 active MT4/MT5 accounts
  • 10 days of access
  • MT4 and MT5 accounts from any broker
  • REST API: quotes, orders, positions, history
  • Real-time WebSocket streaming
  • Signed webhooks for account and trade events
  • Trailing stops, relative SL/TP, close by symbol
  • No payment details needed
  • Verified work email required — one trial per organization
Start free trial

Starter

$500/ month
  • 100 active MT4/MT5 accounts
  • 1 month of access
  • MT4 and MT5 accounts from any broker
  • REST API: quotes, orders, positions, history
  • Real-time WebSocket streaming
  • Signed webhooks for account and trade events
  • Trailing stops, relative SL/TP, close by symbol
  • Renew any time — the same API key
  • Support on Telegram (@subscriber) and by ticket
Choose plan

Growth

$1,000/ month
  • 200 active MT4/MT5 accounts
  • 1 month of access
  • MT4 and MT5 accounts from any broker
  • REST API: quotes, orders, positions, history
  • Real-time WebSocket streaming
  • Signed webhooks for account and trade events
  • Trailing stops, relative SL/TP, close by symbol
  • Renew any time — the same API key
  • Support on Telegram (@subscriber) and by ticket
Choose plan

Business

$2,000/ month
  • 500 active MT4/MT5 accounts
  • 1 month of access
  • MT4 and MT5 accounts from any broker
  • REST API: quotes, orders, positions, history
  • Real-time WebSocket streaming
  • Signed webhooks for account and trade events
  • Trailing stops, relative SL/TP, close by symbol
  • Renew any time — the same API key
  • Support on Telegram (@subscriber) and by ticket
Choose plan

Prices in USD. Renewing adds a new period after the current one and keeps the same API key. Need more than 500 accounts? Talk to us on Telegram.

FAQ

Questions, answered

Do I need to run MetaTrader, a VPS or an Expert Advisor?
No. Every active account gets its own MetaTrader terminal on our servers, kept logged in to the broker and reconnected when the connection drops. You only call the API over HTTPS.
Which brokers are supported?
Any broker that offers MetaTrader 4 or 5. Approved brokers are ready to use; for any other, upload its server file once (servers.dat for MT5, the .srv files for MT4) and your accounts can use it right away.
What is an active account?
An account with a permanent connection: it streams live data, trades instantly and runs trailing stops and risk trackers. Your plan sets how many can be active at once. You can register three times as many and keep the rest in standby, where reads and trades still work after a short login.
How does the free trial work?
5 active accounts for 10 days with the full API and no payment. Register with your work email, confirm it, then order the trial. It is available once per organization (email domain), for accounts that have never had an API subscription.
Who can open an account?
Companies and professional teams. Register with a work email on your company website's domain — personal, free and temporary mailboxes (Gmail, Yahoo, Outlook, iCloud …) are not accepted — and confirm it from the email we send.
What happens when my plan ends?
You receive SUBSCRIPTION_EXPIRING events 3 days and 1 day before the end. Afterwards the API answers 402, but you can still view and close positions, cancel orders and close everything, so you can always reduce risk. Renewing keeps the same key and accounts.
How are trading passwords protected?
Passwords are encrypted with AES-256-GCM, never returned by the API and wiped when you delete an account. Your API keys can be limited by permission, by account, by expiry date and to your servers' IP addresses.
Which programming languages can I use?
Any language that can send HTTPS requests and open a WebSocket. The documentation shows curl, Node.js, Python and PHP examples, and the API reference describes every route.
How do I get support?
Message us on Telegram at @subscriber or use the contact page — we help with integration questions, brokers and accounts.

Start building on MetaTrader today

Connect your first accounts in minutes with the free trial — no payment, the same API as every paid plan.