MT5 REST API. Try it live.
Connect Python, JavaScript, C#, Go, Java, C++, Rust or Ruby to MetaTrader. Run a real MT5 demo below. MetaRPC hosts the terminals, so your application can run on Linux, macOS or Windows. MT4 APIs are also available.
Guests can try the demo without signing up. TRIAL limits apply; signed-in runs use your balance.
Open a demo account and connect to MT5
Choose a language and run a complete REST example: open a MetaQuotes demo account, connect, read its account summary, then disconnect. No trades are placed.
Your signed-in user key is used automatically; guests use TRIAL. Trial limits apply. With your own key, normal terminal billing applies until disconnection.
Run Python or JavaScript here, or download the example to run locally. Python loads its browser runtime on the first run. Every example uses REST and calls Disconnect during cleanup.
Run locally · Python 3.10+
python mt5_demo.py
Local downloads use TRIAL by default. Set MRPC_API_KEY to use your own key. A five-minute terminal expiry is requested as a cleanup fallback.
Loading example…Clear, hourly terminal pricing
Standard terminal: $5 per 720 hours. Volume rates reach $2 after 1,500,000 combined account-hours in a calendar month. Billed hourly; lower rates apply to subsequent usage.
Open the pricing calculatorCreate a free account, get your API key after email verification, then connect your broker account with the same REST endpoints. Running terminals uses your balance.
Get Your Free API Key
Connect to mt5.mrpc.pro and mt4.mrpc.pro with your personal API key. Register at https://mrpc.pro/signup to receive your key after email verification. Usage is billed hourly; any welcome credit is shown in your dashboard.
Interactive Client Explorers
Requires sign-in. All requests execute with your authenticated APIKey. Connect directly via /ConnectEx (which auto-generates your session token), then stream in real time.
MT5 Client API Explorer
Authenticated playground for MetaTrader 5. Connect directly via /ConnectEx (auto-generating your session ID), inspect balance and open orders, and stream live ticks.
MT4 Client API Explorer
Authenticated playground for MetaTrader 4. Connect directly via /ConnectEx (auto-generating your session ID), query account margin and open positions, and stream live quotes.
Trade Copier API Explorer
Authenticated playground for cross-broker trade replication. Create and manage copier instances via /Start, set risk models (LotMultiplier, FixedLot, Equity), and stream real-time trade logs.
Direct API UI (Swagger)
Inspect OpenAPI specs and test raw HTTP endpoints directly against Terminal Manager clusters.
Protobuf Definitions (gRPC)
Proto 3Download raw .proto schema files to generate gRPC stubs in any language (Go, Python, Java, C++, Rust, C#).
OpenAPI 3.0 (Postman / Insomnia)
JSON SpecImport full REST endpoint contracts into Postman, Insomnia, or custom API gateways in one click.
MetaTrader 4 Client SDKs
Official, open-source client SDKs for MetaTrader 4 across 8 programming languages.
MetaTrader 5 Client SDKs
Official, open-source client SDKs for MetaTrader 5 across 8 programming languages.
Trade Copier Client SDKs
Official, open-source client SDKs for Trade Copier across 8 programming languages.