docker files fixes from liaqat
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using Managing.Domain.Accounts;
|
||||
|
||||
namespace Managing.Application.Abstractions.Repositories;
|
||||
|
||||
public interface IAccountRepository
|
||||
{
|
||||
Task<Account> GetAccountByNameAsync(string name);
|
||||
Task<Account> GetAccountByKeyAsync(string key);
|
||||
Task InsertAccountAsync(Account account);
|
||||
void DeleteAccountByName(string name);
|
||||
IEnumerable<Account> GetAccounts();
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
using Managing.Domain.Backtests;
|
||||
|
||||
namespace Managing.Application.Abstractions;
|
||||
|
||||
public interface IBacktestRepository
|
||||
{
|
||||
void InsertBacktest(Backtest result);
|
||||
IEnumerable<Backtest> GetBacktests();
|
||||
void DeleteBacktestById(string id);
|
||||
void DeleteAllBacktests();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Managing.Common;
|
||||
using Managing.Domain.Candles;
|
||||
|
||||
namespace Managing.Application.Abstractions.Repositories;
|
||||
|
||||
public interface ICandleRepository
|
||||
{
|
||||
Task<IList<Candle>> GetCandles(
|
||||
Enums.TradingExchanges exchange,
|
||||
Enums.Ticker ticker,
|
||||
Enums.Timeframe timeframe,
|
||||
DateTime start);
|
||||
Task<IList<Enums.Ticker>> GetTickersAsync(
|
||||
Enums.TradingExchanges exchange,
|
||||
Enums.Timeframe timeframe,
|
||||
DateTime start);
|
||||
void InsertCandle(Candle candle);
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using Managing.Domain.Accounts;
|
||||
using Managing.Domain.Candles;
|
||||
using Managing.Domain.Evm;
|
||||
using Managing.Domain.Trades;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Application.Abstractions.Repositories;
|
||||
|
||||
public interface IEvmManager
|
||||
{
|
||||
(string Key, string Secret) GenerateAddress();
|
||||
string GetAddressFromMnemo(string mnemo);
|
||||
Task<decimal> GetAddressBalance(string address);
|
||||
Task<DateTime> GetBlockDate(int blockNumber);
|
||||
Task<List<Holder>> GetContractHolders(string contractAddress, DateTime since);
|
||||
string SignMessage(string message, string privateKey);
|
||||
string VerifySignature(string signature, string message);
|
||||
Task<List<EvmBalance>> GetBalances(Chain chain, int page, int pageSize, string publicAddress);
|
||||
Task<List<EvmBalance>> GetAllBalancesOnAllChain(string publicAddress);
|
||||
Task<List<Candle>> GetCandles(SubgraphProvider subgraphProvider, Ticker ticker, DateTime startDate, Timeframe interval);
|
||||
decimal GetVolume(SubgraphProvider subgraphProvider, Ticker ticker);
|
||||
Task<List<Ticker>> GetAvailableTicker();
|
||||
Task<Candle> GetCandle(SubgraphProvider subgraphProvider, Ticker ticker);
|
||||
Task<bool> InitAddress(string chainName, string publicAddress, string privateKey);
|
||||
Task<bool> Send(Chain chain, Ticker ticker, decimal amount, string publicAddress, string privateKey, string receiverAddress);
|
||||
Task<EvmBalance> GetTokenBalance(string chainName, Ticker ticker, string publicAddress);
|
||||
Task<bool> CancelOrders(Account account, Ticker ticker);
|
||||
Task<Trade> IncreasePosition(Account account, Ticker ticker, TradeDirection direction, decimal price, decimal quantity, decimal? leverage = 1);
|
||||
Task<Trade> GetTrade(Account account, string chainName, Ticker ticker);
|
||||
Task<Trade> DecreasePosition(Account account, Ticker ticker, TradeDirection direction, decimal price, decimal quantity, decimal? leverage);
|
||||
Task<decimal> QuantityInPosition(string chainName, string publicAddress, Ticker ticker);
|
||||
Task<Trade> DecreaseOrder(Account account, TradeType tradeType, Ticker ticker, TradeDirection direction, decimal price, decimal quantity, decimal? leverage);
|
||||
Task<decimal> GetFee(string chainName);
|
||||
Task<List<Trade>> GetOrders(Account account, Ticker ticker);
|
||||
Task<Trade> GetTrade(string reference, string arbitrum, Ticker ticker);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Managing.Domain.MoneyManagements;
|
||||
|
||||
namespace Managing.Application.Abstractions.Repositories;
|
||||
|
||||
public interface ISettingsRepository
|
||||
{
|
||||
Task<MoneyManagement> GetMoneyManagement(string name);
|
||||
Task InsertMoneyManagement(MoneyManagement request);
|
||||
void UpdateMoneyManagement(MoneyManagement moneyManagement);
|
||||
IEnumerable<MoneyManagement> GetMoneyManagements();
|
||||
void DeleteMoneyManagement(string name);
|
||||
void DeleteMoneyManagements();
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using Managing.Domain.Statistics;
|
||||
|
||||
namespace Managing.Application.Abstractions.Repositories;
|
||||
|
||||
public interface IStatisticRepository
|
||||
{
|
||||
Task InsertTopVolumeTicker(TopVolumeTicker topVolumeTicker);
|
||||
IList<TopVolumeTicker> GetTopVolumeTickers(DateTime date);
|
||||
Task SaveSpotligthtOverview(SpotlightOverview overview);
|
||||
IList<SpotlightOverview> GetSpotlightOverviews(DateTime date);
|
||||
void UpdateSpotlightOverview(SpotlightOverview overview);
|
||||
List<Trader> GetBestTraders();
|
||||
void UpdateBestTrader(Trader trader);
|
||||
Task InsertBestTrader(Trader trader);
|
||||
Task RemoveBestTrader(Trader trader);
|
||||
List<Trader> GetBadTraders();
|
||||
void UpdateBadTrader(Trader trader);
|
||||
Task InsertBadTrader(Trader trader);
|
||||
Task RemoveBadTrader(Trader trader);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using Managing.Domain.Scenarios;
|
||||
using Managing.Domain.Strategies;
|
||||
using Managing.Domain.Trades;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Application.Abstractions.Repositories;
|
||||
|
||||
public interface ITradingRepository
|
||||
{
|
||||
Scenario GetScenarioByName(string scenario);
|
||||
void InsertSignal(Signal signal);
|
||||
void InsertPosition(Position position);
|
||||
void UpdatePosition(Position position);
|
||||
Strategy GetStrategyByName(string strategy);
|
||||
void InsertScenario(Scenario scenario);
|
||||
void InsertStrategy(Strategy strategy);
|
||||
IEnumerable<Scenario> GetScenarios();
|
||||
IEnumerable<Strategy> GetStrategies();
|
||||
void DeleteScenario(string name);
|
||||
void DeleteStrategy(string name);
|
||||
void DeleteScenarios();
|
||||
void DeleteStrategies();
|
||||
Position GetPositionByIdentifier(string identifier);
|
||||
IEnumerable<Position> GetPositions(PositionInitiator positionInitiator);
|
||||
IEnumerable<Position> GetPositionsByStatus(PositionStatus positionStatus);
|
||||
Fee GetFee(TradingExchanges exchange);
|
||||
void InsertFee(Fee fee);
|
||||
void UpdateFee(Fee fee);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using Managing.Domain.Users;
|
||||
|
||||
namespace Managing.Application.Abstractions.Repositories;
|
||||
|
||||
public interface IUserRepository
|
||||
{
|
||||
Task<User> GetUserByNameAsync(string name);
|
||||
Task InsertUserAsync(User user);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Managing.Common;
|
||||
using Managing.Domain.Workers;
|
||||
|
||||
namespace Managing.Application.Abstractions.Repositories;
|
||||
|
||||
public interface IWorkerRepository
|
||||
{
|
||||
Task DisableWorker(Enums.WorkerType workerType);
|
||||
Task EnableWorker(Enums.WorkerType workerType);
|
||||
Task<Worker> GetWorkerAsync(Enums.WorkerType workerType);
|
||||
IEnumerable<Worker> GetWorkers();
|
||||
Task InsertWorker(Worker worker);
|
||||
Task UpdateWorker(Enums.WorkerType workerType, int executionCount);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using Managing.Domain.Workflows.Synthetics;
|
||||
|
||||
namespace Managing.Application.Abstractions.Repositories;
|
||||
|
||||
public interface IWorkflowRepository
|
||||
{
|
||||
bool DeleteWorkflow(string name);
|
||||
Task<SyntheticWorkflow> GetWorkflow(string name);
|
||||
IEnumerable<SyntheticWorkflow> GetWorkflows();
|
||||
Task InsertWorkflow(SyntheticWorkflow workflow);
|
||||
Task UpdateWorkflow(SyntheticWorkflow workflow);
|
||||
}
|
||||
Reference in New Issue
Block a user