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.1

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.1
File Size Uploaded Provenance Actions
finchx-2.0.1.tar.gz 289.3 kB With provenance Details for finchx-2.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 703.4 kB

Release files / finchx-2.0.1.tar.gz

Download URL finchx-2.0.1.tar.gz
Size 289.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a415b4b958a6f918e2e96cb68f7158601068f8f16d84e90596c920795f25dee4
BLAKE2b-256 checksum
How to use checksums
44520459799342fb8b6e84dfcff40fdbbbd6f31aab9cb7580e34646282f0f3c6
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 27, 2026.

Transparency log

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

Download URL finchx-2.0.1-py3-none-any.whl
Size 414.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62eb23db830a3e2f6e4bd6c54db2b698156a00572621073290472fe96ac58326
BLAKE2b-256 checksum
How to use checksums
d6600253c4657e49910eaeea63267aaa5449a9b4bcb3bca8e0718523ffe561b6
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 27, 2026.

Transparency log

Security for finchx 2.0.1

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.1.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 Sep 27, 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