An interactive API that provides information about key Brazilian economic rates (Selic, CDI, IPCA) and also offers smart investment advice with an AI assistant called InvestAI.
🔍 Preview • 🚀 Features • 🛠️ Tech Stack • 📦 Installation • 📖 How It Works • ⚖️ License • 🚧 Building
git clone https://github.com/MouraGabriel53/InvestAPI.gitnpm run dev==================== Welcome | InvestAPI ====================
💰 Select a rate to view the value 💰
[0] - Selic
[1] - CDI
[2] - IPCA
[3] - Ask to InvestAI
[4] - Exit
🔍 Type the number:
-> Answer: 3
😁 Let's get started! What's your name?:
-> Answer: Gabriel
🤓 Type what you want ask to InvestAI:
-> Answer: Where should I invest safely in 2025?
InvestAI thinking... 🤔
🤖 InvestAI answer: Hello Gabriel! I'm InvestAI. For safe investments in 2025, consider...
✅ Real-time queries for major Brazilian economic rates:
- SELIC
- CDI
- IPCA
🤖 Ask InvestAI (powered by Gemini API):
- Responds to investment-related questions
- Provides friendly and smart advice
- Uses artificial intelligence to guide beginner investors
🎛️ CLI interface with interactive terminal menus
- Node.js
- JavaScript (ESModules)
- Google GenAI SDK
- dotenv
- readline-sync
- node-fetch
- Express (backend API)
- Git & GitHub
Install all required dependencies manually:
npm install dotenv
npm install readline-sync
npm install @google/genai
npm install node-fetch
npm install expressMake sure your package.json is configured like this:
{
"name": "server",
"version": "1.0.0",
"description": "Server Backend",
"main": "server.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js",
"dev": "node --watch server.js"
},
"author": "Your Name",
"license": "ISC"
}
Then, create a .env file in the root directory and add your Gemini API key:
GEMINI_API_KEY=your_real_api_key_here
Currently, the project is under development and may receive frequent updates.
Made with 💚 by Gabriel Moura