Actions16
- Account Actions
- Trading Actions
- Market Data Actions
Overview
This node integrates with the FXCM trading platform to execute various trading operations and retrieve market data. Specifically, for the "Place Market Order" operation under the "Default" resource, it allows users to place immediate buy or sell orders on specified trading instruments with optional risk management parameters like stop loss and take profit.
Common scenarios where this node is beneficial include:
- Automated trading strategies that require placing market orders programmatically.
- Integrating FXCM trading capabilities into broader workflows for portfolio management.
- Quickly executing trades based on signals from other systems or data sources.
For example, a user can configure the node to place a market order to buy 1000 units of EUR/USD with a stop loss at a certain price level and a take profit target, enabling automated risk-managed trading.
Properties
| Name | Meaning |
|---|---|
| Instrument | Trading instrument/symbol to trade (e.g., "EUR/USD"). |
| Order Type | Whether to buy or sell. Options: "Buy", "Sell". |
| Amount | Trading amount in the base currency (numeric value). |
| Stop Loss | Optional stop loss price level to limit potential losses (numeric value). |
| Take Profit | Optional take profit price level to secure gains (numeric value). |
Output
The node outputs an array with one item 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 related metadata returned by FXCM.
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 bundled
FxcmClientclass which handles communication with the FXCM API. - The node expects network connectivity to FXCM's trading servers.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Incorrect instrument symbols may result in errors or rejected orders.
- Insufficient account balance or margin can cause order placement to fail.
- Providing invalid stop loss or take profit values (e.g., zero or out of range) might be ignored or cause errors.
Error messages:
- Authentication errors: Verify that the API key and secret are correctly set up.
- Order rejection errors: Check if the instrument symbol is valid and the account has sufficient funds.
- Network errors: Ensure stable internet connection and FXCM service availability.
To handle errors gracefully, the node supports continuing on failure, allowing workflows to proceed even if order placement fails.