# Call MT5 from n8n without an Expert Advisor

URL: https://docs.fxapis.com/guides/n8n

> How the fxapis n8n templates call the REST API with the HTTP Request node. They do not require a local terminal or EA. n8n Cloud was not separately certified…



n8n workflows that talk to MetaTrader 5 often assume a custom polling Expert Advisor and a machine that stays on. fxapis replaces that bridge with HTTPS. The templates in [fxapis-integrations](https://github.com/FXapis/fxapis-integrations) use n8n's built-in HTTP Request node. There is no official n8n node.

This guide describes those templates. It does not claim a separate test on n8n Cloud. If Cloud blocks an environment variable or a header the template uses, that is a Cloud limit, not proof the API refused the call. Self-hosted n8n can set `FXAPIS_KEY` in the environment and send it as `Authorization: Bearer …`.

Start with a read, not an order.

1. Create a key with `accounts:read` and `trading:read` only.
2. Connect a broker demo account and bring it online.
3. HTTP Request: `GET https://api.fxapis.com/v1/accounts` with that header.
4. HTTP Request: `GET https://api.fxapis.com/v1/accounts/{{accountId}}/positions`.

A write needs `trading:execute` and one `Idempotency-Key` you store on the n8n item and reuse if the node retries. A new key is a new order. n8n's default retry with a freshly generated UUID will place a second order. See [Idempotency](/guides/idempotency).

The account must be online before the order node runs. Poll `GET /v1/accounts/{id}/status` until `state` is `ready`, or the order returns `409 ACCOUNT_NOT_READY` and nothing was sent.

Related: [Webhooks](/guides/webhooks), [TradingView](/guides/tradingview), and the [n8n and Postman article](https://fxapis.com/blog/mt5-api-postman-tradingview-n8n).
