Skip to main content

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.

Metadata

Release files for sinopac-nt-community 0.1.2

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

Source distribution (sdist)

Source distribution for sinopac-nt-community 0.1.2
File Size Uploaded
sinopac_nt_community-0.1.2.tar.gz 129.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for sinopac-nt-community 0.1.2
File
sinopac_nt_community-0.1.2-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
sinopac_nt_community-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details
sinopac_nt_community-0.1.2-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
sinopac_nt_community-0.1.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
sinopac_nt_community-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
sinopac_nt_community-0.1.2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
sinopac_nt_community-0.1.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
sinopac_nt_community-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
sinopac_nt_community-0.1.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details

Total release size: 83.4 MB

Release files / sinopac_nt_community-0.1.2.tar.gz

Download URL sinopac_nt_community-0.1.2.tar.gz
Size 129.6 kB
Tags Source
SHA-256 checksum
How to use checksums
195a5c32031fdbd6cfe7f8499e2ef35068d2beca0fab0809a9c1a58f2f3e36b9
BLAKE2b-256 checksum
How to use checksums
7fc1207de9b18c882205dd2a3899bdb928c451a48f9b981aebeb0cda254fc107
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 1, 2026.

Transparency log

Release files / sinopac_nt_community-0.1.2-cp314-cp314-win_amd64.whl

Download URL sinopac_nt_community-0.1.2-cp314-cp314-win_amd64.whl
Size 8.6 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
426ee05edc6015d4c55ef37ab1d23bd24088f0e5738b2cf622e51912cacc0cd8
BLAKE2b-256 checksum
How to use checksums
2883ed6a70e3cd7eb8b9540841e7b456669c042e82bb05f611d95a1a5a9c8ef3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 1, 2026.

Transparency log

Release files / sinopac_nt_community-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sinopac_nt_community-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 9.8 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c2145363af64e2e70767e7464ae8291cfd75813a9d5546eda21116ef007b7f33
BLAKE2b-256 checksum
How to use checksums
9670d5011a3d1f70f9c50e966446f7357c87d50e604c855918912519d2475ed6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 1, 2026.

Transparency log

Release files / sinopac_nt_community-0.1.2-cp314-cp314-macosx_11_0_arm64.whl

Download URL sinopac_nt_community-0.1.2-cp314-cp314-macosx_11_0_arm64.whl
Size 9.3 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
57ee96245314692c6dd8b8467e3667c1654762fb091364585b21eea3dd30b462
BLAKE2b-256 checksum
How to use checksums
9450f288f88629dc3577a4dce89f9dccbd2a179dd9f40d6cf5756944978aa4c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 1, 2026.

Transparency log

Release files / sinopac_nt_community-0.1.2-cp313-cp313-win_amd64.whl

Download URL sinopac_nt_community-0.1.2-cp313-cp313-win_amd64.whl
Size 8.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
b98a05b3a4b69c3d73f8fcc96c30138bc250b7d71de8a3e14e01137c8eaadab3
BLAKE2b-256 checksum
How to use checksums
1de8441a84f8220bacc62658e8b2ab88d1d6386181a7b4aeaf265af36be6e3c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 1, 2026.

Transparency log

Release files / sinopac_nt_community-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sinopac_nt_community-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 9.8 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
325e5fee01bc2c2777fa5c446f0b556aa13dc03995c3f9167236e9154eca2208
BLAKE2b-256 checksum
How to use checksums
2aadd90143a8f40605a168499be41beb4413badeafd114b472e9e50a148c711c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 1, 2026.

Transparency log

Release files / sinopac_nt_community-0.1.2-cp313-cp313-macosx_11_0_arm64.whl

Download URL sinopac_nt_community-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
Size 9.3 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
06bf5d323d11ad67305d050806ff4695101bf2114fa196ef2d6c1c2314074068
BLAKE2b-256 checksum
How to use checksums
b5705afdfc53b6e09d010bf0a0c751dab911a133233b83952a80bf04690ca1af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 1, 2026.

Transparency log

Release files / sinopac_nt_community-0.1.2-cp312-cp312-win_amd64.whl

Download URL sinopac_nt_community-0.1.2-cp312-cp312-win_amd64.whl
Size 8.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
43691aa328db345893e61f51e5f2a133c0671ba73b3e0bf90c1a20cd99ced67a
BLAKE2b-256 checksum
How to use checksums
72fc7885a3a0048df7f74916cdbd79f32ecbf6ea7f0c632b4f64ab776154a47c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 1, 2026.

Transparency log

Release files / sinopac_nt_community-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sinopac_nt_community-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 9.8 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
eb19dc61fabb2596eb82e84a9104379f551ea4d097d3b20de412fbf00c2a3684
BLAKE2b-256 checksum
How to use checksums
aa4edee835467ee78666fa3836de5839851c4c15a526474e2af0d479cb2f66c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 1, 2026.

Transparency log

Release files / sinopac_nt_community-0.1.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL sinopac_nt_community-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Size 9.3 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
db9e0116d67746368078d925380f398a8386ae1665b5486d1b2baf94d862cf6f
BLAKE2b-256 checksum
How to use checksums
3a5db7e33a494915231159700d89db775144cc8fc590a8577d01b3bf2a252578
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

10 release files

0.1.1

10 release files

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