# Dps Psx — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/dps-psx/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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.beta.paywithlocus.com/api/wrapped/credits/dps-psx/get-index-constituents \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/dps-psx/get-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/dps-psx/get-market-indices \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/dps-psx/get-market-summary \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/dps-psx/get-sector-summary \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/dps-psx/get-stock-announcements \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/dps-psx/get-stock-financials \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/dps-psx/get-stock-payouts \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/dps-psx/get-stock-quote \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/dps-psx/get-symbols \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/dps-psx/get-trading-panel \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"board_type":"<string>","market_board":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.