# getSymbol()

Returns a symbol by its string representation, returns undefined if the symbol is not found.

WARNING

  • Symbols as strings are case sensitive
  • Symbols as strings may not be equal across all trading platforms
  • Interface
class MidaTradingAccount {
    getSymbol (symbol: string): Promise<MidaSymbol | undefined>;
}
  • Example 1
const btcUsdt = await myAccount.getSymbol("BTCUSDT");
  • Example 2
const ethUsdt = await myAccount.getSymbol("ETHSDT");
  • Example 3
const tslaUsd = await myAccount.getSymbol("#TSLA");
  • Example 4
const xauUsd = await myAccount.getSymbol("XAUUSD");