Unified currency data.
Describes a currency or token supported by an exchange, including deposit/withdraw capabilities and network information.
Fields
id- Exchange-specific currency IDcode- Unified currency code (e.g., "BTC")name- Full currency namenumeric_id- Numeric ID (some exchanges)precision- Decimal precisiontype- "crypto" or "fiat"active- Whether the currency (or a network undernetworks) is considered usable. When derived from per-chain deposit/withdraw flags, the rollup is an authored per-venue decision (active_requires_bothon the currency field map):truerequires both directions,falseaccepts 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 currencyactivefrom a non-chain field such astrading— see that venue's carve register.deposit- Whether deposits are enabledwithdraw- Whether withdrawals are enabledfee- Default withdrawal feefees- Per-network withdrawal-fee map (Boursefees,%{}when none)limits- Amount/withdraw/deposit min/max limits (Bourselimits)networks- Network-specific deposit/withdraw infoinfo- Raw exchange response
Mirrors Bourse's safeCurrencyStructure key set exactly (no margin — that is a
non-canonical extra only a few venues emit; the unified struct stays to the
shared 14-key shape the static-response fixtures assert against).
Summary
Types
@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 }
Functions
@spec schema() :: map()
JSON Schema for the Currency unified type.