Rujira.Fin.Pair (rujira_ex v0.0.1)

Copy Markdown View Source

Trading pair for the FIN protocol.

Struct, construction, and queries. Use Rujira.Fin as the public API.

Summary

Types

t()

@type t() :: %Rujira.Fin.Pair{
  address: String.t(),
  book: :not_loaded | Rujira.Fin.Book.t(),
  fee_address: String.t(),
  fee_maker: Decimal.t(),
  fee_taker: Decimal.t(),
  history: term(),
  id: String.t(),
  market_makers: [String.t()],
  oracle_base: Rujira.Thorchain.Oracle.t() | nil,
  oracle_quote: Rujira.Thorchain.Oracle.t() | nil,
  summary: :not_loaded | term(),
  tick: integer(),
  token_base: String.t(),
  token_quote: String.t()
}

Functions

find_by_denoms(t1, t2)

@spec find_by_denoms(String.t(), String.t()) :: {:ok, t()} | {:error, term()}

find_stable(base_denom)

@spec find_stable(String.t()) :: {:ok, t()} | {:error, term()}

from_id(address)

@spec from_id(String.t()) :: {:ok, t()} | {:error, term()}

get(address)

@spec get(String.t()) :: {:ok, t()} | {:error, term()}

init_label(_, map)

@spec init_label(term(), map()) :: String.t()

init_msg(config)

@spec init_msg(map()) :: map()

list()

@spec list() :: {:ok, [t()]} | {:error, term()}

migrate_msg(from, to, _)

@spec migrate_msg(term(), term(), term()) :: map()

new(attrs)

@spec new(map()) :: {:ok, t()} | {:error, term()}

ticker_id!(pair)

@spec ticker_id!(t()) :: String.t()

tvl(address)

@spec tvl(String.t()) :: {:ok, non_neg_integer()} | {:error, term()}