AssetResponse

@Serializable
data class AssetResponse(val assetType: String, val assetCode: String, val assetIssuer: String, val pagingToken: String, val contractId: String? = null, val numClaimableBalances: Int? = null, val numLiquidityPools: Int? = null, val numContracts: Int? = null, val accounts: AssetResponse.Accounts, val claimableBalancesAmount: String? = null, val liquidityPoolsAmount: String? = null, val contractsAmount: String? = null, val balances: AssetResponse.Balances, val flags: AssetResponse.Flags, val links: AssetResponse.Links) : Response, Pageable

Represents an asset response from the Horizon API.

Assets are representations of value issued on the Stellar network. This response provides detailed information about an asset including its supply, number of accounts holding it, and various flags set by the issuer.

See also

Constructors

Link copied to clipboard
constructor(assetType: String, assetCode: String, assetIssuer: String, pagingToken: String, contractId: String? = null, numClaimableBalances: Int? = null, numLiquidityPools: Int? = null, numContracts: Int? = null, accounts: AssetResponse.Accounts, claimableBalancesAmount: String? = null, liquidityPoolsAmount: String? = null, contractsAmount: String? = null, balances: AssetResponse.Balances, flags: AssetResponse.Flags, links: AssetResponse.Links)

Types

Link copied to clipboard
@Serializable
data class Accounts(val authorized: Int, val authorizedToMaintainLiabilities: Int, val unauthorized: Int)

Statistics about accounts holding this asset.

Link copied to clipboard
@Serializable
data class Balances(val authorized: String, val authorizedToMaintainLiabilities: String, val unauthorized: String)

Statistics about balances of this asset.

Link copied to clipboard
@Serializable
data class Flags(val authRequired: Boolean, val authRevocable: Boolean, val authImmutable: Boolean, val authClawbackEnabled: Boolean)

Flags set on the asset issuer account.

Link copied to clipboard
@Serializable
data class Links(val toml: Link)

HAL links connected to this asset.

Properties

Link copied to clipboard
@SerialName(value = "accounts")
val accounts: AssetResponse.Accounts

Statistics about the number of accounts holding this asset

Link copied to clipboard
@SerialName(value = "asset_code")
val assetCode: String

The asset code

Link copied to clipboard
@SerialName(value = "asset_issuer")
val assetIssuer: String

The account ID of the asset issuer

Link copied to clipboard
@SerialName(value = "asset_type")
val assetType: String

The type of asset (credit_alphanum4, credit_alphanum12)

Link copied to clipboard
@SerialName(value = "balances")
val balances: AssetResponse.Balances

Statistics about the balances of this asset

Link copied to clipboard
@SerialName(value = "claimable_balances_amount")
val claimableBalancesAmount: String?

The total amount held in claimable balances

Link copied to clipboard
@SerialName(value = "contract_id")
val contractId: String?

The Stellar Asset Contract ID for this asset in hex format (Soroban)

Link copied to clipboard
@SerialName(value = "contracts_amount")
val contractsAmount: String?

The total amount held in contracts

Link copied to clipboard
@SerialName(value = "flags")
val flags: AssetResponse.Flags

Flags set on the asset issuer account

Link copied to clipboard
@SerialName(value = "_links")
val links: AssetResponse.Links

HAL links related to this asset

Link copied to clipboard
@SerialName(value = "liquidity_pools_amount")
val liquidityPoolsAmount: String?

The total amount held in liquidity pools

Link copied to clipboard
@SerialName(value = "num_claimable_balances")
val numClaimableBalances: Int?

The number of claimable balances holding this asset

Link copied to clipboard
@SerialName(value = "num_contracts")
val numContracts: Int?

The number of contracts holding this asset

Link copied to clipboard
@SerialName(value = "num_liquidity_pools")
val numLiquidityPools: Int?

The number of liquidity pools that include this asset

Link copied to clipboard
@SerialName(value = "paging_token")
open override val pagingToken: String

A cursor value for use in pagination