* Add synthApi * Put confidence for Synth proba * Update the code * Update readme * Fix bootstraping * fix github build * Update the endpoints for scenario * Add scenario and update backtest modal * Update bot modal * Update interfaces for synth * add synth to backtest * Add Kelly criterion and better signal * Update signal confidence * update doc * save leaderboard and prediction * Update nswag to generate ApiClient in the correct path * Unify the trading modal * Save miner and prediction * Update messaging and block new signal until position not close when flipping off * Rename strategies to indicators * Update doc * Update chart + add signal name * Fix signal direction * Update docker webui * remove crypto npm * Clean
59 lines
2.8 KiB
C#
59 lines
2.8 KiB
C#
using Managing.Domain.Synth.Models;
|
|
|
|
namespace Managing.Application.Abstractions.Services;
|
|
|
|
/// <summary>
|
|
/// Interface for communicating with the Synth API
|
|
/// </summary>
|
|
public interface ISynthApiClient
|
|
{
|
|
/// <summary>
|
|
/// Fetches the current leaderboard from Synth API
|
|
/// </summary>
|
|
/// <param name="config">Synth configuration containing API key and settings</param>
|
|
/// <returns>List of miners with their rankings and stats</returns>
|
|
Task<List<MinerInfo>> GetLeaderboardAsync(SynthConfiguration config);
|
|
|
|
/// <summary>
|
|
/// Fetches historical leaderboard data from Synth API for a specific time range
|
|
/// </summary>
|
|
/// <param name="startTime">Start time for historical data (ISO 8601 format)</param>
|
|
/// <param name="endTime">End time for historical data (ISO 8601 format)</param>
|
|
/// <param name="config">Synth configuration containing API key and settings</param>
|
|
/// <returns>List of miners with their historical rankings and stats</returns>
|
|
Task<List<MinerInfo>> GetHistoricalLeaderboardAsync(DateTime startTime, DateTime endTime, SynthConfiguration config);
|
|
|
|
/// <summary>
|
|
/// Fetches latest predictions from specified miners
|
|
/// </summary>
|
|
/// <param name="minerUids">List of miner UIDs to get predictions from</param>
|
|
/// <param name="asset">Asset symbol (e.g., "BTC", "ETH")</param>
|
|
/// <param name="timeIncrement">Time interval in seconds between each prediction point</param>
|
|
/// <param name="timeLength">Total prediction time length in seconds</param>
|
|
/// <param name="config">Synth configuration containing API key and settings</param>
|
|
/// <returns>List of predictions from the specified miners</returns>
|
|
Task<List<MinerPrediction>> GetMinerPredictionsAsync(
|
|
List<int> minerUids,
|
|
string asset,
|
|
int timeIncrement,
|
|
int timeLength,
|
|
SynthConfiguration config);
|
|
|
|
/// <summary>
|
|
/// Fetches historical predictions from specified miners for a specific time point
|
|
/// </summary>
|
|
/// <param name="minerUids">List of miner UIDs to get predictions from</param>
|
|
/// <param name="asset">Asset symbol (e.g., "BTC", "ETH")</param>
|
|
/// <param name="startTime">Start time for historical predictions (when the prediction was made)</param>
|
|
/// <param name="timeIncrement">Time interval in seconds between each prediction point</param>
|
|
/// <param name="timeLength">Total prediction time length in seconds</param>
|
|
/// <param name="config">Synth configuration containing API key and settings</param>
|
|
/// <returns>List of historical predictions from the specified miners</returns>
|
|
Task<List<MinerPrediction>> GetHistoricalMinerPredictionsAsync(
|
|
List<int> minerUids,
|
|
string asset,
|
|
DateTime startTime,
|
|
int timeIncrement,
|
|
int timeLength,
|
|
SynthConfiguration config);
|
|
} |