Skip to main content

jing

jing downloads and organizes stock market data. The examples below use China A-share stocks with BaoStock.

Install

pip install jing

Download CN data

BaoStock is the default data source for CN. Stock codes must include an exchange prefix, such as sh. or sz..

import jing

d = jing.D("cn")
d.download("sz.000807")  # Download one stock
d.download()             # Download the stocks in the default list

Batch downloads use ~/data/jing/list/cn_baostock.txt by default. On first use, jing copies the bundled list there; edit this copy to maintain your stock list.

Download US data

US stocks use Yahoo Finance. Yahoo blocks many datacenter and mainland-China IPs with 403/429, so on such hosts route the requests through a proxy:

export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
import jing

d = jing.D("us")
d.download("AAPL")   # one stock
d.download()         # batch from ~/data/jing/list/us.txt

Batch runs resume per stock: each CSV is the ledger, so a re-run after an interruption only fetches what is still missing.

File locations

The default data directory is ~/data/jing:

~/data/jing/
├── list/cn_baostock.txt
└── raw/baostock/cn/sz.000807.csv

Set JING_DATA to use another directory:

export JING_DATA=/data/stocks

Or set the data directory from Python:

from jing.data_paths import set_data_root

set_data_root("/data/stocks")

The stock list and CSV files will then be stored under /data/stocks/list/ and /data/stocks/raw/baostock/cn/.

Documentation

See https://github.com/dawangfei/jing for the full documentation, including COS upload and server deployment.

Metadata

Release files for jing 0.6.4

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

Source distribution (sdist)

Source distribution for jing 0.6.4
File Size Uploaded Provenance Actions
jing-0.6.4.tar.gz 117.9 kB Without provenance Details for jing-0.6.4.tar.gz

Built distribution (wheel)

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

Total release size: 220.1 kB

Release files / jing-0.6.4.tar.gz

Download URL jing-0.6.4.tar.gz
Size 117.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2435385e63cd368c1653aad977be7a320988b33a0f7fc11e1fcd0ebce81f8984
BLAKE2b-256 checksum
How to use checksums
893de9bc1a1ad0c1502ca112295ab024521e4b194d437bd9fdfab6c0ace3172b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.8

Release files / jing-0.6.4-py3-none-any.whl

Download URL jing-0.6.4-py3-none-any.whl
Size 102.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79d79914851b56c7714f65ffec66980bda67e753c2666878265000368f6354aa
BLAKE2b-256 checksum
How to use checksums
80bb2ce73d730b4da23257edca5371faf83f4a1c258c7fa79229575408c35c46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.8

Security for jing 0.6.4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.6.4 This release

2 release files No provenance

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