Skip to content

Commit 626cf4f

Browse files
committed
fix(v2.15.6, #507): correct handling for symbols array in rolling window tickers endpoint
1 parent 55898d7 commit 626cf4f

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "binance",
3-
"version": "2.15.5",
3+
"version": "2.15.6",
44
"description": "Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & end-to-end tests.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

src/main-client.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,13 @@ export class MainClient extends BaseRestClient {
739739
getRollingWindowTicker(
740740
params: RollingWindowTickerParams,
741741
): Promise<TradingDayTickerFull[] | TradingDayTickerMini[]> {
742+
if (params && params['symbols'] && Array.isArray(params['symbols'])) {
743+
const symbols = (params as SymbolArrayParam).symbols;
744+
const symbolsQueryParam = JSON.stringify(symbols);
745+
746+
return this.get('api/v3/ticker?symbols=' + symbolsQueryParam);
747+
}
748+
742749
return this.get('api/v3/ticker', params);
743750
}
744751

0 commit comments

Comments
 (0)