* Used by bookTickers to format the bids and asks given given symbols * @param {array} data - array of symbols * @return {object} - symbols with their bids and asks data
(data: any)
| 3279 | * @return {object} - symbols with their bids and asks data |
| 3280 | */ |
| 3281 | bookPriceData(data: any): { [key: string]: BookTicker } { |
| 3282 | if (!Array.isArray(data)) { |
| 3283 | data = [data]; |
| 3284 | } |
| 3285 | const prices = {}; |
| 3286 | for (const obj of data) { |
| 3287 | prices[obj.symbol] = obj; |
| 3288 | } |
| 3289 | return prices; |
| 3290 | } |
| 3291 | |
| 3292 | /** |
| 3293 | * Used by balance to get the balance data |
no outgoing calls
no test coverage detected