Price API
Using the coindesk API, https://api.coindesk.com/v1/bpi/historical/close.json, for the last 30 days of BTC prices:
Define a new
BitcointPriceIndextype that describes the data returned by the APIFetch the API data and parse the result. We want the data to have the type
BitcointPriceIndexafter this point.Find the highest price in the last month, and print the date it occurred using the
momentformatMMMM Do(e.g."June 3rd"). (If the price happened twice, use the first date it occurred)
This exercise covers materials from the sections: types, syntax, collections, functions.