Skip to main content

finlab-online

Open-source broker connectors and order executor for FinLab strategies: turn a strategy's positions into orders on your own brokerage account, from your own machine, with your own credentials.

FinLab 策略的開源下單套件:在自己的電腦、用自己的券商帳號,把策略部位轉成委託。

Install

pip install finlab finlab-online

Code written for finlab.online keeps working unchanged: from finlab.online import OrderExecutor and the older paths such as finlab.online.order_executor and finlab.online.sinopac_account load this package. The broker SDKs (for example shioaji for Sinopac) are installed separately, as before.

原本寫 finlab.online 的程式不用改,裝好這個套件就能照常執行。

Supported Brokers

Broker Module Realtime
Fugle brokers.fugle Yes
Sinopac (Shioaji) brokers.sinopac Yes
Fubon brokers.fubon Yes
Taishin (formerly Masterlink) brokers.taishin (alias of brokers.masterlink) Yes
Schwab brokers.schwab No
Binance brokers.binance No
Pocket brokers.pocket No
E.SUN brokers.esun Yes (via Fugle)

Package Structure

finlab_online/
├── core/               # Abstract interfaces, position, executor, enums, realtime
├── brokers/            # Broker-specific Account implementations
├── dashboard.py        # Cloud-connected multi-strategy rebalancing engine
├── panel.py            # Jupyter notebook GUI for interactive order placement
└── tests/              # Unit and integration tests

Usage

from finlab.online import OrderExecutor, Position

# See https://doc.finlab.tw/details/order_api/ for full documentation.

Testing

# Unit tests (fast, mocked)
pytest tests/unit/ -v

# Integration tests (requires broker credentials)
pytest tests/integration/ -v -s

See tests/README.md for credential setup and details.

Contributing

Contributions are welcome. All changes must pass the existing test suite.

Metadata

Release files for finlab-online 1.0.0

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

Source distribution (sdist)

Source distribution for finlab-online 1.0.0
File Size Uploaded Provenance Actions
finlab_online-1.0.0.tar.gz 112.6 kB Without provenance Details for finlab_online-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for finlab-online 1.0.0
File Interpreter ABI Platform Actions
finlab_online-1.0.0-py3-none-any.whl Python 3 none any Details for finlab_online-1.0.0-py3-none-any.whl

Total release size: 239.0 kB

Release files / finlab_online-1.0.0.tar.gz

Download URL finlab_online-1.0.0.tar.gz
Size 112.6 kB
Tags Source
SHA-256 checksum
How to use checksums
21f32edce7e9fee5cfb52883563082aed09e685bd28340e503b0630fac486eea
BLAKE2b-256 checksum
How to use checksums
622681e4cecc1fc9b69256d99ee4095b00028e79037651196dfd3c70a4a68f70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / finlab_online-1.0.0-py3-none-any.whl

Download URL finlab_online-1.0.0-py3-none-any.whl
Size 126.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b656e205d5e9b72364255545805fa9803a63ca6649a309a310b9b6d5a3e8449
BLAKE2b-256 checksum
How to use checksums
a232eed9f2c8fb4d0ea85d688b7600c35c2e4e9b144c124dec203f616c389d6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for finlab-online 1.0.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.

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