# Shanghai Stock Exchange — 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 Shanghai Stock Exchange market activity with real-time equity quotes, index performance data, and daily trading statistics. Search for specific securities and view comprehensive market overviews to track stock prices and exchange trends.

**Category:** Finance & Markets | **Website:** [sse.com.cn/](https://sse.com.cn/) | **Docs:** [parse.bot/marketplace/2f90e63e-2d07-4147-88e6-6daa0f1929c0/sse-com-cn-api](https://parse.bot/marketplace/2f90e63e-2d07-4147-88e6-6daa0f1929c0/sse-com-cn-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/shanghai-stock-exchange/`
**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 market overview

Get overall market statistics across stocks, bonds, and funds. Returns trading amounts, total/negotiable market values, and security counts for each product type on a given trading day. When no date is supplied the latest available trading day is used.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date` | string | No | Snapshot date in YYYYMMDD format. Omitting returns the latest available trading day. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/shanghai-stock-exchange/get-market-overview \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"date":"<string>"}'
```

### Get realtime equity list

Get real-time market quotations for SSE-listed equities. Returns a paginated window of equity quotes with code, name, open, high, low, last price, previous close, change rate, volume, and amount. Use begin/end to page through the full list.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `begin` | integer | No | Pagination start index (0-based). |
| `end` | integer | No | Pagination end index (exclusive). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/shanghai-stock-exchange/get-realtime-equity-list \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"begin":"<integer>","end":"<integer>"}'
```

### Get security snapshot

Get a real-time snapshot for a specific security code including current price, bid/ask depth, price limits, and trading status. The bid and ask arrays contain interleaved [price, volume] pairs for 5 levels of depth.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `code` | string | Yes | 6-digit SSE security code (e.g. 600000, 600036). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/shanghai-stock-exchange/get-security-snapshot \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"code":"<string>"}'
```

### Get sse index list

Get the full list of SSE indices with metadata including index code, full name, English name, base day, base point, number of constituent stocks, and methodology description. No parameters needed.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/shanghai-stock-exchange/get-sse-index-list \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get sse index overview

Get performance overview for key SSE indices including composite, STAR, and sector indices. Returns close points, PE ratios, trading amounts, and constituent counts. No parameters needed — always returns the latest trading day.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/shanghai-stock-exchange/get-sse-index-overview \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get stock trading overview

Get daily trading statistics for different stock boards (Main A, Main B, STAR, combined). Returns volume, turnover, PE ratio, and market values per board for a given trading day.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date` | string | No | Search date in YYYYMMDD format. Omitting returns the latest available trading day. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/shanghai-stock-exchange/get-stock-trading-overview \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"date":"<string>"}'
```

### Search securities

Search for SSE-listed securities by code, Chinese name, or pinyin abbreviation. Returns up to 50 matching results. Matches against the full securities dictionary including stocks, bonds, and funds.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword — a security code (e.g. 600000), Chinese name, or pinyin abbreviation (e.g. pfyx). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/shanghai-stock-exchange/search-securities \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<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.