WAX Unity Web3 Suite
AtomicMarket
AtomicMarket
  • Getting Started
  • Installation
    • WebGL Installation
  • Examples
    • Unity examples
    • Available assets for trading
    • Filtered assets lists available for trading
    • AssetExample
    • AuctionExample
    • BuyOfferExample
    • SalesExample
  • API Docs
    • AtomicMarketApiFactory
    • Assets
      • AssetsApi
        • AssetDto
          • DataDto
            • BackedTokensDto
            • CollectionDto
            • SchemaDto
              • FormatDto
            • TemplateDto
            • ImmutableDataDto
        • AssetsDto
          • DataDto
            • BackedTokensDto
            • CollectionDto
            • SchemaDto
              • FormatDto
            • TemplateDto
              • ImmutableDataDto
      • AssetsUriParameterBuilder
    • Auctions
      • AuctionsApi
        • AuctionDto
          • DataDto
            • AssetDto
              • BackedTokensDto
              • SchemaDto
                • FormatDto
              • TemplateDto
                • ImmutableDataDto
              • BidsDto
              • CollectionDto
              • PriceDto
      • AuctionsDto
        • DataDto
          • AssetDto
            • BackedTokensDto
            • SchemaDto
              • FormatDto
            • TemplateDto
              • ImmutableDataDto
          • BidsDto
          • CollectionDto
          • PriceDto
      • AuctionsUriParameterBuilder
    • BuyOffers
      • BuyOffersApi
        • BuyOfferDto
          • DataDto
        • AssetDto
          • BackedTokensDto
          • SchemaDto
            • FormatDto
          • TemplateDto
            • ImmutableDataDto
        • CollectionDto
        • PriceDto
        • BuyOffersDto
          • DataDto
            • AssetDto
              • BackedTokensDto
              • SchemaDto
                • FormatDto
              • TemplateDto
                • ImmutableDataDto
            • CollectionDto
            • PriceDto
      • BuyOffersUriParameterBuilder
    • Config
      • ConfigApi
        • ConfigDto
          • DataDto
            • SupportedPairsDto
              • PairsDataDto
            • SupportedTokensDto
    • MarketPlaces
      • MarketPlacesApi
        • MarketplaceDto
          • DataDto
        • MarketplacesDto
          • DataDto
    • Offers
      • OffersApi
        • OfferDto
          • DataDto
            • AssetDto
              • BackedTokensDto
              • CollectionDto
              • SchemaDto
                • FormatDto
              • TemplateDto
                • ImmutableDataDto
        • OffersDto
          • DataDto
            • AssetDto
              • BackedTokensDto
              • CollectionDto
              • SchemaDto
                • FormatDto
              • TemplateDto
                • ImmutableDataDto
      • OffersUriParameterBuilder
    • Pricing
      • PricingApi
        • PricesDto
          • DataDto
        • AssetPricingDto
          • DataDto
        • TemplatesDto
          • DataDto
      • PricingUriParametersBuilder
    • Sales
      • SalesApi
        • SaleDto
          • DataDto
            • AssetDto
              • BackedTokensDto
              • SchemaDto
                • FormatDto
              • TemplateDto
                • ImmutableDataDto
            • CollectionDto
            • PriceDto
        • SalesDto
          • DataDto
            • AssetDto
              • BackedTokensDto
              • SchemaDto
                • FormatDto
              • TemplateDto
                • ImmutableDataDto
              • CollectionDto
              • PriceDto
      • SalesUriParameterBuilder
    • Stats
      • StatsApi
        • StatsDto
          • DataDto
        • AccountDto
          • DataDto
            • ResultDto
            • SymbolDto
        • AccountsDto
          • DataDto
            • ResultDto
            • SymbolDto
        • CollectionDto
          • DataDto
            • ResultDto
            • SymbolDto
        • CollectionsDto
          • DataDto
            • ResultDto
            • SymbolDto
        • GraphDto
          • DataDto
            • ResultDto
            • SymbolDto
        • SalesDto
          • DataDto
            • ResultDto
            • SymbolDto
        • SchemaDto
          • DataDto
            • ResultDto
            • SymbolDto
      • StatsUriParameterBuilder
    • Transfers
      • TransfersApi
        • TransfersDto
          • DataDto
            • AssetDto
              • BackedTokensDto
              • CollectionDto
              • SchemaDto
                • FormatDto
              • TemplateDto
                • ImmutableDataDto
      • TransfersUriParameterBuilder
    • Core
      • HttpRequestBuilder
      • HttpResponseMessageExtension
      • IUriParameterBuilder
    • LogsDto
      • DataDto
Powered by GitBook
On this page
Edit on GitHub
  1. Examples

AssetExample

Example showing how to query the Asset Endpoint

public async Task AssetExample()
{
    // Get a specific Asset by it's assetId
    var someAsset = await AtomicMarketApiFactory.Version1.AssetsApi.Asset("someassetId");

    // Print diverse Data about the asset
    Console.WriteLine(someAsset.Data.AssetId);
    Console.WriteLine(someAsset.Data.Burnable);
    Console.WriteLine(someAsset.Data.Contract);
    Console.WriteLine(someAsset.Data.MintedAtBlock);
    Console.WriteLine(someAsset.Data.MintedAtTime);
    Console.WriteLine(someAsset.Data.Name);
    Console.WriteLine(someAsset.Data.Owner);
    Console.WriteLine(someAsset.Data.Contract);

    // Print diverse Data about the backed Tokens
    foreach (var backedToken in someAsset.Data.BackedTokens)
    {
        Console.WriteLine(backedToken.Amount);
        Console.WriteLine(backedToken.TokenContract);
        Console.WriteLine(backedToken.TokenPrecision);
        Console.WriteLine(backedToken.TokenSymbol);
    }

    // Print diverse Data about the collection this asset belongs to
    Console.WriteLine(someAsset.Data.Collection.Name);
    Console.WriteLine(someAsset.Data.Collection.AllowNotify);
    Console.WriteLine(someAsset.Data.Collection.Author);
    Console.WriteLine(someAsset.Data.Collection.CollectionName);
    Console.WriteLine(someAsset.Data.Collection.CreatedAtBlock);
    Console.WriteLine(someAsset.Data.Collection.CreatedAtTime);
    Console.WriteLine(someAsset.Data.Collection.Image);
    Console.WriteLine(someAsset.Data.Collection.MarketFee);

    // Print information about authorized accounts
    foreach (var authorizedAccount in someAsset.Data.Collection.AuthorizedAccounts)
    {
        Console.WriteLine(authorizedAccount);
    }

    // Print information about notified accounts
    foreach (var notifyAccount in someAsset.Data.Collection.NotifyAccounts)
    {
        Console.Write(notifyAccount);
    }
}
PreviousFiltered assets lists available for tradingNextAuctionExample

Last updated 2 years ago

Page cover image