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.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jing-0.6.3.tar.gz | 84.1 kB | Without provenance | Details for jing-0.6.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jing-0.6.3-py3-none-any.whl | Python 3 | none | any | Details for jing-0.6.3-py3-none-any.whl |
Total release size: 175.8 kB
Release files / jing-0.6.3.tar.gz
| Download URL | jing-0.6.3.tar.gz |
|---|---|
| Size | 84.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09ef626bc35e5ab0009748571262e09e758d68a2834cfb229014ceef6bd468e2
|
|
BLAKE2b-256 checksum How to use checksums |
9fbca9065e39d890b43431a48a36e83c1cd8b31f7abdba5fe1febe32c877e3eb
|
| 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.3-py3-none-any.whl
| Download URL | jing-0.6.3-py3-none-any.whl |
|---|---|
| Size | 91.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f8d893ead571144cdb85f211f84a45c79e16e647d7c1bd68c786f37ccbc49c7
|
|
BLAKE2b-256 checksum How to use checksums |
ad46c49ea68da69ce8fe0d0e51ee35efd3a4a85b8e08ee16eed76c0a391882d2
|
| 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.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.
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.