@binance/connector
Advanced tools
Comparing version 2.0.0-rc.2 to 2.0.0-rc.3
{ | ||
"name": "@binance/connector", | ||
"version": "2.0.0-rc.2", | ||
"version": "2.0.0-rc.3", | ||
"description": "This is a lightweight library that works as a connector to the Binance public API.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -189,2 +189,28 @@ 'use strict' | ||
/** | ||
* UIKlines<br> | ||
* | ||
* GET /api/v3/uiKlines<br> | ||
* | ||
* {@link https://binance-docs.github.io/apidocs/spot/en/#uiklines} | ||
* | ||
* @param {string} symbol | ||
* @param {string} interval | ||
* @param {object} [options] | ||
* @param {number} [options.startTime] | ||
* @param {number} [options.endTime] | ||
* @param {number} [options.limit] - Default 500; max 1000. | ||
*/ | ||
uiklines (symbol, interval, options = {}) { | ||
validateRequiredParameters({ symbol, interval }) | ||
return this.publicRequest( | ||
'GET', | ||
'/api/v3/uiKlines', | ||
Object.assign(options, { | ||
symbol: symbol.toUpperCase(), | ||
interval | ||
}) | ||
) | ||
} | ||
/** | ||
* Current Average Price<br> | ||
@@ -217,4 +243,5 @@ * | ||
* @param {Array} [symbols] - an array of symbols | ||
* @param {string} [type] - "MINI" or "FULL" | ||
*/ | ||
ticker24hr (symbol = '', symbols = []) { | ||
ticker24hr (symbol = '', symbols = [], type = 'FULL') { | ||
symbols = symbols.map(symbol => symbol.toUpperCase()) | ||
@@ -224,3 +251,3 @@ | ||
'GET', | ||
'/api/v3/ticker/24hr', { symbol: symbol.toUpperCase(), symbols } | ||
'/api/v3/ticker/24hr', { symbol: symbol.toUpperCase(), symbols, type } | ||
) | ||
@@ -288,2 +315,3 @@ } | ||
* @param {object} [options] | ||
* @param {string} [options.type] Supported values: FULL or MINI. | ||
* @param {number} [options.windowSize] - Defaults to 1d if no parameter provided. | ||
@@ -290,0 +318,0 @@ */ |
194120
5574