# Mt5api

Mt5api is a self-hosted development app. MetaTrader 5 REST API built with FastAPI. It is open source and self-hosted, installable on Docker Hub.

Canonical page: https://ourlocalhost.com/app/6509/mt5api

## Description

MetaTrader 5 REST API built with FastAPI. mt5api exposes MT5 market data, account information, trading history, order validation, and terminal operations over HTTP, with API-key authentication and OpenAPI documentation. It is aimed at developers and traders who want to integrate MetaTrader 5 into automated trading or analytics pipelines. Note the server must run on Windows because the underlying client connects through the MetaTrader 5 terminal; live order submission is disabled by default and requires explicit environment configuration.

## Platform availability

Available on 0 of 10 platforms.

## Health score

62/100 (Good), based on 5 of 5 factors.
- Maintained: 100 (last commit 5 days ago)
- Popular: 19 (8 GitHub stars)
- Easy to install: 10 (0 install platforms, Docker image)
- Light to run: 50 (2 GB minimum RAM)
- Security check: 100 (no serious findings, CI, tests)

## Links

- Docker Hub: https://hub.docker.com/r/projecteaina/mt-api
- GitHub: https://github.com/dceoy/mt5api
- Official website: https://dceoy.github.io/mt5api/
- Documentation: https://dceoy.github.io/mt5api/

## Common questions

### Does the MT API server need to run with the MetaTrader 5 terminal?

The server must run on the Windows machine where the MetaTrader 5 terminal is installed and logged in. HTTP clients can connect from other operating systems.

### Can I put MT API under a reverse-proxy path prefix?

Set MT5API_ROUTER_PREFIX to the desired prefix, such as /api/v1. If omitted, routes are served at root level.

### Does MT API support response formats other than JSON?

Yes, it supports JSON and Apache Parquet response formatting through content negotiation.

---
Source: Our Local Host (https://ourlocalhost.com/app/6509/mt5api), the self-hosted and open-source app directory.
