-
Notifications
You must be signed in to change notification settings - Fork 87
Assets API
Rodrigo Branas edited this page Dec 4, 2024
·
1 revision
API endpoint:
/assets/<assetId>
- get information about any asset (including NFTs)
URLs to consume:
- Mainnet: https://mainnet-explorer.fuel.network
- Testnet: https://explorer-indexer-testnet.fuel.network
curl
example of usage
curl 'https://mainnet-explorer.fuel.network/assets/0x44b09d7143aa7b1aac7844ee9cfc38893b12d20c3822ecb18dbf2c6846ea63f0'
the result contains a JSON with the asset information, here are the details about each prop:
Property | Description |
---|---|
assetId | Actual ID of the asset |
contractId | Contract ID that minted the asset |
subId | SubId used to calculate the assetId |
name | Asset name |
symbol | Asset symbol |
decimals | Asset decimals configuration |
suspicious | true if symbol matches any verified asset symbols |
metadata | Key-value object with SRC7/SRC9 standard metadata |
isNFT | true if asset is NFT ( supply=1, decimals=0 ) |
verified | true if asset is in Fuel's verified assets list |
owner | Current assetId owner (NFTs only) |
uri | Parsed URL from “metadata.uri” or “metadata.URI”. Some logic is applied to try defining a reasonable uri for the API consumer |
API endpoint:
/accounts/<address>/assets?last=<size>
- get assets owned by an account (including NFTs)
URLs to consume:
- Mainnet: https://mainnet-explorer.fuel.network
- Testnet: https://explorer-indexer-testnet.fuel.network
curl
example of usage
curl 'https://mainnet-explorer.fuel.network/accounts/0x196a68Ba237e921FeC5F01552E5e4df60b2619900254DD4cDe42557814508F57/assets?last=10'
the result contains a JSON with an array of asset information and balance of each asset, here are the details about each prop:
Property | Description |
---|---|
balance | Balance of the asset owner by account |
assetId | Actual ID of the asset |
contractId | Contract ID that minted the asset |
subId | SubId used to calculate the assetId |
name | Asset name |
symbol | Asset symbol |
decimals | Asset decimals configuration |
suspicious | true if symbol matches any verified asset symbols |
metadata | Key-value object with SRC7/SRC9 standard metadata |
isNFT | true if asset is NFT ( supply=1, decimals=0 ) |
verified | true if asset is in Fuel's verified assets list |
owner | Current assetId owner (NFTs only) |
uri | Parsed URL from “metadata.uri” or “metadata.URI”. Some logic is applied to try defining a reasonable uri for the API consumer |