Utila Assets API

The Assets API from Utila — 3 operation(s) for assets.

OpenAPI Specification

utila-assets-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Utila Address Book Assets API
  version: v2
servers:
- url: https://api.utila.io
security:
- bearerAuth: []
tags:
- name: Assets
paths:
  /v2/assets/{asset_id}:
    get:
      summary: GetAsset
      description: Retrieves an asset by resource name.
      operationId: Assets_GetAsset
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2GetAssetResponse'
      parameters:
      - name: asset_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Assets
  /v2/assets:batchGet:
    get:
      summary: BatchGetAssets
      description: Retrieves a list of assets by resource name.
      operationId: Assets_BatchGetAssets
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2BatchGetAssetsResponse'
      parameters:
      - name: names
        description: 'Repeated resource names of the requested assets.


          Format: `assets/{asset_id}`'
        in: query
        required: true
        explode: true
        schema:
          type: array
          items:
            type: string
      tags:
      - Assets
  /v2/vaults/{vault_id}/assets/{asset_id}:
    get:
      summary: GetVaultAsset
      description: Retrieves a vault scoped asset (imported token or custom chain token) by resource name.
      operationId: Assets_GetVaultAsset
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2GetVaultAssetResponse'
      parameters:
      - name: vault_id
        in: path
        required: true
        schema:
          type: string
      - name: asset_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Assets
components:
  schemas:
    v2CantonTokenDetails:
      type: object
      properties:
        instrumentId:
          type: string
          description: The instrument ID.
        instrumentAdmin:
          type: string
          description: The instrument admin.
    v2ConvertedValue:
      type: object
      properties:
        amount:
          type: string
          description: The amount in USD.
          readOnly: true
        currencyCode:
          type: string
          description: The currency code of the amount. Always USD.
          readOnly: true
      description: A message representing a converted value.
    v2AssetTypeEnum:
      type: string
      enum:
      - NATIVE_CURRENCY
      - TOKEN
      description: "The type of the asset.\n\n - NATIVE_CURRENCY: The asset is a native currency.\n - TOKEN: The asset is a token."
    v2BatchGetAssetsResponse:
      type: object
      properties:
        assets:
          type: array
          items:
            $ref: '#/components/schemas/v2Asset'
          description: The assets returned.
    v2GetVaultAssetResponse:
      type: object
      properties:
        asset:
          description: The asset returned.
          allOf:
          - $ref: '#/components/schemas/v2Asset'
    v2SuiTokenDetails:
      type: object
      properties:
        gasless:
          type: boolean
    v2GetAssetResponse:
      type: object
      properties:
        asset:
          description: The asset returned.
          allOf:
          - $ref: '#/components/schemas/v2Asset'
    v2Asset:
      type: object
      properties:
        name:
          type: string
          description: 'The resource name of the asset.


            Format: `assets/{asset_id}`'
        displayName:
          type: string
          description: 'The display name of the asset.


            Example: "Bitcoin"'
        network:
          type: string
          example: networks/ethereum-mainnet
          description: 'The resource name of the network.


            Format: `networks/{network_id}`.'
        type:
          description: The type of the asset.
          allOf:
          - $ref: '#/components/schemas/v2AssetTypeEnum'
        symbol:
          type: string
          description: 'The symbol of the asset.


            Should not be trusted as this is the contract advertised symbol for non-native

            assets.'
        decimals:
          type: integer
          format: int32
          description: The decimals of the asset.
        convertedValue:
          description: The converted value of the asset.
          allOf:
          - $ref: '#/components/schemas/v2ConvertedValue'
        tokenInfo:
          description: 'The token info of the asset.


            Only present if the asset is a token.'
          allOf:
          - $ref: '#/components/schemas/v2AssetTokenInfo'
    AssetTokenInfoStandardEnum:
      type: string
      enum:
      - ERC20
      - ERC721
      - ERC1155
      - TRC20
      - SPL_TOKEN
      - SPL_TOKEN_2022
      - ICS20
      - JETTON
      - TIP20
      description: " - ERC20: ERC20 is the most common fungible token standard.\n - ERC721: ERC721 is the most common non-fungible token standard.\n - ERC1155: ERC1155 is a newer token standard that allows for multiple tokens to be\nheld in a single contract.\n - TRC20: TRC20 is the most common tron's fungible token standard.\n - SPL_TOKEN: SPL Token - solana's token standard.\n - SPL_TOKEN_2022: Token2020 - solana's new token extension for spl tokens.\n - ICS20: ICS20 cosmos's token standard.\n - JETTON: JETTON TON's token standard.\n - TIP20: TIP20 is the Tempo blockchain token standard (ERC-20 extension with compliance features)."
    v2AssetTokenInfo:
      type: object
      properties:
        contractAddress:
          type: string
          description: The contract address of the token.
        standard:
          description: The token standard.
          allOf:
          - $ref: '#/components/schemas/AssetTokenInfoStandardEnum'
        denom:
          type: string
          description: The denom of the token on cosmos ecosystem.
        cantonTokenDetails:
          title: Canton token details
          allOf:
          - $ref: '#/components/schemas/v2CantonTokenDetails'
        tip20Currency:
          type: string
          description: ISO 4217 currency code for TIP-20 tokens (e.g. "USD", "EUR"). Empty for other standards.
        suiTokenDetails:
          description: Sui token details. Present only for gasless-eligible Sui assets.
          allOf:
          - $ref: '#/components/schemas/v2SuiTokenDetails'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT