MCPcopy Create free account
hub / github.com/ccxt/node-binance-api / priceData

Function priceData

deprecated/node-binance-api.js:2347–2357  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

2345 * @return {array} - symbols with their current prices
2346 */
2347 const priceData = (data) => {
2348 const prices = {};
2349 if (Array.isArray(data)) {
2350 for (let obj of data) {
2351 prices[obj.symbol] = obj.price;
2352 }
2353 } else { // Single price returned
2354 prices[data.symbol] = data.price;
2355 }
2356 return prices;
2357 };
2358
2359 /**
2360 * Used by bookTickers to format the bids and asks given given symbols

Callers 1

apiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected