Skip to content

Commit

Permalink
fix(v2.15.6, #507): correct handling for symbols array in rolling win…
Browse files Browse the repository at this point in the history
…dow tickers endpoint
  • Loading branch information
tiagosiebler committed Jan 30, 2025
1 parent 55898d7 commit 626cf4f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "binance",
"version": "2.15.5",
"version": "2.15.6",
"description": "Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & end-to-end tests.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
7 changes: 7 additions & 0 deletions src/main-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,13 @@ export class MainClient extends BaseRestClient {
getRollingWindowTicker(
params: RollingWindowTickerParams,
): Promise<TradingDayTickerFull[] | TradingDayTickerMini[]> {
if (params && params['symbols'] && Array.isArray(params['symbols'])) {
const symbols = (params as SymbolArrayParam).symbols;
const symbolsQueryParam = JSON.stringify(symbols);

return this.get('api/v3/ticker?symbols=' + symbolsQueryParam);
}

return this.get('api/v3/ticker', params);
}

Expand Down

0 comments on commit 626cf4f

Please sign in to comment.