Independent community Sinopac (Taiwan markets) adapter for NautilusTrader
Project description
sinopac-nt-community
Disclaimer: This is an independent community project. It is not affiliated with, endorsed by, or supported by Nautech Systems Pty Ltd or the official NautilusTrader project.
An independent community adapter integrating SinoPac Securities (Taiwan markets — TWSE / TPEX / TAIFEX, via the Shioaji SDK) with NautilusTrader. It provides a live data client, a live execution client, and an instrument provider, backed by a Rust-native HTTP/WebSocket core — usable from Python (a compiled extension) or pure Rust (the same crate).
- Pinned to:
nautilus_trader==1.228.0(PyPI) /nautilus-* 0.58.0(crates.io) - Companion gateway: shioaji-server (a separate process the adapter connects to)
- License: LGPL-3.0-or-later
Install
Python — from PyPI (prebuilt
wheels for Python 3.12–3.14 on Linux, macOS, and Windows; pulls in
nautilus_trader==1.228.0 automatically):
pip install sinopac-nt-community
Rust — from crates.io:
cargo add sinopac-nt-community
Live data/execution also needs a running shioaji-server gateway (a separate process the adapter connects to).
Build from source
Only needed for contributors or unsupported platforms. Requires Rust 1.96.0, uv, and maturin:
git clone https://github.com/Martingale42/sinopac-nt-community
cd sinopac-nt-community
uv venv --python 3.12
uv pip install nautilus_trader==1.228.0 maturin
uv run maturin develop # editable install of the sinopac_nt extension
# or a distributable wheel:
uv run maturin build --release # -> target/wheels/
Usage
Register the factories on a TradingNode and point the configs at your
shioaji-server gateway:
from nautilus_trader.live.node import TradingNode
from nautilus_trader.live.config import TradingNodeConfig
from sinopac_nt import (
SINOPAC,
SinopacDataClientConfig,
SinopacExecClientConfig,
SinopacLiveDataClientFactory,
SinopacLiveExecClientFactory,
)
config = TradingNodeConfig(
trader_id="TESTER-001",
data_clients={SINOPAC: SinopacDataClientConfig(...)},
exec_clients={SINOPAC: SinopacExecClientConfig(...)},
)
node = TradingNode(config=config)
node.add_data_client_factory(SINOPAC, SinopacLiveDataClientFactory)
node.add_exec_client_factory(SINOPAC, SinopacLiveExecClientFactory)
node.build()
node.run()
Runnable end-to-end testers are in examples/
(sinopac_data_tester.py, sinopac_exec_tester.py).
Using from Rust
The same crate is a Rust library, so pure-Rust NautilusTrader systems can drive the clients directly (no Python needed):
use sinopac_nt::{SinopacHttpClient, SinopacWebSocketClient};
Do not enable the python / extension-module features in a pure-Rust build
(they are for the Python wheel only).
Taiwan order semantics
Taiwan-venue order parameters with no native Nautilus equivalent (margin/short,
intraday odd lot, futures open-close type, range-market MKP, TIF coercion,
limit-up/down) are carried on order.tags via SinopacOrderTags. See the
sinopac_nt package docstring and docs/sinopac.md for the
full capability matrix.
Development
uv run maturin develop
uv run pytest python/tests -q # Python integration tests
cargo test # Rust unit + integration tests
Maintainer
Maintained by @Martingale42. Please open an issue on this repository for bugs, questions, or contributions.
License
LGPL-3.0-or-later. This project links against and re-homes code from NautilusTrader (also LGPL-3.0-or-later); upstream copyright notices are retained in the source headers.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sinopac_nt_community-0.1.2.tar.gz.
File metadata
- Download URL: sinopac_nt_community-0.1.2.tar.gz
- Upload date:
- Size: 129.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
195a5c32031fdbd6cfe7f8499e2ef35068d2beca0fab0809a9c1a58f2f3e36b9
|
|
| MD5 |
545ca60597929a2e6564ab90e1978bf7
|
|
| BLAKE2b-256 |
7fc1207de9b18c882205dd2a3899bdb928c451a48f9b981aebeb0cda254fc107
|
Provenance
The following attestation bundles were made for sinopac_nt_community-0.1.2.tar.gz:
Publisher:
release.yml on Martingale42/sinopac-nt-community
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sinopac_nt_community-0.1.2.tar.gz -
Subject digest:
195a5c32031fdbd6cfe7f8499e2ef35068d2beca0fab0809a9c1a58f2f3e36b9 - Sigstore transparency entry: 2033865345
- Sigstore integration time:
-
Permalink:
Martingale42/sinopac-nt-community@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Martingale42
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sinopac_nt_community-0.1.2-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: sinopac_nt_community-0.1.2-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 8.6 MB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
426ee05edc6015d4c55ef37ab1d23bd24088f0e5738b2cf622e51912cacc0cd8
|
|
| MD5 |
39b3ed80b27b127730129c424b5378e4
|
|
| BLAKE2b-256 |
2883ed6a70e3cd7eb8b9540841e7b456669c042e82bb05f611d95a1a5a9c8ef3
|
Provenance
The following attestation bundles were made for sinopac_nt_community-0.1.2-cp314-cp314-win_amd64.whl:
Publisher:
release.yml on Martingale42/sinopac-nt-community
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sinopac_nt_community-0.1.2-cp314-cp314-win_amd64.whl -
Subject digest:
426ee05edc6015d4c55ef37ab1d23bd24088f0e5738b2cf622e51912cacc0cd8 - Sigstore transparency entry: 2033866367
- Sigstore integration time:
-
Permalink:
Martingale42/sinopac-nt-community@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Martingale42
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sinopac_nt_community-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: sinopac_nt_community-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 9.8 MB
- Tags: CPython 3.14, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2145363af64e2e70767e7464ae8291cfd75813a9d5546eda21116ef007b7f33
|
|
| MD5 |
123eacbe76509de099e75ebd5b90efa5
|
|
| BLAKE2b-256 |
9670d5011a3d1f70f9c50e966446f7357c87d50e604c855918912519d2475ed6
|
Provenance
The following attestation bundles were made for sinopac_nt_community-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on Martingale42/sinopac-nt-community
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sinopac_nt_community-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
c2145363af64e2e70767e7464ae8291cfd75813a9d5546eda21116ef007b7f33 - Sigstore transparency entry: 2033866963
- Sigstore integration time:
-
Permalink:
Martingale42/sinopac-nt-community@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Martingale42
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sinopac_nt_community-0.1.2-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: sinopac_nt_community-0.1.2-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 9.3 MB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57ee96245314692c6dd8b8467e3667c1654762fb091364585b21eea3dd30b462
|
|
| MD5 |
8d23edeb5660b9cc4ccfea1b74bd2e0d
|
|
| BLAKE2b-256 |
9450f288f88629dc3577a4dce89f9dccbd2a179dd9f40d6cf5756944978aa4c0
|
Provenance
The following attestation bundles were made for sinopac_nt_community-0.1.2-cp314-cp314-macosx_11_0_arm64.whl:
Publisher:
release.yml on Martingale42/sinopac-nt-community
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sinopac_nt_community-0.1.2-cp314-cp314-macosx_11_0_arm64.whl -
Subject digest:
57ee96245314692c6dd8b8467e3667c1654762fb091364585b21eea3dd30b462 - Sigstore transparency entry: 2033870153
- Sigstore integration time:
-
Permalink:
Martingale42/sinopac-nt-community@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Martingale42
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sinopac_nt_community-0.1.2-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: sinopac_nt_community-0.1.2-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 8.6 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b98a05b3a4b69c3d73f8fcc96c30138bc250b7d71de8a3e14e01137c8eaadab3
|
|
| MD5 |
ff91137511ea7e5d5dde006fbd5ea57c
|
|
| BLAKE2b-256 |
1de8441a84f8220bacc62658e8b2ab88d1d6386181a7b4aeaf265af36be6e3c2
|
Provenance
The following attestation bundles were made for sinopac_nt_community-0.1.2-cp313-cp313-win_amd64.whl:
Publisher:
release.yml on Martingale42/sinopac-nt-community
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sinopac_nt_community-0.1.2-cp313-cp313-win_amd64.whl -
Subject digest:
b98a05b3a4b69c3d73f8fcc96c30138bc250b7d71de8a3e14e01137c8eaadab3 - Sigstore transparency entry: 2033869680
- Sigstore integration time:
-
Permalink:
Martingale42/sinopac-nt-community@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Martingale42
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sinopac_nt_community-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: sinopac_nt_community-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 9.8 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
325e5fee01bc2c2777fa5c446f0b556aa13dc03995c3f9167236e9154eca2208
|
|
| MD5 |
21e7ead10434999e07f15606e64bedb2
|
|
| BLAKE2b-256 |
2aadd90143a8f40605a168499be41beb4413badeafd114b472e9e50a148c711c
|
Provenance
The following attestation bundles were made for sinopac_nt_community-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on Martingale42/sinopac-nt-community
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sinopac_nt_community-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
325e5fee01bc2c2777fa5c446f0b556aa13dc03995c3f9167236e9154eca2208 - Sigstore transparency entry: 2033868249
- Sigstore integration time:
-
Permalink:
Martingale42/sinopac-nt-community@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Martingale42
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sinopac_nt_community-0.1.2-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: sinopac_nt_community-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 9.3 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06bf5d323d11ad67305d050806ff4695101bf2114fa196ef2d6c1c2314074068
|
|
| MD5 |
4deaf0de699b3c7a0a0c483f17640b0c
|
|
| BLAKE2b-256 |
b5705afdfc53b6e09d010bf0a0c751dab911a133233b83952a80bf04690ca1af
|
Provenance
The following attestation bundles were made for sinopac_nt_community-0.1.2-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
release.yml on Martingale42/sinopac-nt-community
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sinopac_nt_community-0.1.2-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
06bf5d323d11ad67305d050806ff4695101bf2114fa196ef2d6c1c2314074068 - Sigstore transparency entry: 2033867650
- Sigstore integration time:
-
Permalink:
Martingale42/sinopac-nt-community@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Martingale42
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sinopac_nt_community-0.1.2-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: sinopac_nt_community-0.1.2-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 8.6 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43691aa328db345893e61f51e5f2a133c0671ba73b3e0bf90c1a20cd99ced67a
|
|
| MD5 |
7be03262227fc4a0dd17c1d2968d01df
|
|
| BLAKE2b-256 |
72fc7885a3a0048df7f74916cdbd79f32ecbf6ea7f0c632b4f64ab776154a47c
|
Provenance
The following attestation bundles were made for sinopac_nt_community-0.1.2-cp312-cp312-win_amd64.whl:
Publisher:
release.yml on Martingale42/sinopac-nt-community
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sinopac_nt_community-0.1.2-cp312-cp312-win_amd64.whl -
Subject digest:
43691aa328db345893e61f51e5f2a133c0671ba73b3e0bf90c1a20cd99ced67a - Sigstore transparency entry: 2033870249
- Sigstore integration time:
-
Permalink:
Martingale42/sinopac-nt-community@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Martingale42
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sinopac_nt_community-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: sinopac_nt_community-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 9.8 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb19dc61fabb2596eb82e84a9104379f551ea4d097d3b20de412fbf00c2a3684
|
|
| MD5 |
beee0189f86d7d844bad87f1f4c58231
|
|
| BLAKE2b-256 |
aa4edee835467ee78666fa3836de5839851c4c15a526474e2af0d479cb2f66c9
|
Provenance
The following attestation bundles were made for sinopac_nt_community-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on Martingale42/sinopac-nt-community
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sinopac_nt_community-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
eb19dc61fabb2596eb82e84a9104379f551ea4d097d3b20de412fbf00c2a3684 - Sigstore transparency entry: 2033869219
- Sigstore integration time:
-
Permalink:
Martingale42/sinopac-nt-community@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Martingale42
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sinopac_nt_community-0.1.2-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: sinopac_nt_community-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 9.3 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db9e0116d67746368078d925380f398a8386ae1665b5486d1b2baf94d862cf6f
|
|
| MD5 |
738bef62ff7c5fa6a4a65e6310f5c69b
|
|
| BLAKE2b-256 |
3a5db7e33a494915231159700d89db775144cc8fc590a8577d01b3bf2a252578
|
Provenance
The following attestation bundles were made for sinopac_nt_community-0.1.2-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
release.yml on Martingale42/sinopac-nt-community
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sinopac_nt_community-0.1.2-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
db9e0116d67746368078d925380f398a8386ae1665b5486d1b2baf94d862cf6f - Sigstore transparency entry: 2033868497
- Sigstore integration time:
-
Permalink:
Martingale42/sinopac-nt-community@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Martingale42
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@baf60dcf1ab4ba5a34cb826e820d527bab9b4d63 -
Trigger Event:
push
-
Statement type: