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:
@@ -147,5 +147,18 @@ namespace Managing.Api.Controllers
|
||||
var user = await GetUser();
|
||||
return Ok(_AccountService.DeleteAccount(user, name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the approval status for all supported trading exchanges for the authenticated user.
|
||||
/// Returns a list showing each exchange with its initialization status (true/false).
|
||||
/// </summary>
|
||||
/// <returns>A list of exchange approval statuses.</returns>
|
||||
[HttpGet("exchange-approval-status")]
|
||||
public async Task<ActionResult<List<ExchangeApprovalStatus>>> GetExchangeApprovalStatus()
|
||||
{
|
||||
var user = await GetUser();
|
||||
var exchangeStatuses = await _AccountService.GetExchangeApprovalStatusAsync(user);
|
||||
return Ok(exchangeStatuses);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ using Managing.Api.Models.Requests;
|
||||
using Managing.Api.Models.Responses;
|
||||
using Managing.Application.Abstractions.Grains;
|
||||
using Managing.Application.Abstractions.Services;
|
||||
using Managing.Application.Hubs;
|
||||
using Managing.Application.ManageBot.Commands;
|
||||
using Managing.Domain.Backtests;
|
||||
using Managing.Domain.Bots;
|
||||
@@ -16,7 +15,6 @@ using Managing.Domain.Trades;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Api.Controllers;
|
||||
@@ -35,7 +33,6 @@ public class DataController : ControllerBase
|
||||
private readonly ICacheService _cacheService;
|
||||
private readonly IStatisticService _statisticService;
|
||||
private readonly IAgentService _agentService;
|
||||
private readonly IHubContext<CandleHub> _hubContext;
|
||||
private readonly IMediator _mediator;
|
||||
private readonly ITradingService _tradingService;
|
||||
private readonly IGrainFactory _grainFactory;
|
||||
@@ -58,7 +55,6 @@ public class DataController : ControllerBase
|
||||
ICacheService cacheService,
|
||||
IStatisticService statisticService,
|
||||
IAgentService agentService,
|
||||
IHubContext<CandleHub> hubContext,
|
||||
IMediator mediator,
|
||||
ITradingService tradingService,
|
||||
IGrainFactory grainFactory)
|
||||
@@ -68,7 +64,6 @@ public class DataController : ControllerBase
|
||||
_cacheService = cacheService;
|
||||
_statisticService = statisticService;
|
||||
_agentService = agentService;
|
||||
_hubContext = hubContext;
|
||||
_mediator = mediator;
|
||||
_tradingService = tradingService;
|
||||
_grainFactory = grainFactory;
|
||||
|
||||
@@ -183,7 +183,7 @@ public class TradingController : BaseController
|
||||
return Forbid("You don't have permission to initialize this wallet address. You can only initialize your own wallet addresses.");
|
||||
}
|
||||
|
||||
var result = await _tradingService.InitPrivyWallet(publicAddress);
|
||||
var result = await _tradingService.InitPrivyWallet(publicAddress, TradingExchanges.GmxV2);
|
||||
return Ok(result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user