diff --git a/content/api/resources/assets/list.mdx b/content/api/resources/assets/list.mdx index 8882a30e8..be4ed47cf 100644 --- a/content/api/resources/assets/list.mdx +++ b/content/api/resources/assets/list.mdx @@ -12,14 +12,17 @@ This endpoint lists all assets. + | | | | --- | --- | | GET | /assets?asset_code{:asset_code}&asset_issuer={:account_id}&cursor={paging_token}&order={asc,desc}&limit={1-200}&include_failed{true,false} | + + - ARGUMENT - REQUIRED - DESCRIPTION @@ -41,8 +44,10 @@ This endpoint lists all assets. + + ```curl curl "https://horizon.stellar.org/assets?asset_code=CNY&limit=3" ``` @@ -65,8 +70,10 @@ server + + ```json { "_links": { @@ -92,6 +99,18 @@ server "asset_code": "CNY", "asset_issuer": "GAOT23KBW2HL6HVZFPNFLLT5VGIKGTLGR3AFDHYSRIWS4QKBYRPUW4N3", "paging_token": "CNY_GAOT23KBW2HL6HVZFPNFLLT5VGIKGTLGR3AFDHYSRIWS4QKBYRPUW4N3_credit_alphanum4", + "accounts": { + "authorized": 23, + "authorized_to_maintain_liabilities": 11, + "unauthorized": 6 + }, + "num_claimable_balances": 3, + "balances": { + "authorized": "997268.0000000", + "authorized_to_maintain_liabilities": "498634.0000000", + "unauthorized": "249317.0000000" + }, + "claimable_balances_amount": "124658.5000000", "amount": "997268.0000000", "num_accounts": 23, "flags": { @@ -110,6 +129,18 @@ server "asset_code": "CNY", "asset_issuer": "GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX", "paging_token": "CNY_GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX_credit_alphanum4", + "accounts": { + "authorized": 5514, + "authorized_to_maintain_liabilities": 2757, + "unauthorized": 1378 + }, + "num_claimable_balances": 551, + "balances": { + "authorized": "18318343.2623217", + "authorized_to_maintain_liabilities": "7327337.3049290", + "unauthorized": "2930934.9219720" + }, + "claimable_balances_amount": "1172373.9687890", "amount": "18318343.2623217", "num_accounts": 5514, "flags": { @@ -128,6 +159,18 @@ server "asset_code": "CNY", "asset_issuer": "GATEMHCCKCY67ZUCKTROYN24ZYT5GK4EQZ65JJLDHKHRUZI3EUEKMTCH", "paging_token": "CNY_GATEMHCCKCY67ZUCKTROYN24ZYT5GK4EQZ65JJLDHKHRUZI3EUEKMTCH_credit_alphanum4", + "accounts": { + "authorized": 1, + "authorized_to_maintain_liabilities": 0, + "unauthorized": 0 + }, + "num_claimable_balances": 0, + "balances": { + "authorized": "0.0000000", + "authorized_to_maintain_liabilities": "0.0000000", + "unauthorized": "0.0000000" + }, + "claimable_balances_amount": "0.0000000", "amount": "0.0000000", "num_accounts": 1, "flags": { @@ -143,8 +186,10 @@ server + + ```js var StellarSdk = require("stellar-sdk"); var server = new StellarSdk.Server("https://horizon.stellar.org"); @@ -161,3 +206,4 @@ var es = server ``` + diff --git a/content/api/resources/assets/object.mdx b/content/api/resources/assets/object.mdx index 6adb31bdb..908e7b50d 100644 --- a/content/api/resources/assets/object.mdx +++ b/content/api/resources/assets/object.mdx @@ -10,6 +10,7 @@ When Horizon returns information about an asset, it uses the following format: + - ATTRIBUTE - DATA TYPE - DESCRIPTION @@ -22,12 +23,24 @@ When Horizon returns information about an asset, it uses the following format: - asset_issuer - string - The Stellar address of this asset’s issuer. -- amount +- accounts + - object + - The number of accounts grouped by each trustline flag state. +- num_claimable_balances - number - - The number of units issued for this asset. + - The current number of claimable_balances for this asset. +- balances + - object + - The number of units issued for this asset grouped by each trustline flag state. +- claimable_balances_amount + - string + - The number of units in claimable balances for this asset. +- amount + - string + - The number of authorized units issued for this asset. This will be deprecated in Horizon v3. - num_accounts - number - - The numnber of accounts that have issued a trustline to this asset. If the `auth_required` flag for this asset's issuer is set to `true`, this number only includes the accounts who have both set up a trustline to the asset and have been authorized to hold the asset. + - The number of accounts that have issued a trustline to this asset. If the `auth_required` flag for this asset's issuer is set to `true`, this number only includes the accounts who have both set up a trustline to the asset and have been authorized to hold the asset. This will be deprecated in Horizon v3. - flags - object - Flags denote the enabling/disabling of certain asset issuer privileges. @@ -46,8 +59,10 @@ When Horizon returns information about an asset, it uses the following format: + + ```json { "_links": { @@ -73,6 +88,18 @@ When Horizon returns information about an asset, it uses the following format: "asset_code": "USD", "asset_issuer": "GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX", "paging_token": "USD_GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX_credit_alphanum4", + "accounts": { + "authorized": 9390, + "authorized_to_maintain_liabilities": 1240, + "unauthorized": 5 + }, + "num_claimable_balances": 253, + "balances": { + "authorized": "1347404.4083346", + "authorized_to_maintain_liabilities": "177931.9984610", + "unauthorized": "717.4677360" + }, + "claimable_balances_amount": "36303.8674450", "amount": "1347404.4083346", "num_accounts": 9390, "flags": { @@ -87,3 +114,4 @@ When Horizon returns information about an asset, it uses the following format: ``` +