Skip to content

Commit

Permalink
Merge pull request #508 from tiagosiebler/rollingwindowsymbols
Browse files Browse the repository at this point in the history
fix(v2.15.6, #507): correct handling for symbols array in rolling window tickers endpoint
  • Loading branch information
tiagosiebler authored Jan 30, 2025
2 parents 55898d7 + aa7eb03 commit 37e4c26
Show file tree
Hide file tree
Showing 3 changed files with 8 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
5 changes: 5 additions & 0 deletions src/main-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,11 @@ export class MainClient extends BaseRestClient {
getRollingWindowTicker(
params: RollingWindowTickerParams,
): Promise<TradingDayTickerFull[] | TradingDayTickerMini[]> {
if (params && params['symbols'] && Array.isArray(params['symbols'])) {
const symbolsQueryParam = JSON.stringify(params.symbols);
return this.get('api/v3/ticker?symbols=' + symbolsQueryParam);
}

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

Expand Down

0 comments on commit 37e4c26

Please sign in to comment.