Fix bot a bit

This commit is contained in:
2025-03-03 06:24:36 +01:00
parent c0d54f35f5
commit c28a4310b4
3 changed files with 4 additions and 2 deletions

View File

@@ -93,7 +93,7 @@ public class TradingController : ControllerBase
/// </summary>
/// <param name="identifier">The unique identifier of the position to close.</param>
/// <returns>The closed position.</returns>
[HttpGet("ClosePosition")]
[HttpPost("ClosePosition")]
public async Task<ActionResult<Position>> ClosePosition(string identifier)
{
var position = _tradingService.GetPositionByIdentifier(identifier);

View File

@@ -109,7 +109,7 @@ namespace Managing.Application.Trading
? position.Status
: PositionStatus.Rejected;
if (request.IsForPaperTrading)
if (!request.IsForPaperTrading)
{
tradingService.InsertPosition(position);
}

View File

@@ -77,7 +77,9 @@ public static class GmxV2Helpers
case Enums.Ticker.LTC: return Constants.GMX.Markets.LTCUSD;
case Enums.Ticker.XRP: return Constants.GMX.Markets.XRPUSD;
case Enums.Ticker.WIF: return Constants.GMX.Markets.WIFUSD;
case Enums.Ticker.BNB: return Constants.GMX.Markets.BNBUSD;
case Enums.Ticker.ORDI: return Constants.GMX.Markets.ORDIUSD;
case Enums.Ticker.DOGE: return Constants.GMX.Markets.DOGEUSD;
default: throw new ArgumentOutOfRangeException(nameof(ticker), "Invalid ticker value.");
}
}