# `Rujira.Fin.Book`
[🔗](https://github.com/RujiraNetwork/rujira_ex/blob/v0.0.1/lib/rujira/fin/book.ex#L1)

Order book for the FIN protocol.

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

# `t`

```elixir
@type t() :: %Rujira.Fin.Book{
  asks: [Rujira.Fin.Book.Price.t()],
  bids: [Rujira.Fin.Book.Price.t()],
  center: Decimal.t(),
  id: String.t(),
  spread: Decimal.t()
}
```

# `depth`

```elixir
@spec depth(t(), :bid | :ask, number()) :: non_neg_integer()
```

# `from_id`

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

# `load`

```elixir
@spec load(Rujira.Fin.Pair.t(), integer()) ::
  {:ok, Rujira.Fin.Pair.t()} | {:error, term()}
```

# `new`

```elixir
@spec new(String.t(), map()) :: {:ok, t()} | {:error, term()}
```

# `price`

```elixir
@spec price(String.t()) :: {:ok, map()} | {:error, term()}
```

# `query`

# `query`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
