FinchX
English | 简体中文
PyPI · Source code · Release notes · License
FinchX is an independent Python library for accessing and normalizing A-share market data from registered third-party providers. Its typed client groups common requests for quotes, financial and company data, news, documents, and market rankings.
Install
python -m pip install finchx
Requires Python 3.10 or newer. The base install includes FinchX's required runtime dependencies.
Optional integrations:
calendaradds thepandas_market_calendarstrading-calendar provider:python -m pip install "finchx[calendar]".jygsenables the authenticated Jiuyangongshe daily-replay provider:python -m pip install "finchx[jygs]". It also needs Chromium:python -m playwright install chromium.
Quickstart
from finchx import FinchX
fx = FinchX()
result = fx.market.quote_snapshot(
instrument="600519", # Six-digit A-share code.
)
# result.data contains StandardRecord values; each record.data is its business payload.
if result.data:
record = result.data[0]
print(record.data["price"])
# to_dicts() exports business payloads as a list of dictionaries.
rows = result.to_dicts()
print(rows[:1])
print(result.warnings)
For daily history, fx.market.ohlcv(...) accepts inclusive start and end dates:
from finchx import FinchX
fx = FinchX()
bars = fx.market.ohlcv(
instrument="600519", # Six-digit A-share code.
start_date="2026-09-01", # Inclusive start date.
end_date="2026-09-23", # Inclusive end date.
adjustment="qfq", # Forward-adjust stock prices.
)
print(bars.to_dicts()[:1])
Use adjustment="qfq" for forward-adjusted prices, "hfq" for backward-adjusted prices, or None for unadjusted equities. Index OHLCV requires None.
Find an API by use case
- Quotes and history:
fx.market.quote(...),fx.market.quote_snapshot(...),fx.market.ohlcv(...),fx.market.deviation(...). - Reference and company data:
fx.reference.trading_calendar(...),fx.fundamental.financial_summary(...),fx.financial.statements(...), plusfx.ownership,fx.company, andfx.corporate_action. - News and documents:
fx.news.search(...),fx.disclosure.search(...),fx.market_news.search(...), andfx.articles.get(...). - Rankings and discovery:
fx.hotlist.stocks(...),fx.hotlist.sectors(...), andfx.iwencai.select(...).
These are starting points, not a complete endpoint list. The API reference has full signatures, data fields, return shapes, and provider details.
Inputs and source access
Single-instrument endpoints accept six-digit codes; the endpoint determines whether a code such as 000001 means a stock or an index. Date-only parameters accept datetime.date or YYYY-MM-DD, YYYYMMDD, and YYYY/MM/DD strings; ambiguous formats such as 09/01/2026 are rejected. News, disclosure, all-market news, and forum time bounds also accept timezone-aware datetime values.
Some source features require caller-provided credentials, including a login Cookie for fx.iwencai.select(...), an API key for fx.iwencai.search(...), and a session Cookie for fx.forum.replies(...) or fx.market.daily_replay(...). Keep credentials out of source control.
FinchX normalizes responses from third-party providers but does not redistribute their datasets. Data availability, fields, freshness, and terms depend on each provider.
Full API reference
FinchX is licensed under Apache-2.0. Third-party provider data remains subject to its provider's terms.
Release files for finchx 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| finchx-2.0.0.tar.gz | 271.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| finchx-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 662.5 kB
Release files / finchx-2.0.0.tar.gz
| Download URL | finchx-2.0.0.tar.gz |
|---|---|
| Size | 271.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b70ba6471da191326ae4d177bd4baec00ca530421958eac7eb99784d7ddb26d0
|
|
BLAKE2b-256 checksum How to use checksums |
fb814130bd795c794aaec6e2ff3c9fde6e5ad020c6a4b29120490e6591e0fc94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency logRelease files / finchx-2.0.0-py3-none-any.whl
| Download URL | finchx-2.0.0-py3-none-any.whl |
|---|---|
| Size | 391.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66dd70bcf08108b38da64d3125ba187c5f068ed3c6373668f40f5dbe599b8171
|
|
BLAKE2b-256 checksum How to use checksums |
df3754a0fd930563d8b99622f6b9f97a0009ba685926fdfadbe5dfd51192f00f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency log