shioaji-cli
The standalone shioaji command-line tool and local HTTP API server of
Shioaji, SinoPac Securities' trading API for
Taiwan stocks, futures and options.
It is a single native binary: it does not depend on your Python version
(free-threaded 3.14t included) and carries no Python extension. Its version is
always the same as the shioaji package.
Install
uv tool install shioaji-cli # or pin a release line: "shioaji-cli==1.7.*"
shioaji --help
One-off use without installing:
uvx --from shioaji-cli shioaji server start
Install either shioaji-cli or the shioaji Python package as a tool, not
both: both provide the same shioaji command. Use shioaji instead when you
also need the Python API.
Quick start
Put your API key in the environment or a .env file in the working directory:
SJ_API_KEY=your-api-key
SJ_SEC_KEY=your-secret-key
Start the local server. It runs in simulation mode by default:
shioaji server start # simulation
shioaji server check # shows the mode and auth status
shioaji server start --production # real trading; place orders with care
shioaji server stop
Other commands start the server in the background on first use:
shioaji auth accounts
shioaji contracts get 2330
shioaji data ticks --code 2330
shioaji order --help
Output is TOON by default; add -f json for JSON.
Local HTTP API
While running, the server exposes the full trading API over HTTP with SSE
streaming at http://127.0.0.1:8080, so any language can use it. Interactive
API docs are at /docs, the OpenAPI document at /openapi.json, and a web
dashboard at /.
Common settings (environment variables):
| Variable | Default | Meaning |
|---|---|---|
SJ_PRODUCTION |
false |
Production instead of simulation |
SJ_HTTP_ADDR |
127.0.0.1:8080 |
Bind address |
SJ_CA_PATH, SJ_CA_PASSWD |
CA certificate for production orders | |
SJ_RECEIVE_WINDOW |
30000 |
Login receive window in ms; raise it on Sign data is timeout |
SJ_LOG_DIR |
~/.shioaji/logs |
Daily server log files, kept 14 days |
Links
- Documentation: https://sinotrade.github.io/
- Release notes: https://sinotrade.github.io/release/
- Issues: https://github.com/Sinotrade/Shioaji/issues
Metadata
Release files for shioaji-cli 1.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| shioaji_cli-1.8.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for shioaji_cli-1.8.0-py3-none-win_amd64.whl |
| shioaji_cli-1.8.0-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details for shioaji_cli-1.8.0-py3-none-manylinux_2_28_x86_64.whl |
| shioaji_cli-1.8.0-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details for shioaji_cli-1.8.0-py3-none-manylinux_2_28_aarch64.whl |
| shioaji_cli-1.8.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for shioaji_cli-1.8.0-py3-none-macosx_11_0_arm64.whl |
| shioaji_cli-1.8.0-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details for shioaji_cli-1.8.0-py3-none-macosx_10_12_x86_64.whl |
Total release size: 102.3 MB
Release files / shioaji_cli-1.8.0-py3-none-win_amd64.whl
| Download URL | shioaji_cli-1.8.0-py3-none-win_amd64.whl |
|---|---|
| Size | 21.7 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7743a94e41b7dd4066c15dc6d2e76e52a53b8674ed1c92fddb11234fb4fe5efa
|
|
BLAKE2b-256 checksum How to use checksums |
3e2356ec2fda31f250311962bb123813089800c6d91e983148a6f4ca853a12a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / shioaji_cli-1.8.0-py3-none-manylinux_2_28_x86_64.whl
| Download URL | shioaji_cli-1.8.0-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 21.4 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
b15e929868cc88673bb1f803b22ab831e4882667b132d77aaf12016b50e37cc2
|
|
BLAKE2b-256 checksum How to use checksums |
a1c32121618e3e7149873d7c13ea43d3344448fc52e8d093a00a6ff26b8df88d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / shioaji_cli-1.8.0-py3-none-manylinux_2_28_aarch64.whl
| Download URL | shioaji_cli-1.8.0-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 19.9 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
b0209fb20b9de96e2da9d67d619c0e69fcd835d525943df0bc0cb9e62bec70f9
|
|
BLAKE2b-256 checksum How to use checksums |
5e25e7efe186c2745df5854e1103843390ab5e10805d48bb0a2c32f16fba37a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / shioaji_cli-1.8.0-py3-none-macosx_11_0_arm64.whl
| Download URL | shioaji_cli-1.8.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 18.8 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5ee03ac0d102703d15de4ddeaf86e47fe8f82c04361006193e9f09f832dfb4fa
|
|
BLAKE2b-256 checksum How to use checksums |
7ad7fb4fb2aa76eaa3d4f7e1df22d11214d01a2d83ef491ac11e8a3468a048c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / shioaji_cli-1.8.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | shioaji_cli-1.8.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 20.6 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
2f830f9eca35ea5ec144123dcc966d75b7659f2228820d81e2945c2a36a4136c
|
|
BLAKE2b-256 checksum How to use checksums |
6ffb1ef8612d18d9d2850ea294fefa44bddf010a37a53522a3cb75f4257fd3ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for shioaji-cli 1.8.0
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.