Skip to content

Commit 37e4c26

Browse files
authored
Merge pull request #508 from tiagosiebler/rollingwindowsymbols
fix(v2.15.6, #507): correct handling for symbols array in rolling window tickers endpoint
2 parents 55898d7 + aa7eb03 commit 37e4c26

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,11 @@ 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 symbolsQueryParam = JSON.stringify(params.symbols);
744+
return this.get('api/v3/ticker?symbols=' + symbolsQueryParam);
745+
}
746+
742747
return this.get('api/v3/ticker', params);
743748
}
744749

0 commit comments

Comments
 (0)