FXCM

Execute FXCM trading operations

Overview

This node integrates with the FXCM trading platform to execute various trading operations. Specifically, for the Account resource and the Place Limit Order operation, it allows users to place a limit order on a specified trading instrument. A limit order is an order to buy or sell a financial instrument at a specified price or better, which helps traders control entry points and manage risk.

Common scenarios where this node is beneficial include:

  • Automated trading strategies that require placing limit orders based on market signals.
  • Risk management setups where trades should only execute at predefined price levels.
  • Algorithmic trading bots that need precise control over order execution prices.

For example, a trader might use this node to place a buy limit order for EUR/USD at a price lower than the current market price, ensuring the order only executes if the price drops to that level.

Properties

Name Meaning
Instrument Trading instrument/symbol (e.g., "EUR/USD") on which the limit order will be placed.
Order Type Whether to buy or sell. Options: "Buy" or "Sell".
Amount Trading amount in the base currency to buy or sell.
Price The limit price at which the order should be executed.
Stop Loss Optional stop loss price level to limit potential losses.
Take Profit Optional take profit price level to secure gains automatically.

Output

The node outputs a JSON object representing the result of the limit order placement. This typically includes details such as order ID, status, instrument, amount, price, and any other metadata returned by the FXCM API confirming the order creation.

No binary data output is produced by this operation.

Example output structure (simplified):

{
  "orderId": "123456",
  "status": "placed",
  "instrument": "EUR/USD",
  "amount": 1000,
  "price": 1.1200,
  "orderType": "buy",
  "stopLoss": 1.1100,
  "takeProfit": 1.1300
}

Dependencies

  • Requires an active FXCM API key credential configured in n8n to authenticate requests.
  • Depends on the FxcmClient class internally to communicate with the FXCM API.
  • No additional external services are required beyond FXCM.

Troubleshooting

  • Common Issues:

    • Invalid or expired API credentials can cause authentication failures.
    • Incorrect instrument symbols may lead to errors or rejected orders.
    • Providing a limit price that is not valid according to FXCM rules (e.g., too far from market price) may cause order rejection.
    • Missing required parameters like instrument, amount, or price will prevent order placement.
  • Error Messages:

    • Authentication errors usually indicate issues with the API key; verify and update credentials.
    • Validation errors from FXCM often specify which parameter is invalid; adjust inputs accordingly.
    • Network or connectivity errors suggest checking internet connection or FXCM service status.
  • To resolve errors, ensure all required fields are correctly filled, credentials are valid, and input values conform to FXCM's trading rules.

Links and References

Discussion