Price reminder and init approval
* Start price reminder grain * Add config and init grain at startup * Save init wallet when already init
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using Managing.Domain.Candles;
|
||||
using Orleans;
|
||||
|
||||
namespace Managing.Application.Abstractions.Grains;
|
||||
|
||||
/// <summary>
|
||||
/// Orleans grain interface for candle storage and retrieval.
|
||||
/// This grain manages in-memory historical candle data with state persistence
|
||||
/// and subscribes to price streams for real-time updates.
|
||||
/// </summary>
|
||||
public interface ICandleStoreGrain : IGrainWithStringKey
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the current list of historical candles (up to 500 most recent)
|
||||
/// </summary>
|
||||
/// <returns>List of candles ordered by date</returns>
|
||||
Task<List<Candle>> GetCandlesAsync();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using Orleans;
|
||||
|
||||
namespace Managing.Application.Abstractions.Grains;
|
||||
|
||||
/// <summary>
|
||||
/// Orleans grain interface for daily price fetching operations.
|
||||
/// This stateless worker grain handles fetching daily price data from external APIs
|
||||
/// and publishing to Orleans streams.
|
||||
/// </summary>
|
||||
public interface IPriceFetcher1DayGrain : IGrainWithIntegerKey
|
||||
{
|
||||
/// <summary>
|
||||
/// Fetches daily price data for all supported exchange/ticker combinations
|
||||
/// and publishes new candles to their respective streams.
|
||||
/// </summary>
|
||||
/// <returns>True if the operation completed successfully, false otherwise</returns>
|
||||
Task<bool> FetchAndPublishPricesAsync();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using Orleans;
|
||||
|
||||
namespace Managing.Application.Abstractions.Grains;
|
||||
|
||||
/// <summary>
|
||||
/// Orleans grain interface for 1-hour price fetching operations.
|
||||
/// This stateless worker grain handles fetching 1-hour price data from external APIs
|
||||
/// and publishing to Orleans streams.
|
||||
/// </summary>
|
||||
public interface IPriceFetcher1HourGrain : IGrainWithIntegerKey
|
||||
{
|
||||
/// <summary>
|
||||
/// Fetches 1-hour price data for all supported exchange/ticker combinations
|
||||
/// and publishes new candles to their respective streams.
|
||||
/// </summary>
|
||||
/// <returns>True if the operation completed successfully, false otherwise</returns>
|
||||
Task<bool> FetchAndPublishPricesAsync();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using Orleans;
|
||||
|
||||
namespace Managing.Application.Abstractions.Grains;
|
||||
|
||||
/// <summary>
|
||||
/// Orleans grain interface for 4-hour price fetching operations.
|
||||
/// This stateless worker grain handles fetching 4-hour price data from external APIs
|
||||
/// and publishing to Orleans streams.
|
||||
/// </summary>
|
||||
public interface IPriceFetcher4HourGrain : IGrainWithIntegerKey
|
||||
{
|
||||
/// <summary>
|
||||
/// Fetches 4-hour price data for all supported exchange/ticker combinations
|
||||
/// and publishes new candles to their respective streams.
|
||||
/// </summary>
|
||||
/// <returns>True if the operation completed successfully, false otherwise</returns>
|
||||
Task<bool> FetchAndPublishPricesAsync();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using Orleans;
|
||||
|
||||
namespace Managing.Application.Abstractions.Grains;
|
||||
|
||||
/// <summary>
|
||||
/// Orleans grain interface for 5-minute price fetching operations.
|
||||
/// This stateless worker grain handles fetching 5-minute price data from external APIs
|
||||
/// and publishing to Orleans streams.
|
||||
/// </summary>
|
||||
public partial interface IPriceFetcher5MinGrain : IGrainWithIntegerKey
|
||||
{
|
||||
/// <summary>
|
||||
/// Fetches 5-minute price data for all supported exchange/ticker combinations
|
||||
/// and publishes new candles to their respective streams.
|
||||
/// </summary>
|
||||
/// <returns>True if the operation completed successfully, false otherwise</returns>
|
||||
Task<bool> FetchAndPublishPricesAsync();
|
||||
}
|
||||
Reference in New Issue
Block a user