eastmoney-data
- Repo stars 1
- Author updated Live
- Author repo swat-marketplace
- Domain
- Data
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 92 / 100 · audit passed
- Author / version / license
- @LangSensei · v1.0.1 · no license declared
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Required · Vendor-specific
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- Python
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- External requests
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: eastmoney-data
description: Access A-share (中国A股) market data via East Money's public HTTP APIs. No API key or registration…
category: data
runtime: Python
---
# eastmoney-data output preview
## PART A: Task fit
- Use case: 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 secid = {market}.{code} # 0.{code} for SZ, 1.{code} for SH requires Vendor-specific API key; runs on Python. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Available APIs / 1. K-Line (日K线数据) / 2. Real-time Quote (实时行情)” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “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 secid = {market}.{code} # 0.{code} for SZ, 1.{code} for SH requires Vendor-specific API key; runs on Python. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “Available APIs / 1. K-Line (日K线数据) / 2. Real-time Quote (实时行情)” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; may access external network resources; requires Vendor-specific API keys.
## Running Rules
- read files, write/modify files; may access external network resources; requires Vendor-specific API keys.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “Available APIs / 1. K-Line (日K线数据) / 2. Real-time Quote (实时行情)”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: eastmoney-data
description: Access A-share (中国A股) market data via East Money's public HTTP APIs. No API key or registration…
category: data
source: LangSensei/swat-marketplace
---
# eastmoney-data
## When to use
- Access A-share (中国A股) market data via East Money's public HTTP APIs. No API key or registration required. GET https://…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Available APIs / 1. K-Line (日K线数据) / 2. Real-time Quote (实时行情)” and keep inference separate from source facts.
- read files, write/modify files; may access external network resources; requires Vendor-specific API keys.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "eastmoney-data" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Available APIs / 1. K-Line (日K线数据) / 2. Real-time Quote (实时行情)
rules -> SKILL.md triggers / order / output contract
runtime -> Python | read files, write/modify files | may access external network resources
guardrails -> requires Vendor-specific API keys + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} East Money Data Skill
Access A-share (中国A股) market data via East Money's public HTTP APIs. No API key or registration required.
Available APIs
1. K-Line (日K线数据)
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:
- Shanghai (SH): secid=1.{code} (e.g., 1.600519 for 贵州茅台)
- Shenzhen (SZ): secid=0.{code} (e.g., 0.000858 for 五粮液)
- ChiNext (创业板): secid=0.{code} (e.g., 0.300750 for 宁德时代)
- STAR (科创板): secid=1.{code} (e.g., 1.688981)
2. Real-time Quote (实时行情)
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
3. Stock List (全部A股列表)
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
4. Financial Summary (财务摘要)
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
5. Search Stock by Name/Code
GET https://searchapi.eastmoney.com/api/suggest/get
Parameters:
input = {keyword} # stock name or code fragment
type = 14
count = 5
Usage Pattern
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)
Notes
- All APIs are public, no authentication needed
- Data is real-time during trading hours (9:30-15:00 CST)
- Amounts are in CNY (人民币)
- Volume unit: 手 (lots of 100 shares)
⚠️ Rate Limiting (IMPORTANT)
Eastmoney APIs will drop connections (RemoteDisconnected) if you send requests too fast. This is the #1 cause of failures.
Mandatory rules:
- Add 1 second delay between every request (
time.sleep(1)) - For batch operations (e.g., fetching data for 10 stocks), use 1.5 second delay
- Always wrap requests in retry logic (3 retries with exponential backoff)
- If
push2.eastmoney.comreturns empty response for ETFs, use sina-quote skill instead
Example 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/getreturns empty response for ETFs (use sina-quote)- Batch requests for >5 stocks often trigger connection drops — always add delays
Decide Fit First
Design Intent
How To Use It
Boundaries And Review