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.4.tar.gz (61.2 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.4-py3-none-any.whl (75.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: finmind-2.0.4.tar.gz
  • Upload date:
  • Size: 61.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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.4.tar.gz
Algorithm Hash digest
SHA256 04ec3491541cdc064378e36fd2c11f7aeaac314a69a81d8bef0635f1a39a1338
MD5 406798657931901887221915a07bc8cb
BLAKE2b-256 eb286681b6cdac804e6946f15022db83ca1072861297cf968f357d2051d7a5ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: finmind-2.0.4-py3-none-any.whl
  • Upload date:
  • Size: 75.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 52b86337c62b92265280ae1563b8cdf0e268597558926daefda6b80835869543
MD5 85939b5c4b28a98817b6056c79a9b421
BLAKE2b-256 5cdb5dd43b83ecca6f67f8e1153664ba1c67d8bbe53fc0fb516480dac5f5acfa

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