tai v0.0.9 Tai.Exchanges.Adapter behaviour

Link to this section Summary

Link to this section Types

Link to this type asset_balance()
asset_balance() :: Tai.Exchanges.AssetBalance.t()
Link to this type t()
t() :: %Tai.Exchanges.Adapter{
  accounts: map(),
  adapter: :atom,
  id: :atom,
  products: String.t(),
  timeout: term()
}

Link to this section Callbacks

Link to this callback asset_balances(exchange_id, account_id, credentials)
asset_balances(
  exchange_id :: atom(),
  account_id :: atom(),
  credentials :: map()
) :: {:ok, [asset_balance()]} | {:error, reason :: term()}
Link to this callback maker_taker_fees(exchange_id, account_id, credentials)
maker_taker_fees(
  exchange_id :: atom(),
  account_id :: atom(),
  credentials :: map()
) ::
  {:ok, {maker :: Decimal.t(), taker :: Decimal.t()} | nil}
  | {:error, reason :: term()}
Link to this callback order_book_feed()
order_book_feed() :: atom()
Link to this callback products(exchange_id)
products(exchange_id :: atom()) ::
  {:ok, [product()]} | {:error, reason :: term()}
Link to this callback stream_supervisor()
stream_supervisor() :: atom()