FinSkills China A-Shares
Use https://finskills.net as the only public API base URL. Never call the private upstream service directly.
Execute a request
- Obtain a Finskills API key from the user or the
FINSKILLS_API_KEYenvironment variable. Direct users without a key tohttps://finskills.net/register. - Normalize the requested security code. Accept bare six-digit codes such as
600519, or qualified codes such as600519.SHand000001.SZ. Preserve an explicit suffix. - Select the smallest endpoint that answers the question. Read references/api.md for parameters and response fields.
- Send
X-API-Key: <key>over HTTPS. Never print, echo, log, or repeat the key. - Report the normalized symbol, exchange, currency, observation timestamp, interval, source, and cache state when available.
Use the bundled client for repeatable calls:
export FINSKILLS_API_KEY='fh_live_...'
python3 scripts/cn_stocks.py quote 600519
python3 scripts/cn_stocks.py history 600519 --interval 1d --adjustment qfq --limit 100
python3 scripts/cn_stocks.py quotes 600519 000001 300750
Choose the endpoint
| Intent | Command / endpoint |
|---|---|
| Latest price for one security | quote → /v1/stocks/quote/{symbol} |
| Compare several latest prices | quotes → /v1/stocks/quotes?symbols=... |
| OHLCV history or returns | history → /v1/stocks/history/{symbol} |
| Resolve a name or code | search → /v1/stocks/search?q=... |
| Identity and listing profile | profile → /v1/stocks/profile/{symbol} |
| Fundamentals or event datasets | financials, dividends, options, holders, recommendations, earnings |
For comparisons, call independent endpoints concurrently where possible, then align observations by timestamp before calculating changes or returns.
Apply A-share conventions
- Treat
600xxxand601xxxcodes as typically Shanghai, and000xxxand300xxxas typically Shenzhen, but trust the API's normalizedsymbolandexchangefields over inference. - Use
qfq(前复权) for return and chart analysis unless the user requests raw (none) or 后复权 (hfq) prices. - Use
1dfor long-range analysis; use30mor60monly for intraday questions. - Interpret all timestamps in
Asia/Shanghaiwhen the response declares that timezone. - Treat
amountas turnover value andvolumeas traded quantity; do not interchange them. - Do not invent missing fundamentals. Some dataset endpoints may validly return
count: 0anddata: [].
Present results
- Distinguish latest available close from a live intraday quote by checking
timestamp,interval, andsource. - State that prices are in CNY unless the response says otherwise.
- For calculated performance, name the adjustment mode and date range.
- Present factual analysis, not personalized investment advice.
- When an upstream endpoint fails or returns no rows, state that limitation and suggest a narrower date range, another adjustment mode, or a later retry.
See references/api.md for the complete focused API reference and response examples.
微信扫一扫