Skip to main content

DefaultBinanceSymbols

DefaultBinanceSymbols(
    *args,
    **kwds,
)
Default symbols for Binance exchange.

Ancestors

  • enum.Enum

Class variables

  • BTCUSDT: Bitcoin to USDT trading pair.
  • ETHUSDT: Ethereum to USDT trading pair.

Static methods

get_fields

get_fields()
Get list of symbol names. Returns:
TypeDescription
list of strList of symbol names in uppercase.

from_name

from_name(
    name: str,
) ‑> int
Convert symbol name to its column index. Parameters:
NameTypeDefaultDescription
namestr--Symbol name in uppercase (e.g., ‘BTCUSDT’).
Returns:
TypeDescription
intColumn index corresponding to the symbol name.

is_valid

is_valid(
    name: str,
) ‑> bool
Check if a symbol name is valid. Parameters:
NameTypeDefaultDescription
namestr--Symbol name in uppercase (e.g., ‘BTCUSDT’).
Returns:
TypeDescription
boolTrue if the symbol name is valid, False otherwise.

DefaultCoinbaseSymbols

DefaultCoinbaseSymbols(
    *args,
    **kwds,
)
Default symbols for Coinbase exchange.

Ancestors

  • enum.Enum

Class variables

  • BTC_USD: Bitcoin to USD trading pair.
  • ETH_USD: Ethereum to USD trading pair.

Static methods

get_fields

get_fields()
Get list of formatted symbol names (with slashes). Returns:
TypeDescription
list of strList of symbol names formatted with slashes (e.g., ‘BTC/USD’).

from_name

from_name(
    name: str,
) ‑> int
Convert symbol name (with slashes) to its column index. Parameters:
NameTypeDefaultDescription
namestr--Symbol name formatted with slashes (e.g., ‘BTC/USD’).
Returns:
TypeDescription
intColumn index corresponding to the symbol name.

is_valid

is_valid(
    name: str,
) ‑> bool
Check if a symbol name (with slashes) is valid. Parameters:
NameTypeDefaultDescription
namestr--Symbol name formatted with slashes (e.g., ‘BTC/USD’).
Returns:
TypeDescription
boolTrue if the symbol name is valid, False otherwise.

get_symbol

get_symbol(
    index: int,
) ‑> str
Get formatted symbol name (with slashes) from index. Parameters:
NameTypeDefaultDescription
indexint--Column index of the symbol.
Raises:
TypeDescription
ValueErrorIf the index is invalid.
Returns:
TypeDescription
strSymbol name formatted with slashes (e.g., ‘BTC/USD’).