How hakandinger/rsical works
Project type and purpose
• This is a small open-source C# library/tool that calculates the Exponential Moving Average (EMA)-based Relative Strength Index (RSI) for Binance Kline data.
• It is designed to be integrated into trading bots or data-analysis workflows.
File structure
• Top-level:
• LICENSE
• README.md
• RSICalculator.cs
• No frontend or database layers—this is a single-module library.
• RSICalculator.cs holds both the Binance data fetch logic (via Binance.Net) and the RSI computation.
README for additional insights
• Uses Binance.Net to fetch historical Kline (candlestick) data from Binance’s REST API.
• Exposes a configurable RSI period.
• Intended integration points are trading bots or other C# applications.
Main components
a. External Binance REST API
b. Binance.Net .NET client library (wrapper)
c. RSI Calculation Module (this project’s core in RSICalculator.cs)
d. Consumer Application (e.g., trading bot)
Relationships and interactions
1. Consumer Application calls into the RSI Calculation Module.
2. RSI Module uses the Binance.Net client to request Kline data from the Binance REST API.
3. Binance.Net client issues HTTP(S) requests to Binance and parses JSON responses.
4. RSI Module applies EMA logic on the Kline data to compute the RSI series.
5. Computed RSI values are returned to the Consumer Application.
Key architectural patterns and design principles
• Single-responsibility: data fetching vs. computation.
• Dependency inversion: consumer depends on an interface/abstraction of the RSI module.
• Extensibility: configurable RSI period and pluggable data sources.
Technologies, frameworks, and libraries
• .NET/C# runtime
• Binance.Net (NuGet package) for API access
• System.Net.Http under the hood
• LINQ/collections for EMA calculation