aleukhin cb57ba12b7 1 | 1 maand geleden | |
---|---|---|
.vscode | 1 maand geleden | |
public | 1 maand geleden | |
src | 1 maand geleden | |
.editorconfig | 1 maand geleden | |
.gitignore | 1 maand geleden | |
.prettierrc.json | 1 maand geleden | |
1.png | 1 maand geleden | |
11.png | 1 maand geleden | |
1111.jpg | 1 maand geleden | |
22.png | 1 maand geleden | |
eslint.config.js | 1 maand geleden | |
index.html | 1 maand geleden | |
jsconfig.json | 1 maand geleden | |
package-lock.json | 1 maand geleden | |
package.json | 1 maand geleden | |
postcss.config.cjs | 1 maand geleden | |
readme.md | 1 maand geleden | |
tailwind.config.cjs | 1 maand geleden | |
tailwind.config.js | 1 maand geleden | |
vite.config.js | 1 maand geleden |
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]),
)
})