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

> ## Agent Instructions
> API requests use the base URL https://api.unusualwhales.com and require a bearer token in the `Authorization` header (`Authorization: Bearer <API_KEY>`). Create and manage API tokens at https://unusualwhales.com/dashboard/api.
> For live market data inside an AI tool, use the Unusual Whales MCP server at https://unusualwhales.com/public-api/mcp.
> Instructions for agents using Unusual Whales tools: https://unusualwhales.com/skill.md

# Stock quotes

> Receive live best bid and ask (top of book) updates for every ticker at once, or for a single ticker.

**NOTE:**
This is the documentation for the websocket channels `quotes` and `quotes:<TICKER>`.
Websocket access for personal use is only available through the [Advanced plan](https://unusualwhales.com/pricing?product=api).

You can find fully-functional examples that stream data from many channels here:

* Python: [https://github.com/unusual-whales/api-examples/tree/main/examples/ws-multi-channel-multi-output](https://github.com/unusual-whales/api-examples/tree/main/examples/ws-multi-channel-multi-output)
* Javascript: [https://github.com/unusual-whales/api-examples/tree/main/examples/ws-multi-channel-multi-output-nodejs](https://github.com/unusual-whales/api-examples/tree/main/examples/ws-multi-channel-multi-output-nodejs)

Connect to the websocket URI:

`wss://api.unusualwhales.com/socket?token=<YOUR_API_TOKEN>`

then `join` the channel you wish to stream, for example `quotes:AAPL` for the live best bid and ask on AAPL.

Join `quotes` for every ticker at once, or `quotes:AAPL` for one.

This is the live counterpart of [`/stock/:ticker/quote`](https://api.unusualwhales.com/docs/operations/PublicApi.StockQuoteController.show),
which returns the same values on the same scale, nested under `bid` and `ask` objects
rather than flat. Use it to fetch the current book when you subscribe: the channel sends
nothing until the ticker's next quote.

Payload format:

```
[
  "quotes:AAPL",
  {
    "ticker": "AAPL",
    "bid": "229.955",
    "bid_size": 300,
    "ask": "229.965",
    "ask_size": 100
  }
]
```

### Field reference

| Field | Type | Description |
| - | - | - |
| `ticker` | string | Underlying ticker. Same as the `:` suffix on the channel name. |
| `bid` | decimal string | Best bid price in dollars. |
| `bid_size` | int | Number of shares displayed at the best bid. |
| `ask` | decimal string | Best ask price in dollars. |
| `ask_size` | int | Number of shares displayed at the best ask. |
