Skip to content

Console-based stock price monitor built with C# and .NET 10, integrating the Brapi API to track B3 assets with secure credential management and real-time alerts.

License

Notifications You must be signed in to change notification settings

EduardoCassanha/SeePrices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SeePrices

SeePrices Demo

C# .NET 10 Status

A console-based stock price monitor built in C# that integrates with financial APIs to track B3 (Brazilian Stock Exchange) assets. The project emphasizes asynchronous HTTP communication, secure credential management, and clean input validation.

Features

  • Near Real-Time Monitoring: Polls live stock prices from the Brapi API at 30-second intervals.
  • Secure Secrets Management: Uses .NET User Secrets to ensure API tokens are never exposed in the source code.
  • Error Handling: Handles network issues and invalid stock tickers (HTTP 404).
  • Input Validation: Validates stock symbols and target prices before monitoring begins.
  • Audio Alerts: Emits an audible alert when the target price is reached (Windows only).

Security & Best Practices

This project follows industry best practices for secret management by isolating credentials from source code. API tokens are stored locally using the .NET Secret Manager, making the repository safe for public display.

Technologies

  • C# / .NET 10
  • System.Text.Json for high-performance JSON serialization.
  • Microsoft.Extensions.Configuration for secure configuration and secret handling.

Design Notes

  • Uses polling instead of WebSockets due to API limitations.
  • Console-based by design to emphasize core C# and .NET fundamentals.
  • Secrets are managed locally using .NET User Secrets to avoid credential exposure.

Roadmap

  • Persist monitoring logs to local files.
  • Improve graceful shutdown handling (Ctrl + C).
  • Refactor API communication into a dedicated service layer.

Getting Started

Prerequisites

  • .NET 10 SDK
  • Free API token from Brapi

Installation

  1. Clone the repository
   git clone https://github.com/EduardoCassanha/seeprices.git
   cd seeprices
  1. Configure your API token
   dotnet user-secrets init
   dotnet user-secrets set "BrapiToken" "your-token-here"
  1. Run the application
   dotnet run

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Console-based stock price monitor built with C# and .NET 10, integrating the Brapi API to track B3 assets with secure credential management and real-time alerts.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages