Skip to content

miles170/twstock-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twstock-go

GoDoc Test Status Test Coverage Go Report Card Code Climate

證券交易所 (TWSE)證券櫃台買賣中心 (TPEX) 抓取有價證卷資料

Installation

twstock-go is compatible with modern Go releases in module mode, with Go installed:

go get github.com/miles170/twstock-go/twstock

Usage

import "github.com/miles170/twstock-go/twstock"

client := twstock.NewClient()

從台灣證卷交易所下載上市及上櫃國際證券資料

securities, err := client.Security.Download()

從台灣證卷交易所下載下市的國際證券資料

securities, err := client.Security.DownloadTwseDelisted()

從證券櫃檯買賣中心下載下櫃的國際證券資料

櫃買中心查詢下櫃證卷資料需要指定頁數

securities, err := client.Security.DownloadTpexDelisted(0)

從台灣證卷交易所或證券櫃檯買賣中心下載盤後個股日成交資訊

quotes, err := client.Quote.DownloadTwse("2330", 2022, 8)

從台灣證卷交易所下載即時個股成交資訊

quotes, err := client.Quote.Realtime("2330", "3374")

從台灣證卷交易所下載盤後每日市場成交資訊

marketData, err := client.MarketData.DownloadTwse(2022, 8)

從證券櫃檯買賣中心下載盤後每日市場成交資訊

marketData, err := client.MarketData.DownloadTpex(2022, 8)

License

BSD-3-Clause