Migrating from MetaApi to fxapis
A concept-by-concept guide for moving an MT5 integration from MetaApi to fxapis: provisioning and deploy versus connect and modes, RPC and streaming versus REST and polling, a table of equivalent calls, and what has no equivalent yet — streaming, MT4 and CopyFactory features.
This guide is for teams with an MT5 integration on MetaApi who are evaluating or planning a move to fxapis. It maps MetaApi's concepts to ours, lists equivalent calls, and is explicit about what fxapis does not have yet, so you can decide with the full picture.
The MetaApi details below come from its public documentation, read on 30 September 2026; see Sources. MetaApi changes over time — check its current docs for anything your decision depends on.
The short version
| MetaApi | fxapis | |
|---|---|---|
| Platforms | MetaTrader 4 and 5 | MetaTrader 5 only |
| Interfaces | REST, WebSocket streaming, SDKs (Node.js, Python, Java) | REST (plain HTTPS, any language) |
| Account lifecycle | Create, then deploy / undeploy | Connect, then a mode decides when it is online |
| Real-time updates | Streaming connection with synchronization listeners | Polling — no streaming or webhooks yet |
| Trade copying | CopyFactory product | Multi-account orders + your own copier |
| Order identity | clientId on a trade | clientOrderId, plus an Idempotency-Key header: a retry returns the first answer |
| An order whose answer was lost | See MetaApi's docs | Reported as ORDER_UNRESOLVED, then confirmed against the broker's records |
| Market data | Quotes, candles, ticks | Not provided |
If your product depends on streaming updates, MT4, market data or CopyFactory's risk features, fxapis does not replace them today. If it places orders on MT5 accounts — one at a time or across many — and needs a recorded result for every order, with an unclear one confirmed with the broker rather than guessed, read on.
Concepts
Provisioning and deploy → connect and modes
In MetaApi you create an account through the provisioning API
(POST /users/current/accounts with name, server, login, password,
platform, magic and options such as type, region and reliability),
then deploy it (POST …/deploy), which starts an API server and a trading
terminal for it, and undeploy it to stop them.
In fxapis you connect an account with
POST /v1/accounts — login,
server, password, and a mode. The mode replaces manual deploy/undeploy:
| fxapis mode | Behaves like |
|---|---|
always_on | An account that is always deployed. |
warm_on_demand | Deployed automatically when you place an order or prepare it; undeployed automatically after 15 idle minutes. |
cold | Deploy and undeploy yourself, with warm and cool. |
Coming online takes about ten seconds in our tests. MetaApi's waitConnected() and
waitSynchronized() correspond to polling
GET /v1/accounts/{id}/status
until state is ready. POST /v1/accounts/prepare
brings up to 200 accounts online in one call.
There is no magic field: fxapis tags each order's MT5 comment so it can match
the broker's record to your order, and gives you clientOrderId for your own
reference.
RPC and streaming connections → REST and polling
MetaApi offers an RPC connection (account.getRPCConnection()), which its
docs recommend for monitoring apps and simple trading apps, and a streaming
connection (account.getStreamingConnection()), recommended for trade
copiers and automated strategies, which keeps a synchronized local terminal
state and calls your listeners on every change.
fxapis has one interface: REST. What you would read from a streaming connection's terminal state you read with requests:
- Positions:
GET /v1/accounts/{id}/positions— a snapshot refreshed about every 15 seconds while the account is online, withobservedAton each row.POST /v1/accounts/{id}/reconcilerefreshes it immediately. - Deals:
GET /v1/accounts/{id}/deals, including deals not caused by your orders (stop-outs, swaps, deposits, manual trades). - Order outcomes: returned by the order call itself, and by
GET /v1/orders/{id}.
There are no event webhooks yet. Code that reacts to onPositionUpdated or
onDealAdded becomes a polling loop; the copier guide
shows one.
Trades
MetaApi places trades through one endpoint, POST …/trade, with an
actionType. fxapis has one endpoint per intent, and every order that opens or
closes exposure takes an Idempotency-Key:
- A retry with the same key returns the first answer instead of placing a second order, for 24 hours.
- Three failures are distinguished:
SEND_FAILED(never reached the broker — safe to retry),ORDER_REJECTED(the broker refused, with itsretcode), andORDER_UNRESOLVED(the answer was lost — do not resend; the order is confirmed against the broker's records and moves to what actually happened). - Volumes and prices are strings:
"0.01", never0.01.
See Idempotent MT5 orders and Trading.
CopyFactory → multi-account orders and a copier
CopyFactory is a complete copy-trading product: strategies and subscribers, per-subscription copy ratios, symbol mapping, risk filters (drawdown, equity curve, leverage), stop-outs and signal filtering, with very low internal copying latency per its docs.
fxapis provides the execution building block — multi-account orders, one trade sent to up to 500 accounts together on Enterprise (accounts per multi-account order: Starter 10, Scale 100, Enterprise 500), with per-account volumes, barrier policies and a dispatch spread of about 30 ms across 100 accounts in our benchmark against an instant broker — every multi-account order reports its own — and you build the copying logic. The trade copier guide is a working starting point. Risk filters, stop-outs, symbol mapping and subscriber management are yours to implement.
Equivalent calls
| MetaApi | fxapis |
|---|---|
POST /users/current/accounts (provisioning) | POST /v1/accounts |
POST …/accounts/:id/deploy | POST /v1/accounts/{id}/warm, or a mode that does it for you |
POST …/accounts/:id/undeploy | POST /v1/accounts/{id}/cool |
| Removing an account | POST /v1/accounts/{id}/disconnect — erases the password, keeps the history |
waitConnected() / waitSynchronized(), connectionStatus | Poll GET /v1/accounts/{id}/status until ready |
POST …/trade with ORDER_TYPE_BUY / ORDER_TYPE_SELL | POST /v1/accounts/{id}/orders/market with side |
ORDER_TYPE_BUY_LIMIT, …_STOP, …_STOP_LIMIT (and sells) | POST /v1/accounts/{id}/orders/pending with kind |
POSITION_MODIFY | POST /v1/accounts/{id}/positions/{ticket}/modify |
POSITION_CLOSE_ID | POST /v1/accounts/{id}/positions/{ticket}/close |
POSITION_PARTIAL | The same close, with volume |
ORDER_MODIFY | POST /v1/orders/{id}/modify |
ORDER_CANCEL | POST /v1/orders/{id}/cancel |
POSITIONS_CLOSE_SYMBOL, POSITION_CLOSE_BY | No single call — close each position |
GET …/accounts/:id/positions | GET /v1/accounts/{id}/positions |
GET …/history-deals/time/:start/:end | GET /v1/accounts/{id}/deals?since=…&until=… |
| History orders | GET /v1/orders?accountId=… |
| Margin calculation | POST /v1/accounts/{id}/calculate |
clientId on a trade | clientOrderId, plus an Idempotency-Key header |
| CopyFactory strategies and subscriptions | POST /v1/execution-waves + your copier |
No equivalent yet
Be sure none of these is load-bearing for you:
- Streaming. No WebSocket connection, synchronization listeners or webhooks. Poll.
- MetaTrader 4. fxapis connects MT5 accounts only.
- CopyFactory features. No strategy/subscriber model, risk filters, stop-outs or symbol mapping.
- Market data. No quotes, ticks or candles.
- Demo account creation. fxapis does not open accounts at brokers; you connect existing ones.
- Account balance and equity fields. Derive them from deals and positions (see prop-firm monitoring).
- Official SDKs. Any HTTP client works; the language guides have complete programs for seven languages.
A migration plan
Try it on a demo account
Create an fxapis key and run the Quickstart or a
language guide against a broker demo account. fx_test_ keys still
reach real brokers — they are a label, not a sandbox.
Map your lifecycle
Decide each account's mode. Accounts you kept deployed all the time become
always_on; accounts you deployed around trades become warm_on_demand, and
the deploy/undeploy code goes away.
Collect credentials again
Connecting an account to fxapis needs its login, trading password and
server name, sent to POST /v1/accounts from your backend. Plan how each user
re-enters their password, and check it straight away — see
Connect MT5 accounts.
Port order placement
Replace each actionType with its endpoint from the table above. Add an
Idempotency-Key to every market order, pending order and close, derived from
your own decision (for example signal + account), and handle
ORDER_UNRESOLVED by polling, never resending.
Replace listeners with polling
Turn streaming listeners into loops over positions and deals, with the interval
your product needs. Show users observedAt so they know how fresh a view is.
Switch accounts over one at a time
Avoid having both platforms placing orders on the same account at the same time: each would treat the other's trades as unexplained. Move an account, confirm its orders and history in fxapis, then remove it from the old setup.
Sources
MetaApi documentation, read on 30 September 2026:
- MetaApi — Provisioning API overview
- Create account, Deploy account, Undeploy account
- MetaApi — Client API overview (REST and WebSocket, MT4 and MT5, SDKs)
- Execute trade, Read positions, Read deals by time range
- JavaScript SDK — RPC API and Streaming API
- CopyFactory overview
fxapis facts on this page are from our own API reference and measurements.
Monitor MT5 trader accounts for prop-firm rules
Use deals, positions and order history from the fxapis MT5 API to check prop-firm rules such as daily loss and maximum drawdown on your side, with read-only and reduce-only API keys, and close every position on an account that breaches.
Authentication
Keys, environments, scopes and rotation.