Skip to main content

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:

  • calendar adds the pandas_market_calendars trading-calendar provider: python -m pip install "finchx[calendar]".
  • jygs enables 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(...), plus fx.ownership, fx.company, and fx.corporate_action.
  • News and documents: fx.news.search(...), fx.disclosure.search(...), fx.market_news.search(...), and fx.articles.get(...).
  • Rankings and discovery: fx.hotlist.stocks(...), fx.hotlist.sectors(...), and fx.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.

Metadata

Release files for finchx 2.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for finchx 2.0.3
File Size Uploaded Provenance Actions
finchx-2.0.3.tar.gz 312.3 kB With provenance Details for finchx-2.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for finchx 2.0.3
File Interpreter ABI Platform Actions
finchx-2.0.3-py3-none-any.whl Python 3 none any Details for finchx-2.0.3-py3-none-any.whl

Total release size: 754.7 kB

Release files / finchx-2.0.3.tar.gz

Download URL finchx-2.0.3.tar.gz
Size 312.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8c6849f4241ca112007620d48fbf2a934b1bd7658e04926e212595052d53246f
BLAKE2b-256 checksum
How to use checksums
65fac46e358f3225b6cbdcbcdf561a6a06d041609b33782bac15e20834c39404
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 Oct 4, 2026.

Transparency log

Release files / finchx-2.0.3-py3-none-any.whl

Download URL finchx-2.0.3-py3-none-any.whl
Size 442.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78a7f10afdc8624bf8f57092ccd2f3ec752daab944dab70430104f528a8bd7e8
BLAKE2b-256 checksum
How to use checksums
0ea4bb3b07c1c5ef7f1fb674fc326691a949745bb988270811417006cafe2776
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 Oct 4, 2026.

Transparency log

Security for finchx 2.0.3

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for finchx-2.0.3.tar.gz

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 Oct 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page