# NOTE: This file is auto generated by OpenAPI Generator 6.6.0 (https://openapi-generator.tech).
# Do not edit this file manually.

defmodule EMS-RESTAPI.Model.PositionDataInner do
  @moduledoc """
  The Position object.
  """

  @derive [Poison.Encoder]
  defstruct [
    :symbol_id_exchange,
    :symbol_id_coinapi,
    :avg_entry_price,
    :quantity,
    :side,
    :unrealized_pnl,
    :leverage,
    :cross_margin,
    :liquidation_price,
    :raw_data
  ]

  @type t :: %__MODULE__{
    :symbol_id_exchange => String.t | nil,
    :symbol_id_coinapi => String.t | nil,
    :avg_entry_price => float() | nil,
    :quantity => float() | nil,
    :side => EMS-RESTAPI.Model.OrdSide.t | nil,
    :unrealized_pnl => float() | nil,
    :leverage => float() | nil,
    :cross_margin => boolean() | nil,
    :liquidation_price => float() | nil,
    :raw_data => map() | nil
  }
end

defimpl Poison.Decoder, for: EMS-RESTAPI.Model.PositionDataInner do
  import EMS-RESTAPI.Deserializer
  def decode(value, options) do
    value
    |> deserialize(:side, :struct, EMS-RESTAPI.Model.OrdSide, options)
  end
end

