AccountBalanceResponse
public struct AccountBalanceResponse : Decodable, Sendable
Represents a single asset balance in an account.
Each AccountResponse contains an array of AccountBalanceResponse objects representing all assets (including native XLM) held by the account. Also includes authorization status and liabilities from open offers.
See also:
- Stellar developer docs
- AccountResponse for complete account information
-
Current balance amount for this asset as a decimal string.
Declaration
Swift
public var balance: String -
Amount of this asset reserved for buying in open offers (liabilities).
Declaration
Swift
public var buyingLiabilities: String? -
Amount of this asset reserved for selling in open offers (liabilities).
Declaration
Swift
public var sellingLiabilities: String? -
Maximum amount of this asset the account can hold (from trustline limit). Nil for native XLM which has no limit.
Declaration
Swift
public var limit: String? -
Asset type: “native” for XLM, “credit_alphanum4” for 4-char assets, “credit_alphanum12” for 12-char assets, or “liquidity_pool_shares”.
Declaration
Swift
public var assetType: String -
Asset code (e.g., “USD”, “BTC”). Nil for native XLM.
Declaration
Swift
public var assetCode: String? -
Issuer account ID for the asset. Nil for native XLM.
Declaration
Swift
public var assetIssuer: String? -
Account ID sponsoring this trustline’s base reserve. Nil if not sponsored.
Declaration
Swift
public var sponsor: String? -
Whether the issuer has authorized this account to hold the asset.
Declaration
Swift
public var isAuthorized: Bool? -
Whether the account is authorized to maintain liabilities but not hold new balance.
Declaration
Swift
public var isAuthorizedToMaintainLiabilities: Bool? -
Whether clawback is enabled for this asset.
Declaration
Swift
public var isClawbackEnabled: Bool? -
Liquidity pool ID for pool share balances. Nil for regular assets.
Declaration
Swift
public var liquidityPoolId: String? -
Ledger sequence when this balance was last modified.
Declaration
Swift
public var lastModifiedLedger: Int? -
Timestamp when this balance was last modified (ISO 8601).
Declaration
Swift
public var lastModifiedTime: String? -
Initializer - creates a new instance by decoding from the given decoder.
Declaration
Swift
public init(from decoder: Decoder) throwsParameters
decoderThe decoder containing the data
View on GitHub
Install in Dash