Binance icon

Binance

Consume Binance API

Overview

This node interacts with the Binance API to retrieve candlestick (candle) data for a specified trading symbol on the spot market. It is useful for users who want to analyze historical price data or perform technical analysis on cryptocurrency trading pairs. For example, a trader might use this node to fetch the last 50 candlesticks for BTC/USDT with a 1-hour interval to analyze price trends.

Use Case Examples

  1. Fetch the last 50 1-hour candlesticks for BTC/USDT to analyze price movements.
  2. Retrieve candlestick data for a specific symbol within a defined time range for backtesting trading strategies.

Properties

Name Meaning
Symbol Name or ID The trading symbol or asset pair for which to retrieve candlestick data, e.g., BTCUSDT.
Interval Name or ID The time interval for each candlestick, such as 1m, 5m, 1h, etc.
Limit The maximum number of candlestick data points to return.
Start Time The start timestamp to filter candlestick data from.
End Time The end timestamp to filter candlestick data until.

Output

JSON

  • openTime - The opening time of the candlestick.
  • open - The opening price of the candlestick.
  • high - The highest price during the candlestick interval.
  • low - The lowest price during the candlestick interval.
  • close - The closing price of the candlestick.
  • volume - The trading volume during the candlestick interval.
  • closeTime - The closing time of the candlestick.
  • quoteAssetVolume - The volume of the quote asset traded during the interval.
  • numberOfTrades - The number of trades executed during the candlestick interval.
  • takerBuyBaseAssetVolume - The volume of the base asset bought by takers.
  • takerBuyQuoteAssetVolume - The volume of the quote asset bought by takers.

Dependencies

  • Binance API

Troubleshooting

  • Ensure the API credentials are correctly configured and have the necessary permissions to access market data.
  • Verify that the symbol and interval values are valid and supported by Binance.
  • Check the date and time format for startTime and endTime to avoid invalid parameter errors.
  • If the limit is set too high, the API might reject the request or return partial data; try reducing the limit.

Links

Discussion