Last active
October 1, 2022 04:55
-
-
Save danieltorscho/082c3e872c290be1543fa271a9ccd106 to your computer and use it in GitHub Desktop.
Revisions
-
danieltorscho revised this gist
Oct 1, 2022 . 1 changed file with 2 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,5 @@ myArray = await Promise.all( myArray.map(async item => { return await axios.get('https://url) }) ) -
danieltorscho created this gist
Oct 1, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ myArray = await Promise.all( currencies.map(async item => { let usdt = item.total if (item.currency !== 'USDT') { const request = await axios.get(`https://api.binance.com/api/v3/ticker/price?symbol=${item.currency}USDT`) usdt = request.data.price * item.total } return { ...item, usdt } }) )