EastMoney APIxuangu.eastmoney.com ↗
Screen Chinese A-share stocks by natural language or filter conditions via EastMoney's Xuangu platform. Access fundamentals, technicals, hot queries, and community posts.
What is the EastMoney API?
This API exposes 11 endpoints covering EastMoney Xuangu's AI-driven stock screener, letting you query A-share stocks by natural language expressions like 'PE<20' or '市值>1000亿' via screen_stocks, browse the full hierarchical filter tree across fundamentals, technical patterns, news events, and popularity signals, and retrieve trending hot conditions with stock counts and community discussion posts.
curl -X GET 'https://api.parse.bot/scraper/46b5c961-06e6-4621-8f3c-953a5849d606/screen_stocks?query=PE%3C20&page_no=1&page_size=10' \ -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 xuangu-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.
"""EastMoney Stock Screener — search stocks, browse filters, trending conditions, community posts."""
from parse_apis.eastmoney_stock_screener_api import EastMoney, Domain, StockNotFound
client = EastMoney()
# Search stocks with a natural-language filter — bounded iteration.
for stock in client.stocks.search(query="PE<20", limit=3):
print(stock.code, stock.name, stock.latest_price, stock.pe_ttm)
# Fetch a specific stock by code — full market data snapshot.
stock = client.stocks.get(code="600519")
print(stock.code, stock.name, stock.latest_price, stock.pb)
# Handle a stock code that doesn't exist.
try:
client.stocks.get(code="999999")
except StockNotFound as exc:
print(f"stock not found: {exc}")
# Browse filter categories for fund screening, using the Domain enum.
for category in client.filtercategories.list(domain=Domain.STOCK, limit=3):
print(category.showName, category.fieldType)
# Browse trending hot screening conditions.
condition = client.hotconditions.list(limit=1).first()
if condition:
print(condition.title, condition.stock_num, condition.change)
# Read recent community posts.
post = client.communityposts.list(limit=1).first()
if post:
print(post.title, post.author, post.publish_time)
print("exercised: stocks.search / stocks.get / filtercategories.list / hotconditions.list / communityposts.list")
Search for stocks using natural language or filter conditions on EastMoney's AI stock screener. Accepts Chinese or symbolic queries like 'PE<20' or '市值>1000亿'. Returns matching stocks with market data columns, parsed filter conditions, and total count. Paginated by page_no/page_size.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search keyword or natural language query (e.g. 'PE<20', '市值>1000亿', '白酒') |
| page_no | integer | Page number for results pagination. |
| page_size | integer | Number of results per page. |
{
"type": "object",
"fields": {
"total": "integer total count of matching stocks",
"columns": "array describing data field definitions",
"dataList": "array of matching stocks with market data",
"resultType": "result type indicator (null for standard results)",
"responseConditionList": "array of parsed filter conditions that were applied"
},
"sample": {
"data": {
"total": 2343,
"columns": [
{
"key": "SERIAL",
"title": "序号"
},
{
"key": "SECURITY_CODE",
"title": "代码"
}
],
"dataList": [
{
"PB": "3.68",
"SERIAL": "1",
"VOLUME": "598.24万",
"PE_DYNAMIC": "17.29",
"NEWEST_PRICE": "10.93",
"SECURITY_CODE": "003000",
"TURNOVER_RATE": "1.94",
"TRADING_VOLUMES": "6504.85万",
"SECURITY_SHORT_NAME": "劲仔食品"
}
],
"resultType": null,
"responseConditionList": [
{
"isValid": true,
"describe": "市盈率(TTM)小于20"
}
]
},
"status": "success"
}
}About the EastMoney API
Stock Screening and Filter Conditions
The screen_stocks endpoint accepts a query parameter in Chinese or symbolic notation and returns a result object containing a columns array describing each data field, a dataList array of matching stocks with live market data, and a total count. The responseConditionList field shows exactly which filter conditions the screener parsed from your query. Pagination is controlled via page_no and page_size. The get_stock_detail endpoint uses the same engine but accepts a single code parameter (e.g. 600519) for targeted lookup, returning price, PE ratio, PB ratio, market cap, and trading volume.
Filter Condition Tree
get_filter_conditions returns the complete hierarchical tree across five top-level categories: 范围 (listing scope), 基本面 (fundamentals), 行情技术面 (technical), 消息面 (news/events), and 人气&涨停 (popularity/limit-up). Each category endpoint — get_filter_conditions_range, get_filter_conditions_fundamentals, get_filter_conditions_technical, get_filter_conditions_news, and get_filter_conditions_popularity — returns the children array for that category with showName, fieldType, and detailed parameter options. Technical filters include MACD cross signals, KDJ, moving averages, and candlestick patterns like 放量突破. Popularity filters expose 股吧人气排名 and 涨停 status including 首板 and 连板 counts.
Hot Conditions and Real-Time Data
get_hot_conditions returns curated trending screening conditions with each item carrying an id, title, plain-language question, stockNum (how many stocks match), chg (change percentage), and tags. Pagination uses a last_ids JSON array rather than a page number. get_real_time_hot_queries returns a recommendations object with popular search queries and a heat_ranking object that is populated only during market hours — it returns an empty object when the market is closed.
Community Posts
get_community_posts retrieves Guba forum discussion posts tagged to the Xuangu topic, returning post_id, post_title, post_content, post_publish_time, and user_nickname per post, along with a count total. The domain parameter on get_filter_conditions accepts 'stock' or 'fund' to switch the filter tree between equity and fund screening contexts.
The EastMoney API is a managed, monitored endpoint for xuangu.eastmoney.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when xuangu.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 xuangu.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 quantitative stock screener that translates English filter criteria into Chinese symbolic queries for screen_stocks
- Populate a filter UI with all available screening parameters by walking the get_filter_conditions hierarchy
- Track which screening themes are trending by polling get_hot_conditions for stockNum and chg changes over time
- Monitor real-time hot search queries during market hours via get_real_time_hot_queries to surface momentum-driven interest
- Retrieve fundamental metrics (PE, PB, ROE, EPS) for a specific A-share stock using get_stock_detail with its six-digit code
- Aggregate community sentiment around the stock screener topic by fetching get_community_posts and analyzing post_content
- Identify consecutive limit-up (连板) stocks by combining get_filter_conditions_popularity parameters with screen_stocks queries
| 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.