# Stock quotes `GET` `https://api.unusualwhales.com/api/socket/quotes` **NOTE:** This is the documentation for the websocket channels `quotes` and `quotes:`. 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=` 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. | ## Authentication ``` Authorization: Bearer YOUR_API_KEY ``` ## Example ### curl ```bash curl -X GET "https://api.unusualwhales.com/api/socket/quotes" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json" ``` ### Python ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/socket/quotes", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` ## Response Example ```json { "data": [] } ```