Unified market/instrument metadata.
Describes a trading pair and its properties — spot, derivatives, precision, limits, and fee structure.
Fields
id- Exchange-native market ID (e.g., "BTCUSDT")symbol- Unified symbol (e.g., "BTC/USDT")base,quote- Base and quote currency codesbase_id,quote_id- Exchange-native currency IDstype- Market type: "spot", "swap", "future", "option"sub_type- "linear" or "inverse" for derivativesspot,margin,swap,future,option,contract- Type flagsactive- Whether the market is currently tradingsettle,settle_id- Settlement currencycontract_size- Contract size for derivativesquantity_unit- Canonical option quantity unit ("base")native_quantity_unit- Venue option quantity unit ("base"or"contracts")native_quantity_field- Venue option order field carrying the quantitynative_amount_step- Venue-native quantity increment before conversionlinear,inverse- Settlement direction flagsexpiry,expiry_datetime- Futures/options expirationstrike- Options strike priceoption_type- "call" or "put"taker,maker- Fee rates as decimalspercentage- Whether fees are charged as a percentagetier_based- Whether fees use a tiered scheduleprecision_mode- Authored precision interpretation modeprecision- Price/amount/cost precision ruleslimits- Min/max for price, amount, cost, leveragecreated- Market listing timestamp in millisecondsasset_index- Venue signing index for L1 actions (Hyperliquid: meta/spotMeta universe position with spot/HIP-3 offsets). Explicit — not overloaded ontoid/base_id(carve C-T339).info- Raw exchange response
Summary
Types
@type t() :: %Bourse.Market{ active: boolean() | nil, asset_index: integer() | nil, base: String.t() | nil, base_id: String.t() | nil, contract: boolean() | nil, contract_size: number() | nil, created: integer() | nil, expiry: integer() | nil, expiry_datetime: String.t() | nil, future: boolean() | nil, id: String.t() | nil, info: map() | nil, inverse: boolean() | nil, limits: map() | nil, linear: boolean() | nil, maker: number() | nil, margin: boolean() | nil, native_amount_step: number() | nil, native_quantity_field: String.t() | nil, native_quantity_unit: String.t() | nil, option: boolean() | nil, option_type: String.t() | nil, percentage: boolean() | nil, precision: map() | nil, precision_mode: String.t() | nil, quantity_unit: String.t() | nil, quote: String.t() | nil, quote_id: String.t() | nil, settle: String.t() | nil, settle_id: String.t() | nil, spot: boolean() | nil, strike: number() | nil, sub_type: String.t() | nil, swap: boolean() | nil, symbol: String.t() | nil, taker: number() | nil, tier_based: boolean() | nil, type: String.t() | nil }
Functions
@spec schema() :: map()
JSON Schema for the Market unified type.