Actions15
- Calculation Actions
- MarketData Actions
- News Actions
- Symbol Actions
- Trade Actions
- Trading Actions
Overview
This node integrates with the XTB Trading API to retrieve various types of trading and market data. Specifically, for the MarketData resource with the Get Chart Last Request operation, it fetches the most recent chart information based on a specified "info" parameter. This is useful for traders or analysts who want to obtain up-to-date chart data for financial instruments directly within their workflows.
Common scenarios include:
- Automatically fetching the latest price chart data for a given symbol or instrument.
- Integrating real-time market data into custom trading strategies or dashboards.
- Triggering alerts or further processing based on the latest market movements.
Example: A user can configure this node to get the last available chart data for a currency pair or stock symbol, then use that data downstream to analyze trends or make trade decisions.
Properties
| Name | Meaning |
|---|---|
| Info | The specific chart information to retrieve. This typically corresponds to the type or detail level of the chart data requested. |
Note: The "Info" property is required and must be provided by the user to specify what chart data to fetch.
Output
The node outputs an array of JSON objects representing the retrieved chart data corresponding to the requested "info". Each item in the output array contains structured data fields as returned by the XTB API's market data chart endpoint.
If the node supports binary data (not explicitly shown here), it would represent chart images or other binary chart-related content; however, based on the static code, only JSON data output is evident.
Dependencies
- Requires an active connection to the XTB Trading API via WebSocket.
- Needs valid API credentials (an API key or authentication token) configured in n8n to authenticate requests.
- Depends on the external
@sharplygroup/xtb-api-jslibrary for API operations. - Uses internal resource classes to handle different resource-operation combinations.
Troubleshooting
- Connection Issues: If the node fails to connect, verify that the API credentials are correct and that the XTB API service is reachable.
- Invalid Resource or Operation: Errors like "Unknown resource" indicate misconfiguration of the resource or operation parameters.
- Missing Required Parameters: Ensure the "Info" property is set when using MarketData operations; otherwise, the request will fail.
- API Rate Limits or Downtime: The node may throw errors if the API limits are exceeded or the service is down; retry logic or error handling should be implemented.
- WebSocket Disconnects: Since the node uses WebSocket connections, transient network issues might cause disconnects; ensure stable network connectivity.
Links and References
- XTB Trading API Documentation
- n8n Documentation
- @sharplygroup/xtb-api-js GitHub Repository (for the underlying API client library)