Barfinex
All exchanges
XM

XM

Coming SoonForex Brokers
connectorType: "xm"

Multi-regulated forex broker

Connection Architecture

XM
WebSocket / REST
Connector
libs/exchange-xm
Provider
:8081/api
Detector
Advisor
Studio

The connector receives data from the exchange and feeds it to Provider (port 8081). From there — to Detector, Advisor, and Studio.

Technologies

Transport
REST Polling
Authentication
MT4/MT5 Login + Server
Data Format
JSON
Features
MT4/MT5

Best for

  • Global retail FX traders using MT4/MT5 who want Barfinex signal integration with their XM account.
  • Metal and commodity CFD strategies requiring tight spreads on gold, silver, oil, and natural gas.
  • Traders in jurisdictions where XM holds local regulation (ASIC, CySEC) seeking compliance-friendly execution.

Connect via code

1Environment variables (.env)

XM_LOGIN=your_login_here
XM_PASSWORD=your_password_here
XM_SERVER=your_server_here

2Connector configuration

// config/config.provider.json
{
  "provider": {
    "connectors": [
      {
        "connectorType": "xm",
        "enabled": true,

        "markets": [
          { "marketType": "spot", "symbols": [{ "name": "BTCUSDT" }] }
        ],
        "subscriptions": [
          { "type": "PROVIDER_MARKETDATA_CANDLE", "symbols": ["BTCUSDT"], "intervals": ["min1", "h1"], "active": true },
          { "type": "PROVIDER_MARKETDATA_TRADE", "symbols": ["BTCUSDT"], "active": true },
          { "type": "PROVIDER_MARKETDATA_ORDERBOOK", "symbols": ["BTCUSDT"], "active": true }
        ]
      }
    ]
  }
}

3Verify and query data

# Verify connection
curl -H "Authorization: Bearer $PROVIDER_API_TOKEN" \
  https://localhost:8081/api/exchanges/runtime-proof

# Candles (last 7 days)
curl -H "Authorization: Bearer $PROVIDER_API_TOKEN" \
  "https://localhost:8081/api/candles/xm/spot/BTCUSDT/h1?days=7"

Available via Barfinex API

/api/candles/xm/...
/api/trades/xm/...
/api/orderbook/xm/...
/api/account/xm/...
/api/symbols/xm/...
/api/assets/xm/...

Studio graphical setup — in development, coming in the next release.

Important

The SERVER credential must match your XM account server precisely (e.g., XMGlobal-MT5 3).
Account bonuses can affect margin calculation — disable or account for them in risk governor settings.
Supported Markets
SpotMargin
Websitewww.xm.com
Connect in Studio(soon)
Exchange Website

Let’s Get in Touch

Have questions or want to explore Barfinex? Send us a message.