Trading Assistant is an application designed to provide a user-friendly interface for managing hedged portfolios with Interactive Brokers (IBKR). Connecting via the IBKR REST API, this tool empowers users to efficiently monitor and manage overall portfolio risk by visualizing real-time risk curves and key portfolio Greeks—including delta, charm, vega, and theta. By delivering real-time risk analytics in a clear format, Trading Assistant enables users to quickly assess their portfolio’s risk profile and make well-informed adjustments to maintain their desired level of risk exposure.
It is a modern Windows application built with C#, .NET and WinUI, designed to provide advanced trading functionalities by integrating with Interactive Brokers via Web API. The solution is modular, leveraging best practices in dependency injection, configuration, and logging, and is structured for maintainability and extensibility.
- Features
- Solution Structure
- Getting Started
- Configuration
- Logging
- Testing
- Contributing
- Feedback or Questions?
- WinUI Desktop Application: Modern, responsive UI for Windows 10/11.
- Interactive Brokers Integration: Real-time trading, account management, and market data via IB Client Portal API.
- Dependency Injection: Built on
Microsoft.Extensions.DependencyInjection
for flexible service management. - Configuration: Supports layered configuration via
appsettings.json
and user-specific overrides. - Structured Logging: Uses Serilog for robust, rolling file logging.
- Unit Testing: MSTest-based tests for core logic.
The solution is organized into the following projects:
Project | Description |
---|---|
App | Main WinUI application, entry point, and DI setup. |
AppCore | Core logic, shared utilities, and abstractions. |
InteractiveBrokers | Integration layer for Interactive Brokers API (REST and WebSocket). |
AppCore.Tests | Unit tests for AppCore using MSTest. |
- Windows 10/11 (minimum version 10.0.17763.0)
- .NET 9 SDK
- Visual Studio 2022 (with .NET Desktop and WinUI workloads)
Clone the repository:
git clone https://github.com/petrochuk/Trading-Assistant.git
Open the solution in Visual Studio:
To run the application, press F5
in Visual Studio or use the Start button.
Configuration is managed via appsettings.json
and appsettings.Debug.json
. The application supports layered configuration, allowing you to override settings in appsettings.Debug.json
for development purposes.
Logging is handled using Serilog, with configuration defined in appsettings.json
. The application logs to a rolling file located in the Logs
directory. You can customize the logging level and output format in the configuration files.
Unit tests are located in the AppCore.Tests
project. To run the tests, open the Test Explorer in Visual Studio and execute all tests. The tests use MSTest framework and cover core functionalities of the application.
We welcome contributions to the Trading Assistant project! If you would like to contribute, please follow these steps:
- Fork the repository on GitHub.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with clear messages.
- Push your changes to your forked repository.
- Open a pull request against the
main
branch of the original repository.
If you have any feedback or questions, please feel free to open an issue on GitHub, reach out to via email or Microsoft Teams.