Fintech and trading apps

MetaTrader 5 trading, inside your own product.

Your users already trade on MT5 at the broker they chose. Let them connect that account to your app — a journal, a portfolio tool, a strategy builder, a community — and trade it from there. You design the experience; we run MetaTrader.

  • Users keep their broker
  • Your UI, your brand
  • No terminals to host
Why an API

MT5 without the MetaTrader problem.

MetaTrader 5 is where your users' money is. But it is a desktop and mobile application, not a service your backend can call — until something runs a terminal for each account and puts an API in front of it.

Building that layer yourself means Windows servers, one terminal per signed-in account, sessions that drop, updates, and a hard question every time a request times out: did the order go through? It is months of work that has nothing to do with the product you set out to build.

fxapis is that layer, finished. Your backend connects a user's account with the details they already use in MetaTrader, and trades it with JSON over HTTPS. Accounts come online in about 10 seconds, orders reach a London broker in 96–110 ms from our EU servers, and every order gets a recorded result; an unclear one is confirmed with the broker, not guessed.

What you can build

Everything a trading screen needs from MT5.

A connect flow that explains itself

Account states say exactly what is wrong — wrong password, trading disabled by the broker, two-factor, certificate — so your app can tell the user what to fix.

Order tickets

Market and pending orders with stop loss and take profit, partial closes and stop changes, each returning a clear result.

Margin preview

Show the margin and potential profit of a trade before the user confirms it, without placing anything.

Positions and history

Open positions with their age, orders your app placed, and the broker's deals — including trades made outside your app.

Credentials handled properly

Passwords encrypted per account, never returned or logged, erased on disconnect. Workspaces isolated from each other.

Any stack

REST and JSON, an OpenAPI specification, and examples in 13 languages for every endpoint.
Designed for your UX

Errors your users can act on.

Most support tickets in a trading app start at the connect screen. fxapis reports why an account cannot sign in, in a state your code can branch on, and stops retrying the ones that retries will not fix — repeated failed logins are how brokers lock accounts.

The same care runs through trading. Every failure has a stable code and a plain message. A rejection carries the broker's own reason. An order whose outcome is unclear is reported as confirming, never as failed, so your app never tells a user to try again on a trade that may already be open.

See Accounts and Errors for every state and code.

TypeScript · your backend
// Your connect screen: tell the user exactly what to fix.
const MESSAGES: Record<string, string> = {
  invalid_credentials: "Check the account number, the trading password and the server name.",
  trading_disabled:    "Your broker has disabled trading for this login. Ask them to enable it.",
  needs_2fa:           "Turn off two-factor sign-in for this account, then try again.",
  needs_certificate:   "Your broker requires a certificate. Contact support.",
};

const { data } = await fx.get(`/v1/accounts/${id}/status`);
if (data.state === "ready") showConnected();
else if (MESSAGES[data.state]) showError(MESSAGES[data.state]);
else setTimeout(poll, 2000); // still connecting
Architecture

Where fxapis sits.

  1. Your app — web or mobile — talks only to your backend, with your own user authentication.
  2. Your backend holds the fxapis API key in a secret store, maps each of your users to the account ids they own, and calls fxapis.
  3. fxapis runs the MetaTrader 5 terminals, signs each account in at its broker, executes orders and keeps the history.
  4. The broker holds the money and the positions, as it always has. Your users see every trade in their own MetaTrader app too.

Use scoped keys for each service: a read-only key for your portfolio screens, a trading key only where orders are placed. Signals-style products should read the click-to-trade solution; products that trade many accounts together, the copy-trading solution.

FAQ

Building on fxapis

Can I call fxapis from my mobile app or the browser?

No — and you should not want to. API keys are server-to-server credentials. Your app talks to your backend, and your backend calls fxapis. That keeps the key out of app bundles and lets you apply your own authentication and limits per user.

Which of my users' brokers will work?

Accounts that sign in to MetaTrader 5 with an account number, trading password and server name. Each user connects their own account at their own broker. If a broker requires two-factor sign-in or a certificate, the account reports that state when it connects, so your app can explain it.

Can I show live prices and charts?

fxapis does not provide a market data feed. It covers trading and account data: orders, positions, deals and margin and profit calculations. Use a market data provider for charts.

How do I know when an order fills or a position closes?

A market order returns its result in the response. For everything after that — a stop loss firing at the broker, for example — read positions and deals, which refresh while the account is online. Event webhooks are not available yet, so plan on polling, which the status endpoints are built for.

Is each user's data kept apart?

Each workspace is isolated from every other. Within your workspace, you decide which of your users can see which account — store the account id we return against the user in your own database, and put your user id in the account's label so our console and your records line up.

What happens to a user's password when they leave?

Disconnect their account. The stored password is erased immediately; the trading history remains available to you until you ask us to delete it.

> Connect. Execute. Scale.

Ship MT5 trading in your app.

Connect a demo account and place your first order from your backend in about five minutes.