This is the source code for the blog post Creating a Cryptocurrency Price Bot in .NET 5 (Core).
Make sure that you have an environment setup to run .NET 5 (Core), such as Visual Studio 2019, JetBrains Rider, or just Visual Studio Code with the C# Extension installed.
To be able to send an email notification you will need to update the SMTP login credentials inside the Notifications/SmtpEmailNotificationService.cs
file to your own details.
You should also update Program.cs with more current prices for both Bitcon (BTC) and Ethereum (ETH).
Use the IPriceAnalyzer
interface to create new analyzers, this could for example be a PriceBelowAnalyzer
that notifies the user when the price dips below a certain threshold and its implementation would be similar to the PriceAboveAnalyzer
.
Likewise use the INotificationService
interface to create other methods of being notified, for example this could be via SMS using twilio.
Enjoy!