MetaTrader5 Python API vs MT5 Manager API: Which One Do You Need?

Quick answer: The MetaTrader5 API most people find first is the official MetaTrader5 Python package. It connects to one running MT5 terminal on Windows and lets you read prices and place trades on your own account, which is ideal for traders and quants. The MT5 Manager API works at server level: it creates accounts, moves money and reads trades for every client, which is what brokers, CRMs and client portals need.
“MetaTrader5 API” is one of the most searched MetaTrader terms, and it is also one of the most confusing. A trader building a bot and a broker building a client portal type the same words and need completely different tools. This guide separates the two, shows what each looks like in practice and helps you choose.
Option 1: the MetaTrader5 Python package
MetaQuotes publishes a Python package called MetaTrader5. You install it with pip install MetaTrader5, open an MT5 terminal on the same Windows machine, and the package talks to that terminal.
A minimal example looks like this:
import MetaTrader5 as mt5
mt5.initialize()
tick = mt5.symbol_info_tick("EURUSD")
print(tick.bid, tick.ask)
rates = mt5.copy_rates_from_pos("EURUSD", mt5.TIMEFRAME_H1, 0, 500)
positions = mt5.positions_get()
mt5.shutdown()
With it you can:
- Read live ticks and historical bars for analysis or machine learning
- Send, modify and close orders with
order_send() - Read your own positions, orders and deal history
- Read account information such as balance, equity and margin
What it cannot do:
- Create trading accounts for other people
- Deposit or withdraw money for clients
- Change client leverage or groups
- See all clients’ trades on a server
- Run without a Windows terminal open and logged in
That is by design. It is a terminal API, with the same permissions as a trader sitting at the screen.
Option 2: the MT5 Manager API
The Manager API connects to the MT5 server with manager credentials issued by the broker. It is the interface behind every serious broker back office. With it you can:
- Create live and demo accounts, set group, leverage and permissions
- Deposit, withdraw and apply credit
- Read positions, orders and deals for all accounts you manage
- Receive real-time events when trades or balances change
- Import trade history, run copy trading and pull quotes
The native SDK is C++ and .NET. Most brokers use it through a REST wrapper so web developers can call it in JSON. Our MetaTrader 5 API is delivered that way: Swagger-documented endpoints from $299.
Side by side
| MetaTrader5 Python package | MT5 Manager API | |
|---|---|---|
| Access level | One trading account | All accounts in your groups |
| Runs on | Windows, next to a terminal | Server-side service, any OS via REST |
| Who issues access | Any trader with an account | The broker or platform provider |
| Typical users | Traders, quants, analysts | Brokers, CRM and fintech developers |
| Typical projects | Bots, backtests, dashboards | CRM, traders cabinet, copy trading, prop firm monitoring |
| Cost | Free | Licensed; ours from $299 |
Which one do you need?
- You trade your own account and want automation or data: the Python package (or MQL5).
- You run signals or a fund and want to trade several accounts: still terminal-level, unless your broker offers MAM/PAMM or copy trading.
- You are a broker, grey label or white label: the Manager API. See MT5 API for brokers.
- You build a CRM or client portal: the Manager API, through REST. Read forex CRM integrations.
- You run a prop firm: the Manager API for equity and drawdown monitoring across all challenge accounts.
Common mistakes
- Building a client portal on the Python package. It works in a demo with one account and collapses with real clients.
- Running dozens of terminals as a workaround. Fragile, slow and hard to secure.
- Sharing client passwords to read their trades. The Manager API makes that unnecessary.
- Forgetting MT4. If you still run MT4 accounts, check that your provider covers both. See MT4 vs MT5 Manager API.
Frequently asked questions
Is the MetaTrader5 Python package an official API?
Yes. MetaQuotes publishes the MetaTrader5 package on PyPI. It connects to a running MT5 terminal on Windows and is meant for trading and analysis on that terminal’s account.
Can the MetaTrader5 API create trading accounts?
The Python package cannot. Creating accounts, changing leverage and processing deposits requires the MT5 Manager API with manager credentials from the broker.
Does the MetaTrader5 Python package work on Linux or macOS?
It is built for Windows because it needs the MT5 terminal. People run it on other systems through Windows virtual machines or compatibility layers, with mixed reliability.
What is the best MetaTrader 5 API for brokers?
The MT5 Manager API, ideally through a documented REST wrapper so any developer can use it. Ours is Swagger-based and starts from $299.
Is MetaTrader 5 API access included in your broker package?
Yes. API access is included in the Full Forex Broker Package for $999 per month, with MT5, website, CRM and traders portal.
Building on MT5 as a broker? See the MetaTrader 5 API or tell us what you are building.


