# Market Lab v0.1.5 (/changelog/v0.1.5)



> v0.1.5 unifies Hyperliquid core and HIP-3 perpetuals under one market model, and expands HyperLink execution to Hyperliquid Spot and every HIP-3 DEX discovered by Market Lab.

This release includes a breaking HIP-3 API change. The previous `hyperliquidf-{dex}` exchange and venue names have been removed without compatibility aliases.

Direct Hyperliquid core and HIP-3 perpetuals now use `hyperliquidf`. The DEX is carried by the symbol instead of the exchange name.

## DEX-scoped symbols [#new-symbol-format]

Core perpetuals keep their normalized base symbol. HIP-3 perpetuals now use the `{dex}:{coin}` format:

```text
BTC
xyz:TSLA
io:ANTH
```

Moving the DEX into the symbol makes every market unambiguous, including cases where multiple HIP-3 DEXs list the same coin.

| Before                                              | v0.1.5                                              |
| --------------------------------------------------- | --------------------------------------------------- |
| Exchange or venue `hyperliquidf-xyz`, symbol `TSLA` | Exchange or venue `hyperliquidf`, symbol `xyz:TSLA` |
| Exchange or venue `hyperliquidf-io`, symbol `ANTH`  | Exchange or venue `hyperliquidf`, symbol `io:ANTH`  |
| `tsla@candles@hyperliquidf-xyz`                     | `xyz:tsla@candles@hyperliquidf`                     |

## One snapshot for core and HIP-3 [#one-market-snapshot]

A single refresh now discovers Hyperliquid’s live HIP-3 DEX list and merges every available core and HIP-3 perpetual market into the `hyperliquidf` snapshot:

```bash
mlab markets --exchange hyperliquidf --refresh
mlab markets --exchange hyperliquidf --symbol BTC
mlab markets --exchange hyperliquidf --symbol xyz:TSLA
mlab markets --exchange hyperliquidf --symbol io:ANTH
```

Separate snapshots are no longer refreshed or stored for each HIP-3 DEX. Market Lab also removes legacy HIP-3 snapshots during refresh.

## One symbol across data and execution [#market-data-and-execution]

The same scoped symbol now works across market discovery, data sources, direct execution, account commands, strategies, bots, and daemon jobs:

```bash
mlab source orderbook \
  --exchange hyperliquidf \
  --symbol xyz:TSLA \
  --depth 20

mlab trade long xyz:TSLA \
  --venue hyperliquidf \
  --margin 100 \
  --leverage 5 \
  --dry-run

mlab bot run grid xyz:TSLA \
  --venue hyperliquidf \
  --margin 100 \
  --leverage 5 \
  --levels 5 \
  --step-bps 6 \
  --duration 3600 \
  --dry-run
```

Market Lab preserves the DEX scope through order placement, cancellation, fills, positions, and job execution. Hyperliquid wire symbols, asset IDs, and indices remain internal.

## HyperLink Spot and HIP-3 [#hyperlink-spot-and-hip-3]

HyperLink execution now spans Hyperliquid Spot, core perpetuals, and every HIP-3 DEX discovered by Market Lab.

Two execution venues expose the complete integration:

| Venue        | Markets                   | Symbol                                      |
| ------------ | ------------------------- | ------------------------------------------- |
| `hyperlink`  | Hyperliquid Spot          | Exact pair, such as `HYPE/USDC`             |
| `hyperlinkf` | Core and HIP-3 perpetuals | `BTC` or a scoped symbol such as `xyz:TSLA` |

```bash
# Spot
mlab trade buy HYPE/USDC \
  --venue hyperlink \
  --margin 100 \
  --dry-run

# HIP-3 perpetual
mlab trade long xyz:TSLA \
  --venue hyperlinkf \
  --margin 100 \
  --leverage 5 \
  --dry-run
```

HIP-3 execution through HyperLink does not require a separate symbol format or per-DEX integration. The same scoped symbol used for direct Hyperliquid execution can be routed through `hyperlinkf`.

As Hyperliquid adds HIP-3 DEXs and Market Lab discovers them, their markets become available through the same execution workflow.

HyperLink remains execution-only. Market Lab uses Hyperliquid’s public Spot, core perpetual, and HIP-3 catalogs and snapshots. Authenticated account reads, orders, fills, and private account WebSockets continue to go through HyperLink.

Spot execution does not use leverage. For perpetuals, Market Lab reads HyperLink’s authenticated asset metadata and caches the maximum leverage in `mlabd` memory by account and asset.

The cache is never written to disk and is rebuilt on demand after a daemon restart.

The existing credential covers both HyperLink venues:

```bash
mlab auth set hyperlink
```

HyperLink remains mainnet-only, has no public testnet, and does not support Market Lab named subaccounts.

## Python Scripting V2 [#python-scripting-v2]

Python V2 follows the same unified HIP-3 market model. Use `hyperliquidf` with a scoped symbol:

```python
def on_data(ctx, history):
    candle = history.source(
        "xyz:tsla@candles@hyperliquidf@mmt:timeframe=3600",
        0,
    )
    if candle is None:
        return

    ctx.trade(
        {
            "exchange": "hyperliquidf",
            "symbol": "xyz:TSLA",
            "position": "open-long",
            "margin": 100,
            "leverage": 5,
        }
    )
```

To route the same HIP-3 order through HyperLink, keep the scoped symbol unchanged and change only the request’s `exchange`:

```python
ctx.trade(
    {
        "exchange": "hyperlinkf",
        "symbol": "xyz:TSLA",
        "position": "open-long",
        "margin": 100,
        "leverage": 5,
    }
)
```

HyperLink Spot uses the exact market pair with `ctx.order`:

```python
ctx.order(
    {
        "exchange": "hyperlink",
        "symbol": "HYPE/USDC",
        "side": "buy",
        "margin": 100,
    }
)
```

Direct Hyperliquid selectors omit `@mmt`.

MMT-backed selectors continue to use `hyperliquidf`. Market Lab maps the scoped symbol to the correct upstream `hyperliquid-{dex}` route. Selector lookup is case-insensitive.

## Required migration [#migration-errors]

Commands using an old exchange or venue name such as `hyperliquidf-xyz` now fail with a migration message.

Move the DEX into the symbol and use `hyperliquidf`:

```text
hyperliquidf-xyz + TSLA  ->  hyperliquidf + xyz:TSLA
hyperliquidf-io  + ANTH  ->  hyperliquidf + io:ANTH
```

The resulting venue model is:

* `hyperliquid` for direct Hyperliquid Spot
* `hyperliquidf` for direct core and HIP-3 perpetuals
* `hyperliquid-outcomes` for Hyperliquid outcomes
* `hyperlink` for HyperLink Spot
* `hyperlinkf` for HyperLink core and HIP-3 perpetuals
