# Markets, assets, and DEXes

> How HyperCore names markets, and how price aggregation works on book streams.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Callout intent="info" title="Beta">
  HyperCore APIs are in beta. Message fields, limits, and behavior may change, including breaking changes.
</Callout>


# Markets, assets, and DEXes

## Coin names

Streams use Hyperliquid's own market names, exactly as Hyperliquid's API returns them. The format tells you the market type:

| Form | Market type | Examples |
| --- | --- | --- |
| Readable name | Perpetual | `BTC`, `ETH`, `HYPE` |
| `dex:NAME` | HIP-3 perpetual on a builder-deployed DEX | `xyz:AAPL`, `io:SNDK` |
| `@index` | Spot | `@107`, `@142` |
| `#id` | Outcome market (HIP-4) | `#102220` |

A few spot markets use a readable pair name such as `PURR/USDC`. Look up names and `@index` mappings with Hyperliquid's `meta`, `perpDexs`, and `spotMeta` info requests.

Rules to rely on:

* **Names are case-sensitive.** `BTC` is a market; `btc` is not.
* **Filters match exactly.** `"coins": ["BTC"]` matches the BTC perpetual only, not `xyz:BTC` or spot BTC.
* **Unknown names aren't rejected.** A subscription to a name that doesn't exist (yet) is accepted and returns empty data until that market appears. Check spelling if a market stays empty.
* **Omitting `coins` means every market** of every type, including new markets as they're listed.

New market types and naming forms may appear as Hyperliquid evolves. Treat coin names as opaque strings rather than parsing them.

## Price aggregation

`l2Book` and `l2BookDiff` can group price levels:

| Parameter | Accepted values | Effect |
| --- | --- | --- |
| `nSigFigs` | `2`, `3`, `4`, `5` | Group prices to this many significant figures. Omit for exact prices. |
| `mantissa` | `1`, `2`, `5` | Step size within the last significant figure. Only with `nSigFigs: 5`; default `1`. |
| `nLevels` | `1`, `10`, `20` (default), `50` | Levels per side. |

Grouping rounds bids down and asks up. A diff-maintained book must use the same parameters as the snapshot it started from.

## Level semantics

A price level reports `px` (price), `sz` (total resting size), and `n` (number of orders). Aggregated streams don't expose order IDs or addresses; use `l4BookUpdates` for order-level detail.