Actions15
- Calculation Actions
- MarketData Actions
- News Actions
- Symbol Actions
- Trade Actions
- Trading Actions
Overview
This node integrates with the XTB Trading API to retrieve financial news data. Specifically, the "Get News" operation under the "News" resource fetches news items within a specified date range. This is useful for traders and analysts who want to monitor market-moving news or events relevant to their trading strategies.
Practical examples include:
- Fetching all news articles published between two timestamps to analyze market sentiment.
- Integrating real-time or historical news data into automated trading workflows.
- Combining news data with other market indicators to make informed trading decisions.
Properties
| Name | Meaning |
|---|---|
| Start | The start date as a timestamp (number). Defines the beginning of the news retrieval period. |
| End | The end date as a timestamp (number). Defines the end of the news retrieval period. |
Output
The node outputs an array of JSON objects representing news items retrieved from the XTB Trading API. Each object corresponds to a news article or event within the specified date range. The exact structure depends on the API response but typically includes fields such as title, description, publication date, and possibly related symbols or categories.
The node does not output binary data.
Dependencies
- Requires an active connection to the XTB Trading API via a WebSocket manager.
- 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 interacting with the XTB API. - The node manages connection lifecycle: it connects before executing operations and disconnects afterward.
Troubleshooting
- Connection errors: If the node fails to connect to the XTB API, verify that the API credentials are correct and that there is network connectivity.
- Invalid date range: Ensure that the "Start" and "End" properties are valid timestamps and that the start date is not after the end date.
- Unknown resource or operation: The node throws an error if an unsupported resource or operation is specified. Confirm that "News" is selected as the resource and "Get News" as the operation.
- API rate limits or downtime: The XTB API may impose rate limits or experience outages; handle such errors by enabling "Continue On Fail" or retrying later.
Links and References
- XTB Trading API Documentation
- n8n Documentation on Creating Custom Nodes
- @sharplygroup/xtb-api-js GitHub Repository (for reference on the underlying API client)