Com APIsse.com.cn ↗
Access SSE market overviews, real-time equity quotes, index performance, daily board statistics, and security search via a single structured API.
What is the Com API?
This API exposes 7 endpoints covering Shanghai Stock Exchange market data — from board-level trading statistics to real-time per-security snapshots. Use get_realtime_equity_list to pull paginated live quotes for all SSE-listed equities, or get_security_snapshot to retrieve bid/ask depth, price limits, and trading status for a single 6-digit security code. Market overviews, index metadata, and a full-text security search are also included.
curl -X GET 'https://api.parse.bot/scraper/091705e2-bf6a-48a4-928e-a06326011632/get_market_overview' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace sse-com-cn-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: SSE Market Data SDK — bounded, re-runnable; every call capped."""
from parse_apis.sse_market_data_api import SSE, SecurityNotFound
client = SSE()
# List market products — one call gives all product categories for the latest day.
for product in client.marketproducts.list(limit=5):
print(product.product_name, product.total_trade_amt, product.security_num)
# List stock board trading stats — shows Main A, Main B, STAR, combined.
for board in client.stockboards.list(limit=5):
print(board.product_code, board.trade_amt, board.avg_pe_rate)
# Search for a security, then drill into its real-time snapshot.
security = client.securities.search(query="pfyx", limit=1).first()
if security:
snap = security.snapshot.get()
print(snap.name, snap.last, snap.chg_rate, snap.volume)
# Typed error handling — catch SecurityNotFound on an invalid code.
try:
bad_snap = client.snapshots.get(code="999999")
print(bad_snap.name, bad_snap.last)
except SecurityNotFound as exc:
print(f"Security not found: {exc.code}")
# Browse real-time equity quotes — first few listed equities.
for quote in client.equityquotes.list(begin=0, end=3, limit=3):
print(quote.code, quote.name, quote.last, quote.chg_rate)
print("exercised: marketproducts.list / stockboards.list / securities.search / security.snapshot.get / snapshots.get / equityquotes.list")
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.
| Param | Type | Description |
|---|---|---|
| date | string | Snapshot date in YYYYMMDD format. Omitting returns the latest available trading day. |
{
"type": "object",
"fields": {
"items": "array of market product summaries with PRODUCT_NAME, TOTAL_VALUE, NEGO_VALUE, SECURITY_NUM, TOTAL_TRADE_AMT, TRADE_DATE"
},
"sample": {
"data": {
"items": [
{
"NEGO_VALUE": "618705.37",
"TRADE_DATE": "20260610",
"TOTAL_VALUE": "665722.73",
"PRODUCT_NAME": "股票",
"SECURITY_NUM": "2355",
"TOTAL_TRADE_AMT": "12283.66"
}
]
},
"status": "success"
}
}About the Com API
Market Overviews and Board Statistics
get_market_overview returns aggregate statistics across stocks, bonds, and funds for any trading day you specify in YYYYMMDD or YYYY-MM-DD format — fields include TOTAL_VALUE, NEGO_VALUE, SECURITY_NUM, and TOTAL_TRADE_AMT per product type. For equity-specific breakdowns, get_stock_trading_overview splits results by board: Main A, Main B, STAR Market, and combined. Each row carries TRADE_VOL, TRADE_AMT, AVG_PE_RATE, TOTAL_VALUE, and NEGO_VALUE, making it straightforward to compare board-level valuations on a given date.
Index Data
get_sse_index_overview returns current snapshot data for key SSE indices — composite, STAR, and sector indices — with fields like CLOSE_POINT, PE_RATIO, TRADE_AMT, and KIND_NUM (constituent stock count). If you need static metadata rather than live performance, get_sse_index_list provides the full catalogue: indexCode, indexFullName, indexNameEn, indexBaseDay, indexBasePoint, numOfStockes, and methodology descriptions. Neither endpoint accepts date or filter parameters; they return the full current set.
Real-Time Quotes and Security Lookup
get_realtime_equity_list serves paginated live quotes for all SSE equities. Pass begin and end integers to page through results; each record in the list array includes code, name, open, high, low, last price, previous close, change rate, volume, and amount. For a focused view, get_security_snapshot accepts a single required code parameter (e.g. 600000) and returns the full snap array with bid/ask depth and price limit fields alongside standard OHLC data.
search_securities accepts a query string — a 6-digit code, a Chinese company name, or a pinyin abbreviation such as pfyx — and returns up to 50 matching results with code, name, and pinyin fields. This is useful for resolving a company name to its SSE code before querying the snapshot or trading history endpoints.
The Com API is a managed, monitored endpoint for sse.com.cn — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when sse.com.cn changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official sse.com.cn API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Track real-time price changes across all SSE-listed equities using
get_realtime_equity_listwith pagination. - Monitor STAR Market vs. Main Board valuation spreads by comparing
AVG_PE_RATEfromget_stock_trading_overview. - Build an index dashboard using
CLOSE_POINTandPE_RATIOfields fromget_sse_index_overview. - Resolve company names or pinyin abbreviations to security codes via
search_securitiesbefore making downstream queries. - Pull historical daily market totals — total/negotiable market cap and trade amounts — using
get_market_overviewwith a date parameter. - Display bid/ask depth and trading status for a single stock using
get_security_snapshotwith a 6-digit SSE code. - Enumerate all SSE indices with base dates and constituent counts using
get_sse_index_listfor index construction or backtesting setup.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does the Shanghai Stock Exchange provide an official developer API?+
What does `get_security_snapshot` return beyond basic price data?+
get_security_snapshot returns a snap array that includes bid/ask depth, price limit levels (up and down), trading status flags, and change/change-rate fields alongside the standard open, high, low, last, volume, and amount values. You supply a single required code parameter — a 6-digit SSE security code such as 600000.How does pagination work in `get_realtime_equity_list`?+
begin and end parameters to define the slice you want. The response object includes total (total equity count), begin, and end fields so you can calculate subsequent page ranges. Both parameters are optional; omitting them returns the default initial slice.Does the API cover historical intraday tick data or candlestick (OHLCV) time series for individual stocks?+
get_security_snapshot, paginated live quotes via get_realtime_equity_list, and daily board-level summaries via get_stock_trading_overview. Intraday tick history or per-security OHLCV time series are not exposed. You can fork this API on Parse and revise it to add the missing endpoint.