Bingex.Swap.Models.BalanceInfo (Bingex v0.1.7)

Represents balance information for a BingX swap account.

This module provides structured details about a user's account balance, including margin availability, equity, and profit/loss metrics.

Summary

Types

t()

User's balance information.

Types

t()

@type t() :: %Bingex.Swap.Models.BalanceInfo{
  asset: binary(),
  available_margin: float(),
  balance: float(),
  equity: float(),
  freezed_margin: float(),
  realized_profit: float(),
  uid: binary(),
  unrealized_profit: float(),
  used_margin: float(),
  user_id: binary()
}

User's balance information.

Fields:

  • asset (binary): The asset type (e.g., "USDT").
  • balance (float): Total balance of the account.
  • available_margin (float): Margin available for trading.
  • equity (float): Total equity value.
  • freezed_margin (float): Margin currently locked in open positions.
  • realized_profit (float): Profit or loss from closed positions.
  • unrealized_profit (float): Profit or loss from open positions.
  • used_margin (float): Margin currently in use.
  • user_id (binary): Unique identifier of the user.
  • uid (binary): Shortened user identifier.

Functions

decode(data)

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