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

# Prices

> Retrieve the most recent trade price and volume for up to 250 symbols in a single request. Requires the prices:read scope on your API key.

## Fetch the latest trade prices for symbols

The latest prices endpoint returns the most recent trade data for a batch of symbols. You must specify at least one symbol — the request returns a `400` error otherwise. Results are keyed by symbol and include price, volume, and any additional fields captured from the last trade event.

**`GET https://app.stratalerts.com/api/market/v1/prices/latest`**

<Note>
  Requires scope: `prices:read`
</Note>

## Request parameters

<ParamField query="symbols" type="string" required>
  Comma-separated list of ticker symbols (e.g., `AAPL,MSFT,SPY`). Symbols are normalized to uppercase. Maximum 250. At least one symbol is required — omitting this parameter returns a `400` error.
</ParamField>

## Response fields

<ResponseField name="items" type="object[]" required>
  Array of price objects, one per symbol that has a recent trade on record. Symbols with no recorded trade are omitted from the response.

  <Expandable title="price object">
    <ResponseField name="symbol" type="string" required>
      Ticker symbol, uppercased.
    </ResponseField>

    <ResponseField name="price" type="number" required>
      Most recent trade price.
    </ResponseField>

    <ResponseField name="volume" type="number" required>
      Volume associated with the last trade event.
    </ResponseField>
  </Expandable>
</ResponseField>

<Tip>
  Symbols in the response array follow the same order as your `symbols` parameter. Symbols with no recent trade data are silently excluded — check that all expected symbols appear in the response if completeness matters to your use case.
</Tip>

## Code examples

<CodeGroup>
  ```bash curl theme={null}
  curl -G "https://app.stratalerts.com/api/market/v1/prices/latest" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    --data-urlencode "symbols=AAPL,MSFT,SPY"
  ```

  ```python python theme={null}
  import requests

  resp = requests.get(
      "https://app.stratalerts.com/api/market/v1/prices/latest",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      params={"symbols": "AAPL,MSFT,SPY"},
  )
  resp.raise_for_status()
  data = resp.json()
  for item in data["items"]:
      print(item["symbol"], item["price"])
  ```

  ```javascript javascript theme={null}
  const resp = await fetch(
    "https://app.stratalerts.com/api/market/v1/prices/latest?symbols=AAPL,MSFT,SPY",
    { headers: { Authorization: "Bearer YOUR_API_KEY" } }
  );
  const data = await resp.json();
  data.items.forEach(({ symbol, price }) => console.log(symbol, price));
  ```
</CodeGroup>

## Example response

```json theme={null}
{
  "items": [
    {
      "symbol": "AAPL",
      "price": 214.32,
      "volume": 1200
    },
    {
      "symbol": "MSFT",
      "price": 415.88,
      "volume": 850
    },
    {
      "symbol": "SPY",
      "price": 532.10,
      "volume": 3400
    }
  ]
}
```

## Error codes

| HTTP status | Error code             | Meaning                                                     |
| ----------- | ---------------------- | ----------------------------------------------------------- |
| 400         | `missing_symbols`      | The `symbols` query parameter was not provided or is empty. |
| 401         | `missing_api_key`      | No API key was provided or the key format is invalid.       |
| 403         | `inactive_entitlement` | Your account does not have an active API entitlement.       |
| 403         | `missing_scope`        | Your API key does not have the `prices:read` scope.         |

Error responses use the following shape:

```json theme={null}
{
  "error": {
    "code": "missing_symbols",
    "message": "missing symbols"
  }
}
```
