Shioaji



Shioaji is a trading API provided by Sinopac that offers a comprehensive and user-friendly platform for accessing the Taiwan financial markets. With Shioaji, you can trade a variety of financial instruments including stocks, futures, and options using your favorite Python packages such as numpy, scipy, pandas, pytorch, or tensorflow to build your own custom trading models. The platform is easy to use and intuitive, with advanced charting tools, real-time market data, and a customizable interface that allows you to tailor your trading experience to your specific needs. Shioaji is fast and efficient, with a high-performance core implemented in C++ and using FPGA event broker technology, and it is the first Python trading API in Taiwan that is compatible with Linux and Mac, making it a truly cross-platform solution. Whether you are a beginner looking to get started in the world of trading or an experienced trader looking for a more powerful platform, Shioaji has something to offer. Sign up for a free account today and start trading with confidence.
✨ First Taiwan trading API with AI coding agent skill support — Claude Code & Codex CLI
AI Coding Agent Skills
Shioaji is the first Taiwan trading API with AI coding agent skill support. Get AI-assisted guidance on using the Shioaji API.
Claude Code
claude plugin marketplace add Sinotrade/Shioaji
claude plugin install shioaji
Universal Installers (Cursor, Windsurf, Copilot, Codex, and more)
npx skills add Sinotrade/Shioaji # skills.sh - 18+ agents
npx skillkit install Sinotrade/Shioaji # skillkit - 32+ agents
npx openskills install Sinotrade/Shioaji # openskills - universal
Installation
Binaries
simple using pip to install
pip install shioaji
update shioaji with
pip install -U shioaji
uv
using uv to install
uv add shioaji
install speed version
uv add shioaji --extra speed
Docker Image
simple run with interactive mode in docker
docker run -it sinotrade/shioaji:latest
run with jupyter lab or notebook
docker run -p 8888:8888 sinotrade/shioaji:jupyter
Initialization
import shioaji as sj
api = sj.Shioaji()
accounts = api.login("YOUR_TOKEN", "YOUR_SECRET_KEY")
api.activate_ca(
ca_path="/c/your/ca/path/Sinopac.pfx",
ca_passwd="YOUR_CA_PASSWORD",
)
Just import our API library like other popular python library and new the instance to start using our API. Login your account and activate the certification then you can start placing order.
api.quote.subscribe(api.Contracts.Stocks["2330"], quote_type="tick")
api.quote.subscribe(api.Contracts.Stocks["2330"], quote_type="bidask")
api.quote.subscribe(api.Contracts.Futures["TXFC0"], quote_type="tick")
Subscribe the real time market data. Simplely pass contract into quote subscribe function and give the quote type will receive the streaming data.