MCPcopy Create free account
hub / github.com/ccxt/node-binance-api / candlesticks

Method candlesticks

src/node-binance-api.ts:4325–4330  ·  view source on GitHub ↗

* Gets the candles information for a given symbol * @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#klinecandlestick-data * intervals: 1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M * @param {string} symbol - the symbol * @param {functio

(symbol: string, interval: Interval = '5m', params: Dict = {})

Source from the content-addressed store, hash-verified

4323 * @return {promise or undefined} - omitting the callback returns a promise
4324 */
4325 async candlesticks(symbol: string, interval: Interval = '5m', params: Dict = {}): Promise<Candle[]> {
4326 if (!params.limit) params.limit = 500;
4327 params = Object.assign({ symbol: symbol, interval: interval }, params);
4328 const res = await this.publicSpotRequest('v3/klines', params);
4329 return this.parseCandles(res);
4330 }
4331
4332 /**
4333 * Gets the candles information for a given symbol

Callers 1

candlesMethod · 0.95

Calls 2

publicSpotRequestMethod · 0.95
parseCandlesMethod · 0.95

Tested by

no test coverage detected