Update position saving and update
This commit is contained in:
@@ -171,9 +171,11 @@ internal static class GmxV2Mappers
|
||||
PositionInitiator.User,
|
||||
gmxPosition.Date,
|
||||
new User());
|
||||
// For the Open trade, use the Open trade's ExchangeOrderId if available, otherwise use a new GUID
|
||||
var openExchangeOrderId = gmxPosition.Open?.ExchangeOrderId ?? Guid.NewGuid().ToString();
|
||||
position.Open = new Trade(position.Date, direction, TradeStatus.Filled, TradeType.Market, ticker,
|
||||
(decimal)gmxPosition.Quantity, (decimal)gmxPosition.Price, (decimal)gmxPosition.Leverage,
|
||||
gmxPosition.Open.ExchangeOrderId, "");
|
||||
openExchangeOrderId, "");
|
||||
|
||||
if (gmxPosition.TakeProfit1 != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user