tai v0.0.2 Tai.Exchanges.Config
Configuration helper for exchanges
Link to this section Summary
Functions
Return the keys for the exchange adapters
Return a keyword list of the configured exchange id & supervisor
Return a map of exchange configuration
Return the module for the order book feed adapter id
Return a map of the order book feed adapters keyed by their id
Return athe keys for the order book feed adapters
Return the order book symbols that are configured for the feed id
Return a map of order book feed adapters and the books to subscribe to
Link to this section Functions
Return the keys for the exchange adapters
Examples
iex> Tai.Exchanges.Config.exchange_ids() [:test_exchange_a, :test_exchange_b]
Return a keyword list of the configured exchange id & supervisor
Examples
iex> Tai.Exchanges.Config.exchange_supervisors [
test_exchange_a: Tai.ExchangeAdapters.Test.Supervisor,
test_exchange_b: Tai.ExchangeAdapters.Test.Supervisor
]
Return a map of exchange configuration
Examples
iex> Tai.Exchanges.Config.exchanges %{
test_exchange_a: [
supervisor: Tai.ExchangeAdapters.Test.Supervisor
],
test_exchange_b: [
supervisor: Tai.ExchangeAdapters.Test.Supervisor
]
}
Return the module for the order book feed adapter id
Examples
iex> Tai.Exchanges.Config.order_book_feed_adapter(:test_feed_a) Tai.ExchangeAdapters.Test.OrderBookFeed
Return a map of the order book feed adapters keyed by their id
Examples
iex> Tai.Exchanges.Config.order_book_feed_adapters() %{
test_feed_a: Tai.ExchangeAdapters.Test.OrderBookFeed,
test_feed_b: Tai.ExchangeAdapters.Test.OrderBookFeed
}
Return athe keys for the order book feed adapters
Examples
iex> Tai.Exchanges.Config.order_book_feed_ids() [:test_feed_a, :test_feed_b]
Return the order book symbols that are configured for the feed id
Examples
iex> Tai.Exchanges.Config.order_book_feed_symbols(:test_feed_a) [:btcusd, :ltcusd]
Return a map of order book feed adapters and the books to subscribe to
Examples
iex> Tai.Exchanges.Config.order_book_feeds() %{
test_feed_a: [
adapter: Tai.ExchangeAdapters.Test.OrderBookFeed,
order_books: [:btcusd, :ltcusd]
],
test_feed_b: [
adapter: Tai.ExchangeAdapters.Test.OrderBookFeed,
order_books: [:ethusd, :ltcusd]
]
}