CCXT.Symbol.Error exception (ccxt_client v0.6.1)

Copy Markdown View Source

Error raised when symbol conversion fails.

Provides detailed context about what went wrong, including the symbol, reason, exchange ID, and market type when available.

Summary

Functions

Creates an error for invalid symbol format.

Creates an error for parse failures.

Creates an error for missing pattern configuration.

Creates an error for unknown quote currency.

Creates an error for unsupported prefix patterns.

Types

reason()

@type reason() ::
  :invalid_format
  | :pattern_not_found
  | :unknown_quote_currency
  | :parse_failed
  | {:unsupported_prefix, String.t()}

t()

@type t() :: %CCXT.Symbol.Error{
  __exception__: true,
  exchange_id: String.t() | nil,
  market_type: atom() | nil,
  message: String.t(),
  reason: reason(),
  symbol: String.t() | nil
}

Functions

invalid_format(symbol)

@spec invalid_format(String.t()) :: t()

Creates an error for invalid symbol format.

new(message, opts \\ [])

@spec new(
  String.t(),
  keyword()
) :: t()

parse_failed(symbol, reason)

@spec parse_failed(String.t(), term()) :: t()

Creates an error for parse failures.

pattern_not_found(symbol, market_type, exchange_id \\ nil)

@spec pattern_not_found(String.t(), atom(), String.t() | nil) :: t()

Creates an error for missing pattern configuration.

unknown_quote_currency(symbol, attempted_split \\ nil)

@spec unknown_quote_currency(String.t(), String.t() | nil) :: t()

Creates an error for unknown quote currency.

unsupported_prefix(symbol, prefix)

@spec unsupported_prefix(String.t(), String.t()) :: t()

Creates an error for unsupported prefix patterns.