The primary objective of this project is to download financial data from various providers and apply technical indicators to comprehensively analyze this data. Additionally, the project has expanded to include gathering data on new layer 1 blockchains from three different providers.
This project features a versatile system that seamlessly connects with multiple financial providers to obtain essential data. Integration has been achieved with the following providers:
- Binance: Utilizing the REST API for data retrieval.
- Alpaca: Employing the C# SDK for Alpaca for streamlined integration.
- UniswapV3: Utilizing GraphQL for efficient data access within the Ethereum ecosystem.
- PancakeswapV3:Utilizing GraphQL for efficient data access within the Binance ecosystem.
- Alternative.me: Utilizing the REST API for data retrieval for the Crypto Fear And Greed Index.
- CNN Stock Fear And Greed Index: Utilizing the REST API for data retrieval from RapidApi.
- CoinPaprika, CoinMarketCap, CoinRanking: Utilizing the REST API for data retrieval and filtering for layer 1 blockchains.
- WallStreetZen: Preparing for integration (coming soon).
- GeckoTerminal: Coming soon.
The project is built around two core services:
- Sync Service: Responsible for initiating data updates by communicating with the respective exchange providers. It effectively manages the synchronization of financial data.
- Analysis Service: The heart of the system, orchestrating the composition of data retrieved from the database. It then applies various technical indicators using extension methods to derive valuable insights.
The project incorporates Swagger to facilitate easy testing of endpoints, ensuring a user-friendly experience for both developers and end-users.
The project follows the principles of Clean Architecture with some personal modifications. Here's an architecture diagram (pending update with the latest providers).
Technologies & Tools used:
- ASP.NET Core 8
- Docker
- Mediatr (CQRS pattern)
- PostgreSQL
- PgAdmin
- Redis
- Dapper
- Structured logging with Seq
- Multiple NuGet packages (Serilog, Polly, FluentValidation, MailKit, HtmlAgilityPack, Moq, Xunit, NetArchTest, TestContainers, StockIndicators, OoplesFinanceStockIndicators, WireMock-Net, AlpacaSDK )
- Brotli Compression in endpoints
- Hangfire for jobs
- Prometheus
- Grafana
- Add your
appsettings.prod.json
file and ensure it is located at./TechnicalAnalysis.Infrastructure.Host/appsettings.prod.json:/app/appsettings.prod.json
(or modify the Docker path in the Docker Compose file). - Fill in your own details (such as API keys, etc.).
- Open the Command Prompt.
- Navigate to the root folder with the Docker Compose file using
cd path
. - Run the
docker compose up --build
command.
Docker command to stop all containers:
docker stop $(docker ps -a -q)
Swagger: http://localhost:5000/swagger/index.html
Seq Events: http://localhost:5341/#/events
Hangfire Jobs: http://localhost:5000/hangfire
Grafana: http://localhost:3000/
Prometheus Graph: http://localhost:9090/graph
Prometheus Metrics: http://localhost:9090/metrics
Gateway API: https://localhost:6001/swagger/index.html
PgAdmin4: http://localhost:16543/login
- Username:
[email protected]
(unless you change docker-compose.yml file) - Password:
admin
(unless you change docker-compose.yml file)
- Create an endpoint where consumers can pass candlestick data, and indicators will be produced on this data.
- Implement WallStreetZen.
- Implement GeckoTerminal.
- Add mutation tests