Developer API Hub

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.

Language

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+
Run locallyPython 3.10+ · No API SDK or extra packages
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.

Python · REST
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 calculator
From demo to your own application

Create 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.

API Authentication

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.

Usage-based API access No Credit Card Required Instant Token Generation

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
REST + WebSockets

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.

Requires Sign-In • APIKey Auth Launch Explorer
MT4
REST + WebSockets

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.

Requires Sign-In • APIKey Auth Launch Explorer
COPY
gRPC + REST

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.

Requires Sign-In • APIKey Auth Launch Explorer

Direct API UI (Swagger)

Inspect OpenAPI specs and test raw HTTP endpoints directly against Terminal Manager clusters.

Protobuf Definitions (gRPC)

Proto 3

Download raw .proto schema files to generate gRPC stubs in any language (Go, Python, Java, C++, Rust, C#).

OpenAPI 3.0 (Postman / Insomnia)

JSON Spec

Import full REST endpoint contracts into Postman, Insomnia, or custom API gateways in one click.

MT5 MT5 OpenAPI 3.0 Spec
mt5.json
MT4 MT4 OpenAPI 3.0 Spec
mt4.json
COPY Trade Copier OpenAPI 3.0 Spec
copy.json
💡 Tip: Import the JSON URL directly into Postman using Import → Link to keep endpoints automatically synchronized.

MetaTrader 4 Client SDKs

Official, open-source client SDKs for MetaTrader 4 across 8 programming languages.

8 Languages • MT4 SDKs
C# MT4

CSharpMT4

dotnet add package MetaRPC.MT4
Python MT4

PyMT4

pip install pymt4
Go MT4

GoMT4

go get github.com/MetaRPC/GoMT4
Java MT4

JavaMT4

implementation 'pro.mrpc:mt4:1.0.0'
C++ MT4

CppMT4

cmake: find_package(CppMT4 REQUIRED)
Rust MT4

RustMT4

cargo add rustmt4
Ruby MT4

RubyMT4

gem install rubymt4
Node.js MT4

NodeMT4

npm install @metarpc/nodemt4

MetaTrader 5 Client SDKs

Official, open-source client SDKs for MetaTrader 5 across 8 programming languages.

8 Languages • MT5 SDKs
C# MT5

CSharpMT5

dotnet add package MetaRPC.MT5
Python MT5

PyMT5

pip install pymt5
Go MT5

GoMT5

go get github.com/MetaRPC/GoMT5
Java MT5

JavaMT5

implementation 'pro.mrpc:mt5:1.0.0'
C++ MT5

CppMT5

cmake: find_package(CppMT5 REQUIRED)
Rust MT5

RustMT5

cargo add rustmt5
Ruby MT5

RubyMT5

gem install rubymt5
Node.js MT5

NodeMT5

npm install @metarpc/nodemt5

Trade Copier Client SDKs

Official, open-source client SDKs for Trade Copier across 8 programming languages.

8 Languages • Copier SDKs
C# COPY

CSharpCopier

dotnet add package MetaRPC.Copier
Python COPY

PyCopier

pip install pycopier
Go COPY

GoCopier

go get github.com/MetaRPC/GoCopier
Java COPY

JavaCopier

implementation 'pro.mrpc:copier:1.0.0'
C++ COPY

CppCopier

cmake: find_package(CppCopier REQUIRED)
Rust COPY

RustCopier

cargo add rustcopier
Ruby COPY

RubyCopier

gem install rubycopier
Node.js COPY

NodeCopier

npm install @metarpc/nodecopier