# getAsset()

Returns an asset by its string representation, returns undefined if the asset is not found.

WARNING

  • Assets as strings are case sensitive
  • Assets as strings may not be equal across all trading platforms
  • Interface
class MidaTradingAccount {
    getAsset (asset: string): Promise<MidaAsset | undefined>;
}
  • Example 1
const btc = await myAccount.getAsset("BTC");
  • Example 2
const eth = await myAccount.getAsset("ETH");
  • Example 3
const jpy = await myAccount.getAsset("JPY");
  • Example 4
const tsla = await myAccount.getAsset("#TSLA");