Installation and usage of the platform
REST API: information about address assets and balances¶
The methods of the assets
group are provided for obtaining information about assets and address balances.
GET assets/balance/{address}¶
The method returns the balance of all assets of the address or alias.
Note
It is recommended to use the GET assets/details/{assetId} method to get information about the asset.
Parameters returned in the method response:
address
– participant address;balances
– object with balances of the participant:assetId
– asset identifier;balance
– asset balance;quantity
– the total number of issued tokens of the asset;reissuable
– the reissuability of an asset;minSponsoredAssetFee
– minimum fee for sponsored transactions;sponsorBalance
– funds allocated to pay for transactions on sponsored assets.
Response example:
GET assets/balance-v2/{address}¶
The method returns the balance of all the assets of the address or alias, including the balance of the assets issued by a smart contract.
Parameters returned in the method response:
address
– participant address;balances
– object with balances of the participant:name
– asset name;assetId
– asset identifier;balance
– asset balance;reissuable
– the flag, which indicates the reissuability of the asset;sponsorshipIsEnabled
– the flag that takestrue
orfalse
value, and according to the value allows or does not allow to pay fees in a non-system (not WEST) token;sponsorBalance
– funds allocated for transaction fees on sponsored assets;quantity
– the total number of issued tokens of the asset;decimals
– the maximum number of decimal places for a particular asset;description
– the description of the asset given by the participant who issued it;timestamp
– the time of the asset issue;issueHeight
– the height at which the asset was issued;issuer
– the address of the participant who issued the asset.
Response example:
POST assets/balance¶
The method returns a set of pairs assetid
– balance
for each address passed in the addresses
field when the method is called.
Parameters returned in the method response:
assetId
– asset identifier;balance
– asset balance.
Response example for one address:
GET assets/balance/{address}/{assetId}¶
The method returns the balance of the address or alias in the specified {assetId}
.
Response example:
GET assets/details/{assetId}¶
The method returns description of the specified {assetId}
.
Response example:
GET assets/{assetId}/distribution¶
The method returns the number of asset tokens on all addresses using the specified asset.
Response example: