Fix bot a bit
This commit is contained in:
@@ -93,7 +93,7 @@ public class TradingController : ControllerBase
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="identifier">The unique identifier of the position to close.</param>
|
/// <param name="identifier">The unique identifier of the position to close.</param>
|
||||||
/// <returns>The closed position.</returns>
|
/// <returns>The closed position.</returns>
|
||||||
[HttpGet("ClosePosition")]
|
[HttpPost("ClosePosition")]
|
||||||
public async Task<ActionResult<Position>> ClosePosition(string identifier)
|
public async Task<ActionResult<Position>> ClosePosition(string identifier)
|
||||||
{
|
{
|
||||||
var position = _tradingService.GetPositionByIdentifier(identifier);
|
var position = _tradingService.GetPositionByIdentifier(identifier);
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ namespace Managing.Application.Trading
|
|||||||
? position.Status
|
? position.Status
|
||||||
: PositionStatus.Rejected;
|
: PositionStatus.Rejected;
|
||||||
|
|
||||||
if (request.IsForPaperTrading)
|
if (!request.IsForPaperTrading)
|
||||||
{
|
{
|
||||||
tradingService.InsertPosition(position);
|
tradingService.InsertPosition(position);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ public static class GmxV2Helpers
|
|||||||
case Enums.Ticker.LTC: return Constants.GMX.Markets.LTCUSD;
|
case Enums.Ticker.LTC: return Constants.GMX.Markets.LTCUSD;
|
||||||
case Enums.Ticker.XRP: return Constants.GMX.Markets.XRPUSD;
|
case Enums.Ticker.XRP: return Constants.GMX.Markets.XRPUSD;
|
||||||
case Enums.Ticker.WIF: return Constants.GMX.Markets.WIFUSD;
|
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.ORDI: return Constants.GMX.Markets.ORDIUSD;
|
||||||
|
case Enums.Ticker.DOGE: return Constants.GMX.Markets.DOGEUSD;
|
||||||
default: throw new ArgumentOutOfRangeException(nameof(ticker), "Invalid ticker value.");
|
default: throw new ArgumentOutOfRangeException(nameof(ticker), "Invalid ticker value.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user