Skip to content

Commit 146451f

Browse files
authored
futuresPrices return data type fix by maxah
2 parents 62819d4 + ab07c82 commit 146451f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

node-binance-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3909,7 +3909,7 @@ let api = function Binance( options = {} ) {
39093909

39103910
futuresPrices: async ( params = {} ) => {
39113911
let data = await promiseRequest( 'v1/ticker/price', params, { base:fapi } );
3912-
return data.reduce( ( out, i ) => ( ( out[i.symbol] = i.price ), out ), {} );
3912+
return Array.isArray(data) ? data.reduce( ( out, i ) => ( ( out[i.symbol] = i.price ), out ), {} ) : data;
39133913
},
39143914

39153915
futuresDaily: async ( symbol = false, params = {} ) => {

0 commit comments

Comments
 (0)