Eastmoney (东方财富)
Overview
Eastmoney has opened a set of free, authentication-free market and disclosure interfaces (push2 / push2his / datacenter-web / reportapi / search-api). These interfaces are wrapped by built-in Vibe-Trading tools and uniformly return a {"ok": true/false, ...} JSON envelope, covering capital-side, disclosure-side, sentiment-side, and fundamentals data for A-shares / Hong Kong stocks / US stocks. This skill is theindex pagefor the above interfaces: each interface's endpoint URL, input parameters, and return fields are written under references/ ; call examples are written under scripts/ .
Rate-limit red line: Eastmoney rate-limits bysource IP and will temporarily ban burst requests. All tools internally pass through a shared per-host throttling layer (backtest.loaders._http); never bypass the tools to send raw HTTP burst requests directly to the endpoints. The environment variable VIBE_TRADING_EASTMONEY_MIN_INTERVAL can be used to adjust the minimum request interval (default 1.0 seconds).
Quick Start
These interfaces are already registered as Vibe-Trading tools; simply call them by tool name, with no need to install an SDK or use a token:
from src.tools.fund_flow_tool import FundFlowTool
# 主力 / 超大单 / 大单 / 中单 / 小单 净流入(近 30 日)
print(FundFlowTool().execute(codes=["600519.SH", "00700.HK"], period="daily", days=30))
The underlying shared client backtest.loaders.eastmoney_client is responsible for secid parsing and rate-limited GET:
from backtest.loaders.eastmoney_client import resolve_secid, get_json
resolve_secid("600519.SH") # -> "1.600519"
resolve_secid("00700.HK") # -> "116.00700"
resolve_secid("AAPL.US") # -> "105.AAPL"(经 suggest 端点解析并进程内缓存)
Parameter Format Description
- Code (symbol):
<code>.<exchange> format, with the exchange suffix in uppercase. A-shares 600519.SH / 000001.SZ / 830799.BJ, Hong Kong stocks 00700.HK(zero-padded to 5 digits), US stocks AAPL.US。
- secid: Eastmoney internal addressing
<market>.<code>. SH=1, SZ/BJ=0, HK=116, US stocks NASDAQ=105 / NYSE=106 / AMEX=107 (the US stock market prefix is resolved by the suggest endpoint).
- Date:datacenter
filter uses YYYY-MM-DD;kline beg/end uses YYYYMMDD。
- Return: unified JSON string envelope, success
{"ok": true, "market", "source": "eastmoney", "data": {...}}, failure {"ok": false, "error": ...}. A single failed symbol is reported as a per-symbol error and does not interrupt the batch.
Link convention: all links in this document pointing to references/ are written in the formrelative to this document(references/...), which is the form GitHub resolves when opening this file in a browser. Theread_file tool resolves the same string under the skill directory that owns it, so humans and agents read the same file. New documentation should continue to use the relative form and ensure that references paths do not have duplicate names across skills: a path owned by two skills at the same time will be reported as ambiguous rather than guessed.
python script examples
Interface List
Capital-side
| Tool |
Title (detailed documentation) |
Market |
Description |
get_fund_flow |
Capital flow |
A-shares/Hong Kong stocks/US stocks |
Main force/extra-large order/large order/medium order/small order net inflow, daily historical or intraday minute bars |
Dragon-Tiger List
| Tool |
Title (detailed documentation) |
Market |
Description |
get_dragon_tiger |
Dragon-Tiger List |
A-shares |
Ranking of buy/sell seats for all stocks on the list market-wide on a given trading day + specified stocks |
Reference data (disclosure side)
| Tool |
Title (detailed documentation) |
Market |
Description |
get_margin_trading |
Margin trading and securities lending |
A-shares |
Daily margin balance/margin purchases/securities lending balance/RZRQ total per stock |
get_block_trades |
Block trades |
A-shares |
Trade-by-trade price/volume/amount, premium/discount relative to closing price, buying and selling brokerages |
get_shareholder_count |
Number of shareholders |
A-shares |
Number of shareholders for each reporting period, period-over-period change, average holdings per shareholder |
get_lockup_expiry |
Restricted share unlocking |
A-shares |
Full historical unlocking table for individual stocks, or market-wide unlocking calendar for the next N days |
Sectors
| Tool |
Title (detailed documentation) |
Market |
Description |
get_sector_info |
Industry and concept sectors |
A-shares |
Industry/concept sectors to which a stock belongs (membership) or industry sectors ranked by gain (ranking) |
Research reports and public sentiment
| Tool |
Title (detailed documentation) |
Market |
Description |
get_research_reports |
Brokerage research reports |
A-shares |
Brokerage research report list (title/institution/analyst/rating/EPS·PE forecast) + THS consensus EPS |
get_stock_news |
Financial news |
A-shares/Hong Kong stocks/US stocks |
Stock-specific news or market-wide financial news flashes (A-shares via Eastmoney, US/HK via Yahoo) |
Financial statements (A-shares / Hong Kong stocks; US stocks via SEC)
| Tool |
Title (detailed documentation) |
Market |
Description |
get_financial_statements |
Three major statements and key indicators |
A-shares/Hong Kong stocks (Eastmoney) · US stocks (SEC EDGAR) |
Balance sheet/income statement/cash flow statement/key indicators; US stocks no longer via Eastmoney |
Stock screening and search
| Tool |
Title (detailed documentation) |
Market |
Description |
screen_market |
Market-wide stock screening |
A-shares/US stocks/Hong Kong stocks |
Market-wide top N ranking by gain/loss, volume, turnover, or turnover rate |
search_symbol |
Symbol search |
Multi-market |
Resolve name/symbol fragments into candidate symbols + markets (Eastmoney suggest + Yahoo + SEC CIK) |