Skip to main content

financial mining

Project description

Build Status license Documentation Status Gitter PyPI version Python Versions

Donate

Quickstart

pip install FinMind

LLM / AI 整合

想用 ChatGPT、Claude 等 AI 工具查詢 FinMind 的資料集和 API 用法?我們提供 llms.txt,讓 AI 快速理解 FinMind 的所有資料集、API 端點與使用方式。

只要將以下連結貼給你的 AI 助手,即可開始對話:

  • llms.txt — 精簡版,資料集索引與 API 概覽
  • llms-full.txt — 完整版,包含所有資料集的欄位名稱、SDK 方法、參數範例
  • Agent Skill 教學 — 讓 AI Agent(如 Claude Code)直接查詢 FinMind 資料

這是什麼?

FinMind 是超過 50 種金融開源數據 50 datasets。 包含

  • 技術面 : 台股股價 daily、即時報價、歷史 tick、PER、PBR、每5秒委託成交統計、加權指數、當日沖銷交易標的及成交量值。
  • 基本面 : 綜合損益表、現金流量表、資產負債表、股利政策表、除權除息結果表、月營收。
  • 籌碼面 : 外資持股、股權分散表、融資融券、三大法人買賣、借券成交明細。
  • 消息面 : 台股相關新聞。
  • 衍生性商品 : 期貨、選擇權 daily data、即時報價、交易明細,選擇權、期貨三大法人買賣,期貨各卷商每日交易、選擇權各卷商每日交易。
  • 國際市場 : 美股股價 daily、minute、美國債券殖利率、貨幣發行量(美國)、黃金價格、原油價格、G8 央行利率、G8 匯率、

資料每天更新。你不需收集資料,就可進行分析。

What is this?

FinMind is open source of more than 50 datasets, including

Taiwan stock trade data daily, Taiwan stock trade data (5 seconds) (2019-05-29 ~ now, more than 30 million data in total), Financial Statements, Balance Sheet, Cash Flows Statement, Month Revenue, Holding Shares Per, Institutional Investors Buy Sell. Taiwan Futures Trade Detail, Taiwan Option Trade Detail.

US stock price daily, minute (2019-06-01 ~ now, more than 80 million data in total), oil price, gold price, G7 exchange rate, interest rate.

US Government Bonds Yield.

The datasets are automatically updated daily. You can analyze financial data without having to collect the data by yourself.


License

  • License Detail

  • 本專案提供的所有內容均用於教育、非商業用途。資料僅供參考,使用者依本資料交易發生交易損失需自行負責,本專案不對資料內容錯誤、更新延誤或傳輸中斷負任何責任。

Project of Contents

Plotting

kbar_plotting.ipynb

# 取得股價
from FinMind.data import DataLoader

dl = DataLoader()
# 下載台股股價資料
stock_data = dl.taiwan_stock_daily(
    stock_id='2609', start_date='2018-01-01', end_date='2021-06-26'
)
# 下載三大法人資料
stock_data = dl.feature.add_kline_institutional_investors(
    stock_data
) 
# 下載融資券資料
stock_data = dl.feature.add_kline_margin_purchase_short_sale(
    stock_data
)

# 繪製k線圖
from FinMind import plotting

plotting.kline(stock_data)

gif

dashboard

png

Contact

Email: FinMind.TW@gmail.com

每週日早上零點至早上七點為維護時間,不提供服務。

Note

  • 未來預計新增更多功能,包含個人化回測分析、chatbot 監控策略,
  • API Request 上限:300 / 小時。
  • Limit amount of request, 300 / hour.
  • FinMind官網註冊並驗證信箱後,API 的 Request 加上 token 參數可以提高使用上限到 600/hr。
  • token 獲取方法,可在官網登入後獲取。

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

finmind-2.0.3.tar.gz (60.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

finmind-2.0.3-py3-none-any.whl (75.2 kB view details)

Uploaded Python 3

File details

Details for the file finmind-2.0.3.tar.gz.

File metadata

  • Download URL: finmind-2.0.3.tar.gz
  • Upload date:
  • Size: 60.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for finmind-2.0.3.tar.gz
Algorithm Hash digest
SHA256 9702b03455d24ced921bd85cd8dcfaff67e73a487d87c63ef7d8c04495cc14b6
MD5 b06421d4b4d8e9d0e891813825b0e64e
BLAKE2b-256 b59940f1d4268751dc17047d93e623d44920e12ab24bd0d0b31eefe3d3e33602

See more details on using hashes here.

File details

Details for the file finmind-2.0.3-py3-none-any.whl.

File metadata

  • Download URL: finmind-2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 75.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for finmind-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c384e5d5b185732addc1cc1aea97fe1711476624c4d55fbad83a36f1ae70bf8f
MD5 0c9aae1a9a1381e6ec81798257ffad04
BLAKE2b-256 36fafbfecaa55d138276da1dd0723f4ef4e35c7d94de76b890704a4338cb984d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page