tai v0.0.9 Tai.Exchanges.Config

Configuration helper for exchanges

Link to this section Summary

Functions

Return a struct for all configured exchanges

Link to this section Types

Link to this type t()
t() :: %Tai.Exchanges.Config{
  accounts: term(),
  id: term(),
  products: term(),
  supervisor: term()
}

Link to this section Functions

Link to this function all(exchanges \\ Application.get_env(:tai, :exchanges))

Return a struct for all configured exchanges

Examples

iex> Tai.Exchanges.Config.all [

%Tai.Exchanges.Config{
  id: :test_exchange_a,
  supervisor: Tai.ExchangeAdapters.Mock.Supervisor,
  products: "*",
  accounts: %{main: %{}}
},
%Tai.Exchanges.Config{
  id: :test_exchange_b,
  supervisor: Tai.ExchangeAdapters.Mock.Supervisor,
  products: "*",
  accounts: %{main: %{}}
}

]