---
title: "Get Stock From Database"
method: GET
path: "/api/database/stock/{symbol}"
tags: ["database"]
---

# Get Stock From Database

`GET /api/database/stock/{symbol}`

## Request

- Base URL: `https://api.halalterminal.com`
- URL: `https://api.halalterminal.com/api/database/stock/{symbol}`
- Auth: API key in header `X-API-Key`

Retrieve the database record for a single stock by symbol.

Returns the stored reference data for the given symbol including name,
sector, exchange, and country.

**curl example**:
```bash
curl -X GET "http://localhost:8000/api/database/stock/AAPL"
```

**Python requests example**:
```python
import requests
resp = requests.get("http://localhost:8000/api/database/stock/AAPL")
stock = resp.json()
```

## Path parameters

- `symbol` string, required: Ticker symbol, e.g. AAPL.

## Response `200`

Full database record for the requested symbol

- DatabaseStockResponse
  - `symbol` string, required: Ticker symbol
  - `type` string, nullable: Asset type, e.g. equities, etfs, funds
  - `name` string, nullable: Company or asset name
  - `sector` string, nullable: Sector classification
  - `exchange` string, nullable: Exchange where the asset is listed
  - `country` string, nullable: Country of incorporation or domicile

## Other responses

- `401`: API key required or invalid
- `404`: Symbol not found in database
- `422`: Validation Error
- `429`: Quota exceeded

---

[API](https://skmtc.dev/halalterminal/apis/halal-terminal-api.md) · [All operations](https://skmtc.dev/halalterminal/apis/halal-terminal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/halalterminal/apis/halal-terminal-api/revisions/78768b250943?raw)
