Overview
This node interacts with the Binance Spot market API to retrieve candlestick (candle) data for a specified trading symbol. It is useful for users who want to analyze historical price movements, perform technical analysis, or build trading strategies based on time-series market data.
Typical use cases include:
- Fetching recent candle data for a cryptocurrency pair to visualize price trends.
- Automating trading bots that rely on candle patterns.
- Integrating Binance market data into dashboards or reports.
For example, a user can specify the symbol "BTCUSDT", select a 1-hour interval, and retrieve the last 50 candles to analyze hourly price changes.
Properties
| Name | Meaning |
|---|---|
| Symbol Name or ID | The trading pair symbol to fetch candle data for (e.g., BTCUSDT). Can be selected from a list or set via expression. |
| Interval Name or ID | The time interval for each candle (e.g., 1m, 5m, 1h). Selectable from predefined intervals or set via expression. |
| Limit | Maximum number of candle data points to return. Must be at least 1. |
| Start Time | Optional start timestamp to filter candles from this date/time onward. |
| End Time | Optional end timestamp to filter candles up to this date/time. |
Output
The node outputs an array of JSON objects representing candlestick data. Each object typically contains fields such as:
- Open time
- Open price
- High price
- Low price
- Close price
- Volume
- Close time
- Number of trades
This structured data allows downstream nodes or workflows to process or visualize historical market activity.
If binary data output is supported, it would represent raw or encoded market data, but in this case, the output is purely JSON-based.
Dependencies
- Requires access to the Binance Spot API.
- Needs an API key credential configured in n8n for authentication.
- Uses internal methods to load available symbols and intervals dynamically.
Troubleshooting
- Invalid Symbol or Interval: If the symbol or interval is not recognized, ensure the values are correct or loaded properly via the dynamic options.
- API Rate Limits: Binance enforces rate limits; excessive requests may result in errors or temporary bans.
- Time Range Errors: Providing invalid or inconsistent start/end times may cause no data to be returned.
- Authentication Failures: Ensure the API key credential is valid and has necessary permissions.
Common error messages might include:
- "Invalid symbol" — check the symbol input.
- "Request limit exceeded" — reduce request frequency.
- "Unauthorized" — verify API credentials.