# Рефакторинг ![](./11.png) ![](./22.png) # Api.js ``` const API_KEY = 'ce3fd966e7a1d10d65f907b20bf000552158fd3ed1bd614110baa0ac6cb57a7e' export const loadTicker = tickers => fetch( `https://min-api.cryptocompare.com/data/pricemulti?fsyms=${tickers.join(',')}&tsyms=USD&api_key=${API_KEY}`, ) .then(r => r.json()) .then(rawData => { return Object.fromEntries( Object.entries(rawData).map(([key, value]) => [key, value.USD]), ) }) ```