# fxapis > fxapis is a hosted REST API for MetaTrader 5 (MT5). Connect an MT5 account with its login, password and server, then trade it and read its positions and history over HTTPS. MetaTrader 5 runs on fxapis's side, hosted in the EU, so customers install nothing and run no VPS. MT5 only; MT4 is not supported. Who it is for: - Developers building trading products on MetaTrader 5: signal providers offering click-to-trade, copy-trading services, prop firms, and trading apps. What it does: - Connect an MT5 account by login, password and server. Prepare up to 200 accounts in one call. - Connection modes per account: always_on; warm_on_demand (brought online on demand, taken offline after 15 idle minutes); cold. - Market and pending orders, partial close, modifying stop loss and take profit, and a margin/profit calculator. - Multi-account orders (execution waves): one trade placed on many accounts at once, with per-account sizing, barrier policies, and a result for each account. - Idempotency keys, honoured for 24 hours, on market orders, pending orders, closes and multi-account orders: retrying with the same key never places a second order. Stop changes and cancels are safe to repeat. - An order whose outcome is unknown is confirmed against the broker's history, never guessed. - History of orders, deals and positions. - Scoped API keys, including reduce-only keys. Keys are labelled live or test, but both reach real brokers: test with demo accounts. - An OpenAPI specification, code samples in 13 languages per endpoint, and a web console. A TypeScript SDK exists; its npm package is being prepared. - TradingView alert webhooks to MT5 (/tradingview) and a hosted MCP server for AI agents (/mcp). Measured performance: - Account online about 9.6 s after connecting. - Broker round trip 96–110 ms from our EU servers to a London broker's trade server. - Multi-account order spread (first account's order to the last) of 17 / 26 / 30 ms at 10 / 50 / 100 accounts, in a local benchmark against an instant broker; every multi-account order reports its own spread. What it is not: - Not MT4: MetaTrader 5 only. - No outbound webhooks for account or trade events. (Receiving TradingView alerts is a separate feature.) - No SLA without a contract. - Not a broker: it holds no funds and gives no investment advice. Company: - Operated by El Wizard, Jacó, Puntarenas 61101, Costa Rica. Contact: support@fxapis.com. Pricing (USD): - Trial: 14 days, 2 demo accounts, every feature, no card. One per person. - Production: $99 a month (or $990 a year) with 5 accounts included; $5 per account for 6–50, $3 per account for 51–250; 2,000 opening executions per account a month, pooled, then $10 per 1,000; always-on $7 per account a month; 2 demo accounts free. - Business: $749 a month (or $7,490 a year) with 250 accounts included; $2 per account for 251–1000; 3,000 opening executions per account a month, pooled, then $8 per 1,000; always-on $8 per account a month; 10 demo accounts free. - Enterprise: priced with you — your own price and limits, monthly or annual, paid by card or transfer. - Usage beyond a plan (accounts, always-on days, executions) is measured as it happens and charged after each month. Executions stop at twice the allowance. Closing is never refused for billing. ## Product - [fxapis — The MetaTrader 5 API](https://fxapis.com/): What fxapis is, how it works, and what it costs. - [Overview](https://fxapis.com/developers) - [Changelog](https://fxapis.com/changelog) - [Blog](https://fxapis.com/blog): Short articles on automating MetaTrader 5: hosting, credentials, testing, orders, choosing an API. - [Get an API key](https://fxapis.com/sign-up): Create a workspace and an API key. ## Platform - [MT5 API](https://fxapis.com/mt5-api): The MetaTrader 5 REST API: connecting accounts, trading, history, keys. - [Pricing](https://fxapis.com/pricing): The trial, plans priced per account, pooled executions, always-on, annual prices, and a calculator. - [TradingView alerts](https://fxapis.com/tradingview): TradingView alert webhooks that place orders on MT5 accounts. - [AI agents (MCP)](https://fxapis.com/mcp): A hosted MCP server so AI agents can use fxapis. - [Benchmarks](https://fxapis.com/benchmarks): Measured connect time, broker round trip and multi-account order spread, with method. - [Enterprise](https://fxapis.com/enterprise): Your own price and limits for large account counts; request a meeting. ## Solutions - [Signal providers](https://fxapis.com/solutions/signal-providers): Click-to-trade: members take a signal on their own MT5 account. - [Copy trading](https://fxapis.com/solutions/copy-trading): One order placed across many MT5 accounts, sized per account. - [Prop firms](https://fxapis.com/solutions/prop-firms): Connecting and trading many funded MT5 accounts from your platform. - [Trading apps](https://fxapis.com/solutions/trading-apps): Adding MT5 trading to an app without running terminals. ## Compare - [fxapis vs MetaApi](https://fxapis.com/compare/metaapi): fxapis and MetaApi compared. - [MetaApi alternatives](https://fxapis.com/alternatives/metaapi): Alternatives to MetaApi for MT5 API access. - [CopyFactory alternative](https://fxapis.com/alternatives/copyfactory): Alternatives to MetaApi CopyFactory for copying MT5 trades. ## Products - [Overview](https://fxapis.com/products) - [Signals platform](https://fxapis.com/products/signals-platform) - [Custom development](https://fxapis.com/products/custom-development) ## Legal - [Terms](https://fxapis.com/legal/terms): Terms of service. - [Privacy](https://fxapis.com/legal/privacy): Privacy policy. - [Data](https://fxapis.com/legal/data): Data processing, retention and deletion. - [Risk disclaimer](https://fxapis.com/legal/disclaimer): Trading risk disclaimer. - [Refunds](https://fxapis.com/legal/refunds): Cancellation and refund policy. ## Blog - [Changelog #1 — Sign in from Claude, copy trading, and more](https://fxapis.com/blog/changelog-1-sign-in-from-claude-copy-trading): Week of 12 October 2026: sign in to fxapis from Claude and ChatGPT, managed copy trading, webhooks that catch up after downtime, and security, data and SDK updates. - [Why an MT5 Trade Can Fail Even When Your API Request Is Correct](https://fxapis.com/blog/why-mt5-trades-fail): Market closed, invalid volume, invalid stops, no margin, wrong symbol: five reasons a broker refuses a valid MT5 order, and how to read and prevent each. - [How to Choose an MT5 API: A Developer's Checklist](https://fxapis.com/blog/how-to-choose-an-mt5-api): Twelve questions to ask before you build on an MT5 API: platforms, order types, hosting, errors, retries, multi-account trading, security, pricing and docs. - [Market Orders vs Pending Orders in an MT5 API](https://fxapis.com/blog/mt5-market-orders-vs-pending-orders): A market order trades now; a pending order waits at the broker for your price. How each behaves in an MT5 API, with one example and a comparison table. - [How to Prevent Duplicate MT5 Orders From Retries and Double Clicks](https://fxapis.com/blog/prevent-duplicate-mt5-orders): Why a retry or a double click can open two MT5 positions, and how one request identifier — an idempotency key — makes every order safe to send again. - [How to Test an MT5 API Without Risking Real Money](https://fxapis.com/blog/test-mt5-api-without-risking-real-money): Test an MT5 trading API safely: connect a broker demo account, read from it, place a small demo order and check the result. A test key alone is no sandbox. - [TradingView to MT5: EA Bridge vs Hosted API](https://fxapis.com/blog/tradingview-to-mt5-ea-bridge-vs-hosted-api): Two ways to turn TradingView alerts into MetaTrader 5 trades: an Expert Advisor bridge on a VPS, or a hosted alert URL. Setup, upkeep and failures compared. - [MT5 Investor Password vs Trading Password: Which Does Your App Need?](https://fxapis.com/blog/mt5-investor-password-vs-trading-password): The investor password can only watch an MT5 account; the trading password can trade it. Which one your app needs, why the wrong one fails late, and how to ask. - [How to Find Your MT5 Broker Server Name](https://fxapis.com/blog/find-mt5-broker-server-name): Where to find your MetaTrader 5 server name on desktop, mobile and in your broker's email, why demo and live differ, and the mistakes that break a login. - [Trade MetaTrader 5 from Node.js with the fxapis TypeScript SDK](https://fxapis.com/blog/mt5-api-typescript-sdk): Install the fxapis TypeScript SDK, connect an MT5 account, place an idempotent market order and handle every failure — from Node.js, with no MetaTrader terminal. - [Trade MetaTrader 5 from Python with the fxapis SDK](https://fxapis.com/blog/mt5-api-python-sdk): pip install fxapis: connect an MT5 account, place orders that never double-fill, and let the SDK retry only what is safe — from Python on Linux, macOS or Windows. - [Runnable MT5 API Examples in Python, Node.js and curl](https://fxapis.com/blog/mt5-api-examples-python-node-curl): Three runnable fxapis examples — a quickstart, click-to-trade for signal providers and a trade copier — each in Python, Node.js and curl, against a demo account. - [Connect Claude, Cursor and VS Code to MetaTrader 5 with MCP](https://fxapis.com/blog/connect-ai-agents-to-metatrader-5-mcp): Give Claude, Claude Code, Cursor or VS Code access to your MT5 accounts through fxapis's hosted MCP server — with a scoped key, so the agent can only do what you allow. - [Postman, TradingView and n8n Templates for the MT5 API](https://fxapis.com/blog/mt5-api-postman-tradingview-n8n): Explore the fxapis MT5 API in Postman, send TradingView alerts straight to MT5, and automate trades with n8n — ready-made templates from fxapis-integrations. - [Build an MT5 Trading Dashboard with the Next.js Starter](https://fxapis.com/blog/nextjs-mt5-trading-dashboard-starter): A working Next.js app on the fxapis MT5 API: connect an account, watch its positions and place a trade behind a confirm step — with the API key kept on the server. - [MetaTrader 5 Python Package vs REST API: Which Should You Use?](https://fxapis.com/blog/metatrader5-python-package-vs-rest-api): The official MetaTrader5 package needs Windows and a running terminal; a hosted REST API needs neither. Setup, hosting, languages and upkeep compared. - [Can You Trade MT5 When Your Computer Is Turned Off?](https://fxapis.com/blog/trade-mt5-with-computer-off): What keeps working when your MetaTrader 5 terminal is closed, what stops, and three ways to keep MT5 automation running without leaving your own computer on. - [MT5 API Key vs Broker Login: What's the Difference?](https://fxapis.com/blog/mt5-api-key-vs-broker-login): MetaTrader 5 has no API key of its own. Here is what an API key, an MT5 login, a trading password and a server name each do, and where you get each one. - [Do You Need a VPS to Automate MetaTrader 5?](https://fxapis.com/blog/do-you-need-a-vps-to-automate-metatrader-5): Local terminal, rented VPS or hosted API: where MT5 automation actually runs, what each setup asks you to maintain, and when a VPS is the right answer. ## Documentation - [Docs llms.txt](https://docs.fxapis.com/llms.txt): Index of every guide and API reference page, as Markdown links. - [Docs llms-full.txt](https://docs.fxapis.com/llms-full.txt): The full documentation in one Markdown file. - [Quickstart](https://docs.fxapis.com/quickstart): From an API key to a filled order. - [API reference](https://docs.fxapis.com/api-reference): Every endpoint, with parameters, responses and code samples. - [OpenAPI specification](https://api.fxapis.com/docs/json): The raw OpenAPI 3.1 document. ## Optional - [llms-full.txt](https://fxapis.com/llms-full.txt): This summary in more detail: API conventions, limits and plans. - [Blog feed](https://fxapis.com/blog/rss.xml): Every blog post; each is also served as Markdown at its URL followed by .md.