FXCM

Execute FXCM trading operations

Overview

This node enables placing market orders on the FXCM trading platform. It allows users to execute immediate buy or sell trades for specified financial instruments (such as currency pairs). This is useful in scenarios where traders want to enter the market at the current price without delay, for example:

  • Quickly entering a position based on real-time market analysis.
  • Automating trade execution strategies that require instant order placement.
  • Managing risk by setting optional stop loss and take profit levels alongside the market order.

Properties

Name Meaning
Instrument The trading instrument or symbol to trade, e.g., "EUR/USD".
Order Type Whether to buy or sell the instrument. Options: "Buy", "Sell".
Amount The amount to trade in the base currency of the instrument.
Stop Loss Optional stop loss price level to limit potential losses.
Take Profit Optional take profit price level to lock in gains automatically.

Output

The node outputs an array with one element containing a json object representing the response from the FXCM API after placing the market order. This JSON typically includes details about the executed order such as order ID, status, filled amount, prices, and any other metadata returned by the FXCM service.

No binary data output is produced by this operation.

Dependencies

  • Requires an active FXCM API credential configured in n8n to authenticate requests.
  • Depends on the internal FxcmClient class which handles communication with the FXCM API.
  • The node disconnects from the FXCM client after each execution to clean up resources.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Incorrect instrument symbols may result in errors or rejected orders.
    • Insufficient funds or trading limits on the FXCM account can prevent order placement.
    • Network connectivity problems can cause request timeouts or failures.
  • Error messages:

    • Errors thrown by the FXCM API are caught; if "Continue On Fail" is enabled, they appear in the output JSON under an error field.
    • Typical error messages include invalid parameters, unauthorized access, or order rejection reasons.
  • Resolutions:

    • Verify API credentials and permissions.
    • Confirm instrument symbols and order parameters are valid.
    • Check account balance and FXCM trading restrictions.
    • Ensure stable internet connection.

Links and References

Discussion