If you’re looking to manage and retrieve both crypto and fiat currency rates seamlessly, look no further than Currencyinfo. This powerful, self-hosted service replaces the deprecated InfoServices and is built from the ground up to meet your financial data needs. In this article, we’ll walk you through the installation and setup process for Currencyinfo, ensuring you can hit the ground running.
Installation Requirements
Before diving in, ensure you have the necessary prerequisites:
- Operating System: Ubuntu 18+
- NodeJS version: v16+
- MongoDB: Follow the installation instructions here.
Step-by-Step Setup Guide
Let’s break it down step-by-step to get Currencyinfo up and running:
- Switch to the New User:
su - adamant
- Clone the Repository:
git clone https://github.com/Adamant-im/adamant-currencyinfo-services
- Navigate to the Project Directory:
cd adamant-currencyinfo-services
- Install Dependencies:
npm i
Pre-launch Configuration
Next, you’ll want to tune some parameters in your configuration file. Open the configuration file for editing:
nano config.json
Within this file, you will configure settings such as:
- List of Coins: Define which coins you wish to track from platforms like Coinmarketcap and Coingecko.
- Fiat Currency Pairs: Specify the fiat currency pairs you want to monitor.
- API Keys: Input your Coinmarketcap and Cryptocompare API keys.
- Refresh Interval: Set the frequency at which data should be fetched from the data sources.
Launching Currencyinfo
Now that you have configured everything, it’s time to launch Currencyinfo:
pm2 start --name info-service app.js
This command uses the process manager to keep your service running smoothly.
Configuring Automatic Start
If you want your service to start automatically upon your server’s reboot, you need to add it to the cron jobs:
crontab -e
Then add the following line:
@reboot cd /home/adamant/adamant-currencyinfo-services && pm2 start --name info-service app.js
Testing Your Setup
To verify that your Currencyinfo installation is successful, open your web browser and visit:
http://IP:36668/get?coin=ADM
Replace IP with your server’s actual IP address.
Troubleshooting
In case of any issues during setup or operation, consider the following troubleshooting ideas:
- Check if MongoDB is running properly and accessible.
- Verify that you have the correct API keys and that they are not blocked due to excessive requests.
- Examine the logs using pm2 logs info-service for any error messages.
- Make sure NodeJS and its dependencies are installed correctly.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.