# Dps Psx — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Monitor live and historical stock prices, market indices, and sector performance from the Pakistan Stock Exchange to track investment opportunities and trading patterns. Search specific symbols, view market performers, and analyze intraday trends and OHLCV data for all listed companies.

**Category:** Finance & Markets | **Website:** [dps.psx.com.pk/](https://dps.psx.com.pk/) | **Docs:** [parse.bot/marketplace/2d5c196e-712b-409e-b00d-dfd2ec453b44/dps-psx-com-pk-api](https://parse.bot/marketplace/2d5c196e-712b-409e-b00d-dfd2ec453b44/dps-psx-com-pk-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-dps-psx-com-pk-api-2d5c196e/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_index_constituents

Returns constituent stocks for a given PSX index with their current prices, changes, and volume.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `index` | string | No | Index name: KSE100, KSE30, KMI30, ALLSHR, BKTI, OGTI, KMIALLSHR, PSXDIV20, UPP9, NITPGI, NBPPGI, MZNPI, JSMFI, ACI, JSGBKTI, HBLTTI, MII30. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dps-psx-com-pk-api-2d5c196e/get_index_constituents \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"index":"<string>"}'
```

### get_listings

Returns listing status for all companies on the main board including sector, outstanding shares, and free float.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dps-psx-com-pk-api-2d5c196e/get_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_market_indices

Returns all PSX market indices with their current values, daily performance stats (high, low, volume, year change), and timestamp.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dps-psx-com-pk-api-2d5c196e/get_market_indices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_market_summary

Returns overall market summary including board statistics (trades, volume, value) and top index values with daily changes.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dps-psx-com-pk-api-2d5c196e/get_market_summary \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_sector_summary

Returns trading summary aggregated by sector including advances, declines, turnover volume, and market capitalization.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dps-psx-com-pk-api-2d5c196e/get_sector_summary \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_stock_announcements

Returns latest announcements from PSX, optionally filtered by symbol. The type parameter filters announcement source; type C (companies) is the most reliable.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `symbol` | string | No | Stock symbol to filter announcements (e.g. OGDC, ABL). Omitting returns all announcements for the selected type. |
| `type` | string | No | Announcement source type: C (company announcements), E (PSX/exchange), CDC, SECP, NCCPL. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dps-psx-com-pk-api-2d5c196e/get_stock_announcements \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"symbol":"<string>","type":"<string>"}'
```

### get_stock_financials

Returns annual and quarterly financial highlights (Sales, Profit, EPS, margins) for a stock. Results include multiple tables covering annual performance, quarterly performance, and profitability ratios.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `symbol` | string | Yes | Stock symbol (e.g. OGDC, ABL, NBP, ENGRO). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dps-psx-com-pk-api-2d5c196e/get_stock_financials \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"symbol":"<string>"}'
```

### get_stock_payouts

Returns dividend and payout history for a stock including dates, financial period, payout details, and book closure dates.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `symbol` | string | Yes | Stock symbol (e.g. ABL, OGDC, NBP, ENGRO). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dps-psx-com-pk-api-2d5c196e/get_stock_payouts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"symbol":"<string>"}'
```

### get_stock_quote

Returns detailed real-time quote and statistics for a specific stock including price, change, P/E ratio, market cap, and trading range data.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `symbol` | string | Yes | Stock symbol (e.g. OGDC, ABL, NBP, BOP, ENGRO). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dps-psx-com-pk-api-2d5c196e/get_stock_quote \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"symbol":"<string>"}'
```

### get_symbols

Returns all listed symbols with their names and sectors on the Pakistan Stock Exchange. Each symbol includes classification flags (ETF, debt) and sector assignment.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dps-psx-com-pk-api-2d5c196e/get_symbols \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_trading_panel

Returns the live trading board showing bid/offer prices and volumes for all stocks on a specific board. Only the REG board type reliably returns data outside market hours.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `board_type` | string | No | Board type: REG (regular equity), FUT (deliverable futures), CSF (cash settled futures), ODL (odd lot). |
| `market_board` | string | No | Market board identifier: main. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dps-psx-com-pk-api-2d5c196e/get_trading_panel \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"board_type":"<string>","market_board":"<string>"}'
```
