using Newtonsoft.Json;

namespace Managing.Infrastructure.Evm.Models.Proxy;

public class Open
{
    [JsonProperty("direction")] public string Direction { get; set; }

    [JsonProperty("price")] public double Price { get; set; }

    [JsonProperty("quantity")] public double Quantity { get; set; }

    [JsonProperty("leverage")] public double Leverage { get; set; }

    [JsonProperty("status")] public string Status { get; set; }
}

public class GmxPosition
{
    [JsonProperty("id")] public string Id { get; set; }

    [JsonProperty("ticker")] public string Ticker { get; set; }

    [JsonProperty("direction")] public string Direction { get; set; }

    [JsonProperty("price")] public double Price { get; set; }

    [JsonProperty("quantity")] public double Quantity { get; set; }

    [JsonProperty("leverage")] public double Leverage { get; set; }

    [JsonProperty("status")] public string Status { get; set; }

    [JsonProperty("tradeType")] public string TradeType { get; set; }

    [JsonProperty("date")] public DateTime Date { get; set; }

    [JsonProperty("exchangeOrderId")] public string ExchangeOrderId { get; set; }

    [JsonProperty("pnl")] public double Pnl { get; set; }

    [JsonProperty("collateral")] public double Collateral { get; set; }

    [JsonProperty("markPrice")] public double MarkPrice { get; set; }

    [JsonProperty("liquidationPrice")] public double LiquidationPrice { get; set; }

    [JsonProperty("stopLoss")] public GmxTrade StopLoss { get; set; }

    [JsonProperty("takeProfit1")] public GmxTrade TakeProfit1 { get; set; }

    [JsonProperty("open")] public GmxTrade Open { get; set; }
}

public class GetGmxPositionsResponse : Web3ProxyBaseResponse
{
    [JsonProperty("positions")] public List<GmxPosition> Positions { get; set; }
}

public class StopLoss
{
    [JsonProperty("id")] public string Id { get; set; }

    [JsonProperty("ticker")] public string Ticker { get; set; }

    [JsonProperty("direction")] public string Direction { get; set; }

    [JsonProperty("price")] public double Price { get; set; }

    [JsonProperty("quantity")] public double Quantity { get; set; }

    [JsonProperty("leverage")] public int Leverage { get; set; }

    [JsonProperty("status")] public string Status { get; set; }

    [JsonProperty("tradeType")] public string TradeType { get; set; }

    [JsonProperty("date")] public DateTime Date { get; set; }

    [JsonProperty("exchangeOrderId")] public string ExchangeOrderId { get; set; }
}

public class TakeProfit1
{
    [JsonProperty("id")] public string Id { get; set; }

    [JsonProperty("ticker")] public string Ticker { get; set; }

    [JsonProperty("direction")] public string Direction { get; set; }

    [JsonProperty("price")] public double Price { get; set; }

    [JsonProperty("quantity")] public double Quantity { get; set; }

    [JsonProperty("leverage")] public int Leverage { get; set; }

    [JsonProperty("status")] public string Status { get; set; }

    [JsonProperty("tradeType")] public string TradeType { get; set; }

    [JsonProperty("date")] public DateTime Date { get; set; }

    [JsonProperty("exchangeOrderId")] public string ExchangeOrderId { get; set; }
}