Skip to content

MouraGabriel53/InvestAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💰 InvestAPI

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.git
npm run dev

🔍 Preview

==================== 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...

🚀 Features

✅ 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


🛠️ Technologies Used

  • Node.js
  • JavaScript (ESModules)
  • Google GenAI SDK
  • dotenv
  • readline-sync
  • node-fetch
  • Express (backend API)
  • Git & GitHub

📦 Installation

Install all required dependencies manually:

npm install dotenv
npm install readline-sync
npm install @google/genai
npm install node-fetch
npm install express

📖 How It Works

Make 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

⚖️ License

MIT LICENSE

🚧 Building

Currently, the project is under development and may receive frequent updates.

Made with 💚 by Gabriel Moura

About

API about investiments

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors