Actions16
- Account Actions
- Trading Actions
- Market Data Actions
Overview
This node integrates with the FXCM trading platform to perform various trading and market data operations. Specifically, for the Market Data resource and Place Limit Order operation (under the Trading resource), 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. This node enables automated placement of such orders, which is useful in algorithmic trading, portfolio management, or when precise entry points are required.
Practical examples:
- Automatically placing a buy limit order for EUR/USD at a target price to enter the market only if the price drops to that level.
- Setting up a sell limit order for a stock or currency pair to take profit once a certain price is reached.
- Combining limit orders with stop loss and take profit levels to manage risk and automate trade exits.
Properties
| Name | Meaning |
|---|---|
| Instrument | The trading instrument or symbol to place the limit order on (e.g., "EUR/USD"). |
| Order Type | Whether to buy or sell. Options: "Buy" or "Sell". |
| Amount | The amount to trade in the base currency. |
| Price | The limit price at which to execute the order. |
| 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 placed limit order's details as returned by the FXCM API client. This typically includes information such as order ID, status, instrument, amount, price, and any associated stop loss or take profit settings.
No binary data output is produced by this operation.
Example output structure (simplified):
{
"orderId": "123456",
"instrument": "EUR/USD",
"isBuy": true,
"amount": 1000,
"price": 1.2345,
"stopLoss": 1.2300,
"takeProfit": 1.2400,
"status": "placed"
}
Dependencies
- Requires an active FXCM API connection authenticated via an API key credential configured in n8n.
- Uses the bundled
FxcmClientclass to communicate with FXCM's trading API. - No additional external dependencies beyond the FXCM API and its credentials.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Incorrect instrument symbols may result in errors or rejected orders.
- Placing orders with invalid price levels (e.g., limit price worse than current market price) might be rejected by FXCM.
- Network connectivity issues can prevent successful API calls.
Error messages:
- Errors from the FXCM API client are caught and either thrown or returned as error JSON if "Continue On Fail" is enabled.
- Typical error messages include authentication failures, invalid parameters, or order rejections.
Resolutions:
- Verify API credentials and permissions.
- Double-check instrument names and ensure they are supported by FXCM.
- Validate order parameters before placing orders.
- Ensure stable internet connection.