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



Market Lab v0.0.7 adds standalone Hyperliquid Spot, XYZ HIP-3 perpetuals, and dynamic HIP-4 outcome markets. It also removes synthetic quote assets from every futures symbol.

## Hyperliquid Spot [#hyperliquid-spot]

Hyperliquid Spot is now available as:

```text
--exchange hyperliquid
--venue hyperliquid
```

Hyperliquid core perpetuals remain `hyperliquidf`.

Authentication is shared:

```bash
mlab auth set hyperliquid
```

The existing mainnet and testnet API agents authorize both spot and perpetual execution. Mainnet is the default. Add `--testnet` for testnet spot execution.

### Market catalog [#market-catalog]

```bash
mlab markets --exchange hyperliquid --refresh
mlab markets --exchange hyperliquid
mlab markets --exchange hyperliquid --symbol HYPE/USDC
```

The snapshot is stored at:

```text
~/.market-lab/markets/hyperliquid-markets.json
```

Refresh reads mainnet spot metadata and matching testnet metadata. Network-specific token indexes, pair IDs, venue symbols, increments, and execution rules are stored separately inside the snapshot.

### Real spot pairs [#real-spot-pairs]

Spot keeps the actual quote asset:

```text
HYPE/USDC
HYPE/USDH
HYPE/USDT0
HYPE/USDE
```

These pairs are not changed to `/USDT`. A bare spot asset such as `HYPE` is invalid because it does not identify the quote market.

Hyperliquid's trusted `UBTC` unit-token alias is exposed as `BTC` and mapped back to the correct venue token internally. Other assets beginning with `U` are not normalized automatically.

### Market data [#market-data]

Standalone Hyperliquid Spot supports market snapshots, orderbooks, candles, trades, volumes, volume delta, and 24-hour statistics.

```bash
mlab source orderbook \
  --exchange hyperliquid \
  --symbol HYPE/USDC \
  --depth 20
```

Open interest and funding remain perpetual-only.

### Execution [#execution]

Use `buy` and `sell` for spot:

```bash
mlab trade buy HYPE/USDC \
  --venue hyperliquid \
  --margin 100 \
  --dry-run

mlab trade sell HYPE/USDC \
  --venue hyperliquid \
  --size 10 \
  --type limit \
  --price 45 \
  --tif alo \
  --dry-run
```

Spot supports market and limit orders, GTC, IOC, ALO, mainnet and testnet, open-order queries, fills, cancellations, and token balance queries.

`mlab positions --venue hyperliquid` displays total, held, and available token balances.

Spot does not support leverage, reduce-only orders, attached SL/TP, `mlab close`, built-in execution strategies, or built-in market-making bots. A custom live script can execute spot orders with `--venue hyperliquid`.

Spot plans omit leverage. For a spot buy, margin is the quote-asset sizing budget.

Market Lab validates quote balance for buys, base balance for sells, held versus available balance, lot size, minimum notional, and network-specific metadata. Market buys also reserve Hyperliquid's market-order slippage allowance during balance validation.

## Standalone XYZ perpetuals [#standalone-xyz-perpetuals]

The Hyperliquid XYZ HIP-3 perpetual DEX is now available as a standalone exchange and execution venue:

```text
--exchange hyperliquidf-xyz
--venue hyperliquidf-xyz
```

This integration supports XYZ only, not arbitrary HIP-3 DEXs. Symbols use Market Lab's normalized base asset:

```text
TSLA
```

Do not enter `xyz:TSLA` or `TSLA/USDT`. Market Lab maps `TSLA` to the correct Hyperliquid wire symbol and asset ID internally.

Refresh, list, or inspect the standalone catalog:

```bash
mlab markets --exchange hyperliquidf-xyz --refresh
mlab markets --exchange hyperliquidf-xyz
mlab markets --exchange hyperliquidf-xyz --symbol TSLA
```

Mainnet and testnet use different XYZ DEX indices and asset IDs. Refresh checks both networks and stores each market's available variants. Users do not configure these values manually.

Standalone XYZ supports orderbooks, trades, candles, volume-derived data, open interest, and funding. Scripts use selectors such as:

```text
tsla@candles@hyperliquidf-xyz:timeframe=60
tsla@orderbook@hyperliquidf-xyz:depth=20
tsla@trades@hyperliquidf-xyz
tsla@oi@hyperliquidf-xyz
```

Authentication is shared with Hyperliquid:

```bash
mlab auth set hyperliquid
```

No separate XYZ credential is required. Direct trades, TWAP, VWAP, OIWAP, market-making bots, and live scripts can execute through XYZ:

```bash
mlab trade long TSLA \
  --venue hyperliquidf-xyz \
  --margin 100 \
  --leverage 5 \
  --type market
```

Add `--testnet` to execution, strategy, or bot commands for Hyperliquid testnet. XYZ leverage, margin mode, and isolated-only restrictions come from Hyperliquid market metadata.

## Hyperliquid outcome markets [#hyperliquid-outcome-markets]

Hyperliquid HIP-4 outcome markets are now available through one exchange and execution venue:

```text
--exchange hyperliquid-outcomes
--venue hyperliquid-outcomes
```

Mainnet is the default. Add `--testnet` where supported for testnet. Outcome metadata is read from Hyperliquid's live `outcomeMeta` endpoint, so these markets are not stored in a static JSON snapshot and do not support `--refresh`.

