
Application Documentation
Introduction This is a web application project that allows users to check the price of a cryptocurrency in a specific fiat currency using the CryptoCompare API.
Technologies Used
The application is developed using HTML, CSS, and JavaScript.
Dependencies
The application uses the Axios library to make a GET request to the CryptoCompare API. It is expected that this library is available in the execution environment.
Implementation Details
The application has two input fields, one for the cryptocurrency symbol and the other for the fiat currency in which the price needs to be viewed. The user can select the desired options and then click the ‘Check Price’ button to see the current price.
The button has an event listener attached to it, which calls the callApi() function when clicked. If one or both of the input fields are empty, an error message is displayed.
The callApi() function calls the CryptoCompare API using the Axios library, passing the user-selected cryptocurrency and fiat currency values. Upon receiving the response from the API, the function processes the data and displays it in a user-friendly format on the page.
Conclusion
This project showcases the ability to use web technologies such as HTML, CSS, and JavaScript, along with external APIs, to build useful applications that provide real-time data to the users. It also highlights the importance of using libraries like Axios to simplify the process of making HTTP requests to APIs.