Eastmoney APIwap.eastmoney.com ↗
Access real-time quotes, K-line history, tick data, order books, and sector performance for Chinese A-shares and indices via the Eastmoney API.
What is the Eastmoney API?
This API exposes 7 endpoints covering Chinese securities market data from Eastmoney (wap.eastmoney.com), including real-time quotes, historical candlestick data at intervals from 1-minute to monthly, tick-by-tick trades, and Level-2 order book snapshots. Start with search_security to resolve a stock name or code into the secid format required by every other endpoint, then query get_realtime_quote, get_kline_data, or get_tick_data for live and historical market data.
curl -X GET 'https://api.parse.bot/scraper/b978b1dd-7b63-47e0-9ab7-9338ac88303e/search_security?count=5&query=600519' \ -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 wap-eastmoney-com-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: Eastmoney Financial Data SDK — bounded, re-runnable; every call capped."""
from parse_apis.eastmoney_financial_data_api import (
Eastmoney, KlineInterval, Adjustment, SectorType, SecurityNotFound
)
client = Eastmoney()
# Search for a security by code to get its QuoteID (secid).
sec = client.securities.search(query="600519", limit=1).first()
print(f"Found: {sec.name} ({sec.code}) — QuoteID: {sec.quote_id}")
# Construct a Security directly by its known secid and fetch its real-time quote.
maotai = client.security(quote_id="1.600519")
quote = maotai.get_quote()
print(f"Quote: price={quote.price}, high={quote.high}, low={quote.low}, volume={quote.volume}")
# Fetch recent daily K-lines for the security.
for kline in maotai.klines.list(interval=KlineInterval.DAILY, adjustment=Adjustment.FORWARD, limit=3):
print(f" {kline.datetime}: open={kline.open}, close={kline.close}, change={kline.change_pct}%")
# List top-performing stocks sorted by change%.
for stock in client.stocks.list(sort_field="f3", sort_order=1, limit=3):
print(f"Stock: {stock.name} ({stock.code}) change={stock.change_pct}%")
# List industry sectors.
for sector in client.sectors.list(sector_type=SectorType.INDUSTRY, limit=3):
print(f"Sector: {sector.name} ({sector.code}) change={sector.change_pct}%, leader={sector.leading_stock}")
# Typed error handling: catch SecurityNotFound on a bad search.
try:
result = client.securities.search(query="ZZZZNONEXISTENT999", limit=1).first()
if result is None:
print("No security found for query")
except SecurityNotFound as exc:
print(f"SecurityNotFound: {exc}")
print("Exercised: securities.search / security.get_quote / klines.list / stocks.list / sectors.list")
Full-text search over securities (stocks, indices, funds) by name, code, or pinyin abbreviation. Returns matching securities with their QuoteID (secid) needed for quote, kline, tick, and order book lookups. A single code like '600519' typically yields one exact match; broader terms yield multiple.
| Param | Type | Description |
|---|---|---|
| count | integer | Maximum number of results to return |
| queryrequired | string | Search keyword: stock name, numeric code, or pinyin abbreviation (e.g. 'GZMT' for 贵州茅台) |
{
"type": "object",
"fields": {
"results": "array of security objects with Code, Name, PinYin, QuoteID, SecurityTypeName"
},
"sample": {
"data": {
"results": [
{
"ID": "6005191",
"JYS": "2",
"Code": "600519",
"Name": "贵州茅台",
"MktNum": "1",
"PinYin": "GZMT",
"TypeUS": "2",
"QuoteID": "1.600519",
"Classify": "AStock",
"InnerCode": "46077278941243",
"MarketType": "1",
"UnifiedCode": "600519",
"SecurityType": "1",
"SecurityTypeName": "沪A"
}
]
},
"status": "success"
}
}About the Eastmoney API
Security Search and ID Resolution
All data endpoints require a secid in market.code format (e.g., 1.600519 for Kweichow Moutai on Shanghai, 0.000001 for Shenzhen Composite). Use search_security to resolve a stock name, code, or pinyin abbreviation into a secid. Results include Code, Name, PinYin, QuoteID, and SecurityTypeName, covering stocks, indices, and funds.
Real-Time Quotes and Order Book
get_realtime_quote returns a snapshot of current market conditions for a single security. Response fields use numeric codes: f43 (current price), f44 (high), f45 (low), f46 (open), f47 (volume), f48 (amount), f60 (previous close), and f170 (change percent), among others. You can pass a fields parameter to request only a subset. get_order_book returns up to 5 bid and 5 ask price levels with price and volume per level; note that bid/ask data may be empty outside regular trading hours.
Historical K-Lines and Tick Data
get_kline_data accepts a secid, an interval (1, 5, 15, 30, or 60 for intraday; 101/102/103 for daily/weekly/monthly), optional begin and end dates in YYYYMMDD format, and an adjustment flag (0=unadjusted, 1=forward, 2=backward). Each returned kline object includes datetime, open, close, high, low, volume, amount, amplitude, change_pct, change_amt, and turnover_rate. get_tick_data returns recent trade prints from the latest session, with each tick carrying time, price, volume, and a direction field valued Buy, Sell, or Neutral.
Stock and Sector Listings
get_stock_list returns a paginated list of equities with real-time performance fields (f2 for price, f3 for change percent, f6 for turnover amount). The fs parameter filters by market segment — for example, m:1+t:2 restricts results to Shanghai A-shares. Sorting is controlled by sort_field and sort_order. get_sector_list provides equivalent data at the industry or concept sector level, returning sector name (f14), BK-prefixed code (f12), and aggregate change percent (f3).
The Eastmoney API is a managed, monitored endpoint for wap.eastmoney.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when wap.eastmoney.com 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 wap.eastmoney.com 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?+
- Build a watchlist app that resolves Chinese stock names to secids via
search_securityand pollsget_realtime_quotefor live prices - Back-test trading strategies using forward-adjusted daily OHLCV data from
get_kline_datawithadjustment=1 - Display intraday price charts using 1-minute or 5-minute K-line intervals from
get_kline_data - Monitor market depth by consuming Level-2 bid/ask levels from
get_order_bookfor selected A-share securities - Rank stocks by single-day turnover or change percent using sorted, filtered results from
get_stock_list - Track sector rotation by comparing daily change percent across industry and concept groups from
get_sector_list - Reconstruct intraday trade flow using tick direction (Buy/Sell/Neutral) from
get_tick_data
| 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 Eastmoney provide an official developer API?+
What does `get_kline_data` return for the `adjustment` parameter, and what values are valid?+
adjustment controls price adjustment for corporate actions. Pass 0 for raw (unadjusted) prices, 1 for forward adjustment (prices adjusted toward the present), and 2 for backward adjustment. If omitted, unadjusted data is returned. All OHLCV fields in the klines array reflect the chosen adjustment method.Is the order book data available outside market hours?+
get_order_book endpoint returns the current bid and ask levels, but the bids and asks arrays may be empty outside regular A-share trading hours (weekdays 09:30–15:00 CST). The price, code, and name fields are still returned. Plan polling logic accordingly if you need order book depth only during active sessions.Does the API cover Hong Kong (HKEx) or US-listed Chinese stocks?+
Does `get_tick_data` return a full historical tick archive or only recent session data?+
get_tick_data returns ticks from the most recent trading session only — it is not a historical tick archive. The limit parameter caps how many of the most recent prints are returned within that session. Historical intraday granularity beyond the current session is available through get_kline_data at 1-minute intervals. If you need multi-session tick history, you can fork the API on Parse and revise it to add that endpoint.