Bingex.Swap.PositionChange (Bingex v0.1.7)

Processes position change info for BingX swaps.

Summary

Types

t()

@type t() :: %Bingex.Swap.PositionChange{
  average_close_price: float(),
  average_price: float(),
  close_position_quantity: float(),
  closed?: boolean(),
  isolated?: boolean(),
  leverage: pos_integer(),
  net_profit: float(),
  open_time: non_neg_integer(),
  position_fee: float(),
  position_id: binary(),
  position_quantity: float(),
  position_side: binary(),
  realised_profit: float(),
  symbol: binary(),
  total_funding: float(),
  update_time: non_neg_integer()
}

Functions

decode(data)

@spec decode(term()) :: {:ok, t()} | :error