FireblocksSdk.Api.Asset (FireblocksSdk v0.2.1)

Copy Markdown View Source

Summary

Functions

Returns an asset by ID or legacyID.

Retrieves all assets supported by Fireblocks in your workspace, providing extended information and enhanced performance compared to the legacy supported_assets endpoint.

Register a new asset to a workspace and return the newly created asset's details. Currently supported chains are

Set asset price for the given asset id. Returns the asset price response.

Update the user's metadata for an asset.

Functions

get(assetId)

Returns an asset by ID or legacyID.

list(opt \\ [])

Retrieves all assets supported by Fireblocks in your workspace, providing extended information and enhanced performance compared to the legacy supported_assets endpoint.

Options:

register(asset, idempotent_key \\ "")

Register a new asset to a workspace and return the newly created asset's details. Currently supported chains are:

  • EVM based chains
  • Stellar
  • Algorand
  • TRON
  • NEAR
  • Solana
  FireblocksSdk.Api.Asset.register([
    blockchainId: "ETH_TEST3",
    address: "0xe7A9as1oa38bc4da0248s179E30aa94CcF453991",
    symbol: "TST3"
  ])

Options:

set_price(opts, idempotent_key \\ "")

Set asset price for the given asset id. Returns the asset price response.

  FireblocksSdk.Api.Asset.set_price([
    assetId: "USD1_B75VRLGX_TQL4",
    currency: "USD",
    price: 1000
  ])

Options:

update_metadata(opts, idempotent_key \\ "")

Update the user's metadata for an asset.

Updates mutable, workspace-scoped metadata (e.g. a free-text note) for the given asset.

  FireblocksSdk.Api.Asset.update_metadata([
    id: "ETH",
    metadata: %{note: %{text: "Primary gas token"}}
  ])

Options:

  • :id (String.t/0) - Required. The ID or legacyId of the asset to update

  • :metadata (map/0) - Asset metadata object. May contain a note map with a text field (string) for the user note.