Registry / data / finlab

finlab

JSON →
library2.0.13pypypi✓ verified 81d ago

FinLab is a Python library for Taiwanese stock analysis and backtesting. Current version: 2.0.3. The library provides tools for downloading stock data, technical analysis, and strategy backtesting. It has an active release cadence with breaking changes from v1 to v2.

pip install finlab
INSTALL
IMPORT
SIG · FINLAB
F
finlab
datapythonv2.0.13
Install
19.6s avg
Import
Disk
560MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.13 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 19.6s · import 0.000s · 559MB
560MB installed
● package 560MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FinlabDataFrame
from finlab import FinlabDataFrame
from finlab import DataCenter
LoginPanel
from finlab import LoginPanel
get_token
from finlab import get_token

Authenticate with your token and fetch closing prices for TSMC (2330).

import os from finlab import DataCenter, login login(os.environ.get('FINLAB_TOKEN', '')) dc = DataCenter() df = dc.get('收盤價', symbol='2330') print(df.head())
Debug
Known issues
breakingVersion 2.0 completely changed the API. Old code using 'finlab.data' or 'finlab.backtest' will fail. No backward compatibility.
fix
Migrate to v2 imports: 'from finlab import ...' instead of 'from finlab.data import ...'.
affects: >=1.0,<2.0.0
deprecatedAutomatic config file detection is deprecated. You must pass the token explicitly via login() or environment variable FINLAB_TOKEN.
fix
Set FINLAB_TOKEN env var or call login('your_token').
affects: >=2.0.0
gotchaDataCenter.get() expects the column name in Chinese (e.g., '收盤價'), not English. Using English names will raise KeyError.
fix
Use Chinese column names like '收盤價', '成交量', etc.
affects: >=2.0.0
gotchaThe symbol parameter in DataCenter.get() expects a string without any prefix, e.g., '2330' not 'TW2330' or '2330.TW'.
fix
Use plain stock numbers like '2330'.
affects: >=2.0.0
Upgrade
Version history
2.0.13latest on PyPI · released Jun 5, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
finlab — pip install finlab · libregistry