> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Markets

> Market metadata and trading parameters.

The `lighter.raw.markets` table contains market metadata and trading parameters.

## Table Columns

**Unique key:** `market_id`

| Column Name | Data Type | Description |
| - | - | - |
| `market_id` | `NUMBER(38,0)` | Unique market identifier. |
| `symbol` | `VARCHAR` | Market symbol (e.g., BTC for perps, ETH/USDC for spots). |
| `market_type` | `VARCHAR` | 'perp' or 'spot'. |
| `base_asset_id` | `NUMBER(38,0)` | Base asset ID. |
| `base_l1_address` | `VARCHAR` | L1 contract address of the base asset, when applicable. |
| `quote_asset_id` | `NUMBER(38,0)` | Quote asset ID. |
| `base_symbol` | `VARCHAR` | Base asset symbol. |
| `quote_symbol` | `VARCHAR` | Quote asset symbol. |
| `collateral_asset_id` | `NUMBER(38,0)` | Collateral asset ID for perpetuals. |
| `collateral_symbol` | `VARCHAR` | Collateral asset symbol (for example, USDC). NULL for spots. |
| `status` | `VARCHAR` | Market status, such as `active`. |
| `taker_fee` | `VARCHAR` | Default taker fee setting for the market. |
| `maker_fee` | `VARCHAR` | Default maker fee setting for the market. |
| `liquidation_fee` | `VARCHAR` | Liquidation fee setting for the market. |
| `min_base_amount` | `VARCHAR` | Minimum order size in base asset units for this market. |
| `min_quote_amount` | `VARCHAR` | Minimum order size in quote asset units for this market. |
| `order_quote_limit` | `VARCHAR` | Maximum total quote value allowed per order for this market. |
| `supported_size_decimals` | `NUMBER(38,0)` | Supported decimal precision for order sizes in this market. |
| `supported_price_decimals` | `NUMBER(38,0)` | Supported decimal precision for prices in this market. |
| `supported_quote_decimals` | `NUMBER(38,0)` | Supported decimal precision for quote amounts in this market. |
| `size_decimals` | `NUMBER(38,0)` | Number of decimal places used for size (quantity) representation in this market. |
| `price_decimals` | `NUMBER(38,0)` | Number of decimal places used for price representation in this market. |
| `quote_multiplier` | `NUMBER(38,0)` | Multiplier applied to quote asset amounts for this market's pricing. |
| `default_initial_margin_fraction` | `NUMBER(38,0)` | Default initial margin fraction for perpetuals. |
| `min_initial_margin_fraction` | `NUMBER(38,0)` | Minimum initial margin fraction allowed for positions in this market. |
| `maintenance_margin_fraction` | `NUMBER(38,0)` | Maintenance margin fraction for perpetuals. |
| `closeout_margin_fraction` | `NUMBER(38,0)` | Closeout margin fraction for perpetuals. |
| `_created_at` | `TIMESTAMP_NTZ(9)` | Timestamp when the row was first recorded. |
| `_updated_at` | `TIMESTAMP_NTZ(9)` | Timestamp when the row was last updated. |

### Sample Query

```sql theme={null}
SELECT
    market_id,
    symbol,
    market_type,
    base_symbol,
    quote_symbol,
    collateral_symbol
FROM lighter.raw.markets
ORDER BY market_id
LIMIT 100;
```