### Questions, outcomes, and sides [#questions-outcomes-and-sides]

A question can contain several outcomes. Each outcome has two tradable sides:

```text
0  positive / Yes
1  negative / No
```

Trading symbols combine the outcome ID and side:

```text
1009:0
1009:1
```

Question IDs are used only by question-level actions. Mainnet and testnet use different question and outcome IDs.

### Live discovery [#live-discovery]

```bash
mlab markets --exchange hyperliquid-outcomes
mlab markets --exchange hyperliquid-outcomes --search BTC
mlab markets --exchange hyperliquid-outcomes --symbol 1009:0
mlab markets --exchange hyperliquid-outcomes --testnet
```

Search covers IDs, symbols, question and outcome information, descriptions, and side names. Market Lab also turns Hyperliquid's structured template metadata into readable questions such as `BTC above 64,315 at Aug 6, 06:00 UTC?`.

### Trading [#trading]

```bash
mlab trade long \
  --venue hyperliquid-outcomes \
  --symbol 1009:0 \
  --margin 100 \
  --type market \
  --dry-run

mlab trade short \
  --venue hyperliquid-outcomes \
  --symbol 1009:0 \
  --size 10 \
  --type limit \
  --price 0.65 \
  --dry-run
```

`long` buys the selected outcome-side token. `short` sells tokens already held; naked shorting is not supported. Outcome execution is spot-like and rejects leverage, reduce-only orders, attached SL/TP, close-position semantics, built-in execution strategies, and market-making bots.

In an interactive terminal, the symbol can be omitted to open a searchable outcome selector. Non-interactive commands and `--yes` automation require an explicit symbol.

### Outcome actions [#outcome-actions]

```bash
mlab outcome split 1009 --amount 10 --dry-run
mlab outcome merge 1009 --amount 10 --dry-run
mlab outcome merge-question 166 --amount 10 --dry-run
mlab outcome negate 166 1014 --amount 10 --dry-run
```

Omit `--amount` from `merge` or `merge-question` to merge the maximum balanced amount. Every outcome action supports `--testnet`, `--dry-run`, `--yes`, and structured output.

### Data, scripts, and account state [#data-scripts-and-account-state]

HIP-4 supports order books, trades, and candles. It does not provide perpetual-only open interest or funding.

```text
1009:0@orderbook@hyperliquid-outcomes
1009:0@trades@hyperliquid-outcomes
1009:0@candles@hyperliquid-outcomes:timeframe=60
```

Account snapshots expose outcome holdings separately from perpetual positions and ordinary spot balances. Before execution, Market Lab fetches metadata again and rejects a plan when its metadata fingerprint no longer matches. See [Hyperliquid outcome markets](/providers-execution/hyperliquid#outcome-markets) for discovery, trading, bots, and account actions.

## Breaking futures symbols [#breaking-futures-symbols]

Every futures and perpetual market now uses only its base asset:

```text
BTC
ETH
HYPE
```

Legacy pair-shaped futures inputs are invalid:

```text
BTC/USDT
BTC/USD
BTC/USDC
BTC-USD
```

This applies to markets, sources, studies, direct execution, cancel and close commands, bots, TWAP, VWAP, OIWAP, script selectors, TOML, job plans, structured output, BULK, Hyperliquid core and XYZ perpetuals, Binance Futures, and MMT futures exchanges.

```bash
mlab markets --exchange hyperliquidf --symbol BTC

mlab source orderbook \
  --exchange bulkf \
  --symbol BTC \
  --depth 20

mlab trade long BTC \
  --venue hyperliquidf \
  --margin 100 \
  --leverage 5

mlab bot run grid BTC \
  --venue bulkf \
  --margin 100 \
  --leverage 10 \
  --levels 5 \
  --step-bps 6
```

Venue wire symbols remain internal:

```text
BULK             BTC-USD
Binance Futures  BTCUSDT
Hyperliquid Perp BTC
```

Users enter `BTC` for every one of them.

Spot is intentionally different. It keeps its real pair, such as `BTC/USDT`, `HYPE/USDC`, or `HYPE/USDH`.

## Scripting symbols [#scripting-symbols]

Futures selectors stay compact:

```text
btc@candles@binancef
btc@trades@bulkf
btc@oi@hyperliquidf
```

`btc` now resolves to `BTC`, not `BTC/USDT`.

Spot selectors include the pair:

```text
hype/usdc@candles@hyperliquid
hype/usdc@orderbook@hyperliquid
hype/usdc@trades@hyperliquid
```

## Upgrade from v0.0.6 [#upgrade-from-v006]

The runtime protocol changed. Upgrade the CLI and daemon together:

1. Check whether a newer release is available with `mlab upgrade --check`.
2. Stop the existing daemon with `mlab daemon stop`.
3. Upgrade to the latest release with `mlab upgrade`.
4. Refresh every affected market snapshot.
5. Replace futures `BASE/QUOTE` inputs with `BASE`.
6. Keep spot inputs as exact `BASE/QUOTE` pairs.
7. Restart the daemon with `mlab daemon start`.
8. Recreate persisted jobs containing legacy futures pair symbols.

```bash
mlab upgrade --check
mlab daemon stop
mlab upgrade
```

Do not leave an older daemon running behind the v0.0.7 CLI.
