# `Bourse.Currency`
[🔗](https://github.com/ZenHive/bourse/blob/main/lib/bourse/currency.ex#L1)

Unified currency data.

Describes a currency or token supported by an exchange, including
deposit/withdraw capabilities and network information.

## Fields

  * `id` - Exchange-specific currency ID
  * `code` - Unified currency code (e.g., "BTC")
  * `name` - Full currency name
  * `numeric_id` - Numeric ID (some exchanges)
  * `precision` - Decimal precision
  * `type` - "crypto" or "fiat"
  * `active` - Whether the currency (or a network under `networks`) is considered
    usable. When derived from per-chain deposit/withdraw flags, the rollup is an
    **authored per-venue decision** (`active_requires_both` on the currency field
    map): `true` requires both directions, `false` accepts either. First-class
    venues must declare the flag; there is no silent default for them (task 482).
    Some venues (e.g. Binance coin-level) set currency `active` from a non-chain
    field such as `trading` — see that venue's carve register.
  * `deposit` - Whether deposits are enabled
  * `withdraw` - Whether withdrawals are enabled
  * `fee` - Default withdrawal fee
  * `fees` - Per-network withdrawal-fee map (`%{}` when none)
  * `limits` - Amount/withdraw/deposit min/max limits
  * `networks` - Network-specific deposit/withdraw info
  * `info` - Raw exchange response

The key set is the shared 14-key currency shape the static-response fixtures
assert against; `margin` is deliberately absent, being a non-canonical extra
only a few venues emit.

# `t`

```elixir
@type t() :: %Bourse.Currency{
  active: boolean() | nil,
  code: String.t() | nil,
  deposit: boolean() | nil,
  fee: number() | nil,
  fees: map(),
  id: String.t() | nil,
  info: map() | nil,
  limits: map() | nil,
  name: String.t() | nil,
  networks: map() | nil,
  numeric_id: integer() | nil,
  precision: number() | nil,
  type: String.t() | nil,
  withdraw: boolean() | nil
}
```

# `schema`

```elixir
@spec schema() :: map()
```

JSON Schema for the Currency unified type.

---

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