Kujira.Fin.Pair (kujira v0.1.80)

An individual exchange pair between a base token and a quote token.

Fields

  • :address - The address of the pair

  • :owner - The owner of the pair

  • :token_base - The base token of the Pair - typically the one that's being traded

  • :token_quote - The quote token of the Pair - typically a stablecoin

  • :price_precision - The maximum valid decimal places of the human price. Comparable to a tick size

  • :decimal_delta - Base decimals - Quote decimals. Allows conversion between "human" prices and "actual" prices with respect to base units of each token

  • :is_bootstrapping - A Pair is in Bootstrapping mode until manually launched, in order to prevent large amounts of slippage on new books

  • :fee_taker - The amount of a market swap that is sent to the fee collector

  • :fee_maker - The amount of a filled and claimed limit order that is sent to the fee collector

  • :book - An aggregate summary of all orders in the Pair's order book

Summary

Types

@type t() :: %Kujira.Fin.Pair{
  address: String.t(),
  book: :not_loaded | Kujira.Fin.Book.t(),
  decimal_delta: integer(),
  fee_maker: Decimal.t(),
  fee_taker: Decimal.t(),
  is_bootstrapping: boolean(),
  owner: String.t(),
  price_precision: integer(),
  token_base: Kujira.Token.t(),
  token_quote: Kujira.Token.t()
}

Functions

Link to this function

from_config(channel, address, params)

@spec from_config(GRPC.Channel.t(), String.t(), map()) :: :error | {:ok, t()}