> From TickerLayer docs, Stocks: https://tickerlayer.com/docs/products/stocks#stocks-quote
> REST base URL https://api.tickerlayer.com, API key in the `x-api-key` header. WebSocket wss://stream.tickerlayer.com?apiKey=YOUR_API_KEY. Full API reference: https://tickerlayer.com/llms-full.txt

## Latest quote

**Endpoint:** `GET /stocks/quote/:symbol`

Best bid and ask from the aggregated quote cache when present; otherwise resolved via the REST aggregation path for the symbol.

### Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | Yes | Market-qualified symbol (CC:SYMBOL, e.g. US:AAPL, DE:BMW, TR:THYAO). Plain tickers are rejected. Discover enabled rows via GET /stocks/symbols (optional ?market=CC filter). |

### Request

```bash
curl -sS "https://api.tickerlayer.com/stocks/quote/US:AAPL" \
  -H "x-api-key: <YOUR_API_KEY>"
```

```python
import requests

res = requests.get(
    "https://api.tickerlayer.com/stocks/quote/US:AAPL",
    headers={"x-api-key": "<YOUR_API_KEY>"},
)
print(res.json())
```

```javascript
const res = await fetch("https://api.tickerlayer.com/stocks/quote/US:AAPL", {
  headers: { "x-api-key": "<YOUR_API_KEY>" },
});
const data = await res.json();
console.log(data);
```

```go
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://api.tickerlayer.com/stocks/quote/US:AAPL", nil)
  req.Header.Set("x-api-key", "<YOUR_API_KEY>")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  body, _ := io.ReadAll(resp.Body)
  fmt.Println(string(body))
}
```

### Response

```json
{
  "symbol": "US:AAPL",
  "bid": 214.22,
  "ask": 214.25,
  "bid_size": 1200,
  "ask_size": 800,
  "timestamp": 1743512400000
}
```

### Notes

`400 invalid stock symbol; expected MARKET:BASE (example: US:AAPL)` when the path is not market-qualified. `403` when the market of the symbol is not enabled on your account; every route that takes a symbol answers the same way. `404 unknown symbol` if the symbol is not in the enabled registry. `503 market data temporarily unavailable` when lookup fails with no serviceable quote.
