What the error means
$ python3 -m pip install MetaTrader5 ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none) ERROR: No matching distribution found for MetaTrader5
As of November 2026, version 5.0.6231 on PyPI has wheels for CPython 3.6 to 3.14, all built for Windows x86-64. There is no source package, so pip on macOS has nothing it can install. A newer Python, a virtual environment or Homebrew does not change that.
Even on Windows, the package does not talk to your broker. It talks to an MT5 terminal running on the same computer, which must be installed and logged in.
Sources
Your options on a Mac
| Option | How it works | What it costs you |
|---|---|---|
| Windows virtual machine | Run Windows, MT5 and Windows Python in a VM such as Parallels or UTM. | A Windows licence, memory, and a VM that must stay on while your code runs. |
| Wine | Run the MT5 terminal and a Windows Python under Wine. mt5linux bridges calls from your Mac Python over RPyC. | Setup time, and fixes when Wine, macOS or MT5 updates break it. |
| Docker image | Run a container with MT5 under Wine, such as gmag11/MetaTrader5-Docker, which also gives a VNC desktop. | At least 4 GB of RAM per container, plus image upkeep. |
| Windows VPS | Rent a Windows server and run the official package there. | A monthly VPS bill, Windows updates and terminal restarts. |
| Hosted API | A service runs the terminal. Your Mac Python sends HTTPS requests. | A monthly fee, and no tick stream or Expert Advisors with FiveSocket. |
Python on a Mac with FiveSocket
This runs in any Python 3 on macOS with the requests package. It reads the first linked account's balance and waits if the MT5 session is still logging in.
import os
import time
import requests
base = "https://api.fivesocket.com/v1"
headers = {"Authorization": f"Bearer {os.environ['FIVESOCKET_KEY']}"}
accounts = requests.get(f"{base}/accounts", headers=headers, timeout=30)
accounts.raise_for_status()
account_id = accounts.json()["data"][0]["id"]
while True:
response = requests.get(f"{base}/accounts/{account_id}/balance", headers=headers, timeout=60)
if response.status_code != 202:
break
time.sleep(int(response.headers.get("Retry-After", "5")))
response.raise_for_status()
account = response.json()
print(account["balance"], account["equity"], account["currency"])Positions, closed trades, deals and orders work the same way. Orders need trading turned on for the account first.
Limits
- The API is not a drop-in replacement for the MetaTrader5 package. Function calls such as mt5.account_info() become HTTPS requests.
- There is no tick stream, so copy_ticks_from and similar calls have no equivalent.
- The first read after a session goes idle can take several seconds while MT5 logs in.
Trading leveraged FX and CFDs carries a high risk of losing money quickly. Try any new setup on a demo account first. FiveSocket connects software to your account, and neither FiveSocket nor an AI assistant's output is investment advice.
Frequently asked questions
- Does the MetaTrader5 package work on Apple silicon?
- No. It has only Windows x86-64 wheels, so it does not install in macOS Python on Intel or Apple silicon.
- Is there an MT5 app for macOS?
- MetaQuotes offers MT5 for Mac, but the Python package still installs only on Windows Python.
- How much does FiveSocket cost?
- Plans start at $9.99 a month for one MT5 account. Link your MT5 account and try it free, no card: 24 hours or 100 calls, whichever comes first. Then a 7-day free trial, card required. Cancel anytime. The trial includes one connected MT5 account.