with one click
eastmoney-data
Fetch A-share stock data from East Money (东方财富) public APIs
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Fetch A-share stock data from East Money (东方财富) public APIs
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Xiaohongshu (小红书) browser automation skill. Use when browsing/searching content, extracting post data, or interacting with the platform via playwright. Requires pre-authenticated storage state.
Chinese traditional calendar and BaZi (Four Pillars of Destiny) skill. Provides CLI scripts for birth chart analysis, marriage compatibility, and auspicious date selection. Wraps the china-testing/bazi library with lunar-python.
Ctrip (携程) hotel price query tool. Use when checking hotel prices, comparing rates, or monitoring price changes on Ctrip via Playwright browser automation. Requires pre-authenticated storage state.
Amap (Gaode Maps) Web Service API skill. Provides CLI scripts for POI search, route planning, geocoding, and weather queries. Zero dependencies — uses Node.js native fetch (Node 18+).
Single-file HTML slide-deck template for Tao Te Ching chapter decks — ink-style, 10-page narrative, hand-rolled engine, reusable CSS variables and animation classes
Send emails via QQ Mail SMTP using nodemailer. Use when sending notifications, reports, or alerts via email.
| name | eastmoney-data |
| scope | langsensei |
| description | Fetch A-share stock data from East Money (东方财富) public APIs |
| version | 1.0.1 |
Access A-share (中国A股) market data via East Money's public HTTP APIs. No API key or registration required.
GET https://push2his.eastmoney.com/api/qt/stock/kline/get
Parameters:
secid = {market}.{code} # 0.{code} for SZ, 1.{code} for SH
fields1 = f1,f2,f3,f4,f5,f6
fields2 = f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61
klt = 101 # 101=daily, 102=weekly, 103=monthly
fqt = 1 # 1=forward adj, 2=backward adj
end = 20261231
lmt = 120 # number of records
Response data.klines array, each line: date,open,close,high,low,volume,amount,amplitude,change_pct,change_amt,turnover
Market codes:
GET https://push2.eastmoney.com/api/qt/stock/get
Parameters:
secid = {market}.{code}
fields = f43,f44,f45,f46,f47,f48,f50,f51,f52,f55,f57,f58,f116,f117,f162,f167,f170
Key fields: f43=latest, f44=high, f45=low, f46=open, f47=volume, f48=amount, f116=market_cap, f117=float_cap, f162=PE, f167=PB
GET https://push2.eastmoney.com/api/qt/clist/get
Parameters:
pn = 1 # page number
pz = 5000 # page size
fs = m:0+t:6,m:0+t:80,m:1+t:2,m:1+t:23 # A-share filter
fields = f12,f14,f2,f3,f4,f5,f6,f7,f15,f16,f17,f18
Fields: f12=code, f14=name, f2=latest, f3=change_pct, f4=change, f5=volume, f6=amount
GET https://push2.eastmoney.com/api/qt/stock/get
Parameters:
secid = {market}.{code}
fields = f162,f167,f164,f168,f170,f171,f173,f183,f184,f185,f186,f187
Fields: f162=PE(TTM), f167=PB, f164=ROE, f168=total_revenue, f170=net_profit, f173=gross_margin
GET https://searchapi.eastmoney.com/api/suggest/get
Parameters:
input = {keyword} # stock name or code fragment
type = 14
count = 5
import requests
def get_kline(code, market=1, days=60):
"""Fetch daily K-line data. market: 0=SZ, 1=SH"""
url = "https://push2his.eastmoney.com/api/qt/stock/kline/get"
params = {
"secid": f"{market}.{code}",
"fields1": "f1,f2,f3,f4,f5,f6",
"fields2": "f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",
"klt": 101, "fqt": 1, "end": "20261231", "lmt": days
}
r = requests.get(url, params=params)
data = r.json()["data"]
return data["name"], data["klines"]
# Example: 贵州茅台 (600519, SH)
name, klines = get_kline("600519", market=1, days=30)
for k in klines[-3:]:
print(k)
Eastmoney APIs will drop connections (RemoteDisconnected) if you send requests too fast. This is the #1 cause of failures.
Mandatory rules:
time.sleep(1))push2.eastmoney.com returns empty response for ETFs, use sina-quote skill insteadExample retry pattern:
import time
import requests
def fetch_with_retry(url, params, max_retries=3):
for i in range(max_retries):
try:
r = requests.get(url, params=params, timeout=10)
return r.json()
except Exception as e:
if i < max_retries - 1:
time.sleep(2 ** i) # 1s, 2s, 4s
else:
raise e
return None
Known limitations:
push2.eastmoney.com/api/qt/stock/get returns empty response for ETFs (use sina-quote)