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