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

# Subscriptions

> Name the markets you want, and receive their data as it happens.

Market data requires no credential. Connect and subscribe.

```json theme={null}
{"type":"subscribe","data":{"targets":[{"target":"event-market","data":{"ticker":"ANTHROPIC-VALUATION-26Q3-2.1T"}}]}}
```

<Warning>
  **`subscribe` replaces your entire subscription set.** It is not additive.
  Send every target you want on every call — a `subscribe` naming one market
  unsubscribes you from everything else.

  This is also how you unsubscribe: send the set without the targets you no
  longer want. There is no `unsubscribe` frame.
</Warning>

At most **200 targets** per message. More than that is rejected with
`too_many_targets`; split the subscription across sockets.

## Targets

There are two target types, and they carry different data.

<CardGroup cols={2}>
  <Card title="event-market" icon="chart-line">
    A single valuation market. Keyed by `ticker` or `eventMarketId`.
  </Card>

  <Card title="market" icon="building">
    A company's spot market. Keyed by `symbol` or `marketId`.
  </Card>
</CardGroup>

### `event-market`

Order flow for one market — one rung of a ladder.

```json theme={null}
{"target":"event-market","data":{"ticker":"ANTHROPIC-VALUATION-26Q3-2.1T"}}
```

Delivers `market-update` frames where `data.type` is:

| `data.type` | Contents |
| - | - |
| [`prediction-trade`](/websockets/public-trades) | Every match — price, size, maker and taker |
| [`prediction-orderbook`](/websockets/orderbook-updates) | Full YES/NO bid ladders |
| [`prediction-ticker`](/websockets/market-ticker) | Last matched price and the triggering trade's quantity |

### `market`

A company's implied-value reading.

```json theme={null}
{"target":"market","data":{"symbol":"ANTHROPIC"}}
```

Delivers `market-update` frames where `data.type` is:

| `data.type` | Contents |
| - | - |
| [`prediction-implied-value`](/websockets/implied-value) | Implied value and confidence for the company |

<Note>
  These are **separate id spaces**. Subscribing to a market's `event-market`
  does not also get you that company's implied-value updates, and vice versa.
  Subscribe to both if you need both.
</Note>

## Naming things

Name a market by its `ticker` and a company by its `symbol`. The UUID keys
`eventMarketId` and `marketId` are also accepted and are not going away in v1 —
prefer the handle in new code.

Supply **exactly one key per target**. Sending both, or neither, fails to parse
and the frame is rejected.

```json theme={null}
// Good
{"target":"event-market","data":{"ticker":"ANTHROPIC-VALUATION-26Q3-2.1T"}}
{"target":"event-market","data":{"eventMarketId":"a3f1..."}}

// Rejected — both keys
{"target":"event-market","data":{"ticker":"ANTHROPIC-...","eventMarketId":"a3f1..."}}
```

### Tickers are not symbols

The two handles do not carry the same promise.

| Handle | Promise |
| - | - |
| `ticker` | **Permanent.** Names one market forever, never reassigned. |
| `symbol` | A company's **current** handle. Unique at any moment, but it can be changed, and later reused by a different company. |

If you are storing a reference for the long term, store `marketId`. Treat
`symbol` as a lookup key you re-resolve, not as an identity you persist.

### Ticker levels

`event-market` resolves **market** tickers only — the individual rung, not the
ladder above it. The error tells you where to go:

| You sent | Example | Where to look instead |
| - | - | - |
| A series ticker | `ANTHROPIC-VALUATION` | `GET /events/<ticker>` |
| An event ticker | `ANTHROPIC-VALUATION-26Q3` | `GET /markets?event_ticker=<ticker>` |
| A market ticker | `ANTHROPIC-VALUATION-26Q3-2.1T` | ✅ Subscribe to this |

### Normalization

Handles are trimmed and case-folded, then matched literally against what we have
on file.

A handle containing anything outside letters, digits, `.` and `-` is **rejected
rather than cleaned up**. `…-26Q3-1,05T` is an error, not a match on
`…-26Q3-105T` — which would be a different strike entirely.

## Resolution failures

Because `subscribe` replaces your whole set, a target that cannot be resolved
rejects the **whole frame** with `unknown_target` and leaves your existing
subscriptions untouched. A partial apply would leave you worse off than doing
nothing.

```json theme={null}
{"type":"error","message":"no market matches ticker ...","code":"unknown_target"}
```

An unrecognized `eventMarketId` or `marketId` is still accepted silently. This
asymmetry is deliberate: handles are checked against a directory, UUIDs are not.

### What does not resolve

| State | By handle | By UUID |
| - | - | - |
| Open market | ✅ | ✅ |
| `halted` market | ❌ not by `ticker` | ✅ `eventMarketId` works |
| Resolved market | ✅ still resolvable — a resolved ticker is dead, not recycled | ✅ |
| Archived company | ❌ not by `symbol`, nor by the `ticker` of any of its markets | ✅ |

### Newly created markets

A market or company you just created is not resolvable by handle until the
directory's periodic refresh picks it up — **within about a minute**, not on a
deadline. There is no push invalidation on create.

A UUID key skips the directory entirely and resolves instantly.

<Tip>
  If you list something over REST and subscribe to it right away, use the id for
  that first subscribe, or retry the handle once the refresh window has passed.
</Tip>

## Units

* **Prices** are integer cents, 1–99.
* **Sizes** are whole shares.
* **`ts`** is a Unix timestamp in **nanoseconds**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.